-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xrdp for Mac #2194
Comments
Hi, I've created the room. Feel free to have a talk there: Please note that there's no official support for Mac by the development team. xrdp on Mac is 100% users' contribution-based. If users contribute nothing, nothing'll happen. Development team will accept & merge pull requests to improve Mac support if someone raised it. |
Just pinned this issue. Good luck. See also Platform Support Tier. |
Just to add to @metalefty's comments, this will only get harder as MacOS transitions to ARM - there's no way around requiring Mac hardware to support xrdp at that stage, and that costs money. For many of us xrdp is a hobby only. |
What’s the relationship between ARM and xrdp? I didn’t know a remote desktop protocol could depend on the CPU. I thought it was just software that intercepted and transmitted data on certain layers of the operating system or something. Why would the change in chip affect it? Thanks very much |
It's not the change in chip - it's the change in OS. I run a lot of VMs on a virtualisation rig to look into xrdp issues. At the moment I could in theory run a Hackingtosh on this setup to support MacOS, but this will not be possible in the near future, when Apple drop support for x86_64. As a result, I'm not keen personally on getting involved in supporting this, as I can't do it in the long term. |
@matt335672 It might still be possible, albeit with a huge perf hit: https://superuser.com/questions/469525/how-can-i-virtualize-an-arm-machine-in-windows#:~:text=You%20simply%20can't%20virtualize,you%20can%20emulate%20it%20%3A)&text=Virtualization%20is%20used%20to%20run,not%20an%20OS%20(software). |
I've tried this for some of the rPI problems we've got. It really is slow! Also, you need QEMU to emulate the ARM machine in question. At the moment, the QEMU Wiki is only listing up to an rPI 2, unless I'm missing something - the Wiki might be out-of-date. |
Hello, I am developing an xrdp module for macOS and have met with a snag. Translated with www.DeepL.com/Translator (free version) |
This is awesome that you're working on it! It's true that GFX has been evolving slowly, but it has been evolving. I have rebased all the necessary bits for the GFX H264 encoding changes here: https://github.com/Nexarian/xrdp/tree/mainline_merge There is an issue with RFX at the moment, but H264 accelerated (X264 probably for Mac OS) should work just fine! Also, any integration with Mac OS is a win, so feel free to cut us some PRs and we can test! |
After a few hours of work, I finally got RemoteFX to paint the screen! It's 5am here in Korea, so I'm going to sleep a bit. |
Ok this is really cool because not only is RemoteFX working, you're also capturing the native session, something XRDP doesn't normally do! I'd love to see how you did this :) |
I've published the repository!
|
@unstabler This is really excellent work! I'd have to ask @metalefty and @matt335672 and @jsorg71 what they think about how to merge this upstream. Two questions:
|
Once I get some time I will try this out. But I am so confused, can someone explain this to me like I'm an idiot? If I am understanding it correctly, instead of making xrdp work with Xorg, you created your own protocol ? It must be pretty powerful if it works with RemoteFX, doesn't that mean it works with 3d acceleration? It is just using VNC under the hood? |
@paulb39 Ulalaca-sessionprojector uses ScreenCaptureKit provided from macOS 12.x instead of X11 or VNC. if GPU supports Metal, 3D acceleration is applied to capturing screen. Eventually I would like to create an Ulalaca-sessionbroker to support multi-user session like Windows Terminal Server using the Private API (CGSSessionCreateLoginSessionID, CGSCreateLoginSessionWithDataAndVisibility ...) of the macOS SkyLight framework. |
Protocol is a funny word with respect to this situation. RemoteFX is full-frame JPEG compression (JPEG 2000 I believe), and it was a precursor to Microsoft's H264 acceleration. The reason H264 is superior to JPEG is that while JPEG compression is super efficient, with every frame you are still sending a full frame. The insight for H264 is it's a diff-ing protocol. It sends a "key" (full) frame, and then for a long while after the fact it sends compressed diffs (and then occasionally another key frame to make sure things are in sync). This turns out to be WAY faster than JPEG, so much so it's why we have Nvidia's NVENC encoder and Intel's QuickSync decoder implemented in hardware, but hardware accelerated JPEG? That's nowhere to be found, the best XRDP has in that regard is assembly-written encoders/decoders, which are still fast, but not as blistering as H264. This is also what YouTube, Netflix, OBS, and any other modern video streaming tech uses. There are other derivatives such as H265, VP8, and VP9 as well, and I believe AV1 is coming out soon which promises to put all of what I listed to shame. We don't have to write these encoders/decoders, they are complex and take years of work and Ph.D.-level expertise to build. Most of that is built into OpenH264, FFMPEG, X264, libva (Intel), and Nvidia's libraries like cuda. With my prototype of H264 on XRDP I can watch 1440p YouTube videos with sound at ~10 MS latency. With RFX, well What @unstabler did was capture the Mac OS screen, then built a module that plugs into XRDP's server network architecture in such a way that it can feed the XRDP server RemoteFX-compatible (JPEG compatible) bitmaps that are then transformed into the Microsoft Remote Desktop network messages that anything that speaks RDP can connect to (FreeRDP and any of Microsoft's clients). The xorgxrdp module is very similar, it just uses the Xorg server to feed XRDP data instead. Anyway, @unstabler, feel free to start chatting with us on the https://gitter.im/neutrinolabs/xrdp for any technical questions or assistance. |
@unstabler @Nexarian Personally, I would welcome merging that if it will be maintained countinuously. |
https://teamunstablers.notion.site/xrdp-Ulalaca-Getting-started-f82b0c55f0b540a6ac277cc5902361b1 I have written a new installation guide for xrdp+Ulalaca on macOS. The installation process has changed and is much simpler than before. I am looking for someone to test the installation procedure as per the guide above. It should probably work fine on M1-based Macs with macOS 13 or higher, so if you are interested, please test it and let me know the results. ( 1: requires low resolution; use EasyRes. |
@unstabler, Would you expect that I could test using a remote macos setup, e.g. macincloud remotely accessed physical machine or aws / azr / gcp cloud provider remotely accessed virtual machine, or does it require local physical apple silicon mac console interaction to setup the test? Looking at macincloud faq it says the following "Connecting to Mac servers provided in our MacinCloud Managed and Pay-As-You-Go server plans will utilize a RDP (Remote Desktop Protocol) client". This makes me wonder what did they do to get macos rdp access working? Also probably suggests that using one of their setups to test your open source rdp listener for macos system probably isn't going to be viable unless the fact that their solution lives on port 6000 avoids any conflicts. |
@myusrn
|
@unstabler thanks for all your work! I am just starting to use my first Mac (Mini 2023) so I'm probably holding it wrong... but I was unable to get things to install. Can you confirm that the instructions are in the right order? I first install Compilation fails:
I noticed that it says that Rosetta 2 isn't installed when I definitely installed and rebooted, so not sure whether that is related. Here are the system details:
|
@unstabler it seems to almost work, but then crashes right after entering credentials |
(machine-translated) Hello, there was a bug in the installer where the LaunchAgent definition for sessionprojector-launcher was not installed properly, resulting in a problem where sessionprojector.app would not start and the user could not log in to the session. We are planning to release new installer that fixes the above problem by the end of tomorrow, so please wait a little longer. |
I have managed to compile and run In the
I am on version 0.9.19 as it was the latest version I could get to compile. |
@zahtec i am wondering if issue you are seeing is same as one i ran into [ https://github.com//discussions/2725 and https://github.com//discussions/2732 and ] that kept me from successfully using current release build output on macbook pro 13" m1 with latest macos ventura 13.x installed [ xrdp 0.9.22.1 may22 and xorgxrdp 0.9.11 sep22 with this work around for getting latter to build https://github.com/neutrinolabs/xorgxrdp/discussions/263 ]. i've been waiting for updated release of xrdp and xorgxrdp to do a newer build and see if it reproduces. |
In #2732 you appear to have gotten farther than me as your authentication is working ( I might attempt to get a later version to compile, but I have a feeling this PAM issue has to do with how macOS does user permissions. Also, for now as it is not working, I have been launching |
Hi @zahtec, curioius if you included build and install of https://github.com/neutrinolabs/xorgxrdp in your process? i wonder if that might explain our different outcomes. i was following instructions in https://github.com/neutrinolabs/xrdp/wiki/Building-on-OSX-(not-official) post ignoring the fact that the tested versions for xrdp, xorgrdp and macos where older than the current releases i was trying with. |
I got xorgxrdp to compile after editing all X11 Keep in mind I am entirely unknowledgeable on C and header files, mostly done low-level stuff in Rust where that is often not dealt with, so my solution here may be entirely unnecessary or the wrong way to do it. |
I guess you could set up some Patreon or something... |
Sorry for jumping into an old exchange with a probably naive question, but just how is this different from VNC, esp. Apple's VNC server that doesn't simply connect to the running local session? From what I understand you still get the entire desktop image sent over (or at least the parts that changed)? |
@RJVB RDP is different from VNC. |
Well, doh... |
@RJVB my experiments with attempting to use macos built in settings | general | sharing | screen sharing enabled vnc server is that it provides an unusable experience, performance is really bad, when you are connecting to it using open source vnc client from a non-macos system, i.e. windows and linux. Conversely if you connect to it from another macos device using the findor or screen sharing app built in vnc client solutions you get a usable experience. My hope with an open source xrdp service solution for apple silicon macos installs is to get around this arbitrarily imposed behavior and land on a good performing remote macos desktop connectivity solution from both windows and linux systems. |
On Monday May 20 2024 14:42:16 my usrn wrote:
@RJVB my experiments with attempting to use macos built in settings | general | sharing | screen sharing enabled vnc server is that it provides an unusable experience, performance is really bad, when you are connecting to it using open source vnc client from a non-macos system, i.e. windows.
I don't do it very often because all my other systems have smaller screens than my Mac, I don't notice any differences in performance when connecting to it using TigerVNC compared to using TigerVNC on the Mac to connect to Linux (running TigerVNC's x0vncserver) or MSWin hosts (running RealVNC).
TigerVNC is definitely the best open source client I know, both in terms of speed and image quality. Evidently I don't expect to be able to use it to watch videos or play games, and I don't use fancy user interface animations/effects but for regular GUI interactions it is perfectly usable. Except for clipboard copy/paste, which can be a pain at times, but I think that's a flaw in TigerVNC rather than in the protocol.
The backgroun to my question is that it has been my understanding that the RDP protocol as used in the MS remote desktop server and client doesn't send a video stream of the screen contents but does something that's more akin to how X11 works, allowing to display individual remote windows on the client's desktop rather than in a "session window". I never actually used it that way myself so I may simply have misunderstood.
|
Hey,
Just curious if there’s a chat group or something for people trying to make this work for Mac? I’d be interested in trying to complete the work so it’s ready to go for anyone that wants to use it.
https://github.com/neutrinolabs/xrdp/wiki/Building-on-OSX-(not-official)
Mac really needs a good open source remote desktop protocol.
thanks very much
The text was updated successfully, but these errors were encountered: