Ask HN: Why is there no performant remote desktop for Mac/Linux?
IIUC, RDP (Microsoft's remote desktop protocol) sends draw commands across. It's the default way to access remote desktops on Windows. Conversely, AFAICT, the default way on MacOS and Linux is VNC which IIUC sends all the pixels (with compression). I've noticed for years I can work remotely, edit code, etc on RDP. I've done it around the across 8000 miles and had hardly any lag. Conversely I'm trying to share 2 computers right next to each other in the same network via VNC and it's horribly laggy.
Is this just not an itch anyone has wanted to scratch in the last 25 years? On Linux you can maybe XWindows your way to a faster connection by what about Mac? Also, RDP seems to let me run GPU based stuff where as XWindows you're actually not seeing the computer's display.
221 comments
[ 2.8 ms ] story [ 268 ms ] threadNo idea about the performances of a remote Linux desktop because I connect to remote machines with ssh and use only the command line. It's maybe 25 years since I run remote X11 applications to my local server.
There are other apps like NoMachine and TeamViewer. I never used them with a remote Mac.
I've been using the nightly branch for 6 or 7 years now and have rarely ran into issues. In fact our entire company runs nightly due to using the latest bastions and gateways servers that sometimes the version in the main repository do not support yet.
That grad student and I argued about many things, one of which was the relative merits of X windows and RDP and he was right about that one. RDP was written with the X Windows experience in mind and it performs much better. Compressors for the X protocol were made but they did’t address the high latency nature of the protocol.
X is distinctly asynchronous. You don't send the server a command and then wait till it ack's that before doing something else. The actual delay between the client sending the command and the result appearing on the server's display can be extremely fast (dependent mostly on network performance), and by most definitions that is a "low latency" system. However, if the app on the client needs more synchronous behavior from the server, that's when you start to see things slow down and demonstrate "high latency"
Remote X11 worked well in the past. It's possible to latency-optimize software for it, but it's not common anymore.
(I'm using it for linux to linux.)
I support my in-laws and my daughters running Linux on their laptops and it worked fine and was pretty quick.
By the way -- we are all running various fairly recent versions of Linux Mint with the MATE desktop. The oldest being mine: [Release Linux Mint 19.3 Tricia 64-bit].
https://news.ycombinator.com/item?id=32239025 - RustDesk – Open-source TeamViewer alternative
https://github.com/neutrinolabs/xorgxrdp
Some years ago I made a WYSIWYG customisation utility to configure not just Xrdp sessions, but also the look and feel of the Xrdp login manager : https://scarygliders.net/xrdpconfigurator/ , https://github.com/scarygliders/XRDPConfigurator
I've not done anything to it for years - lost interest in the whole thing - so it definitely needs an update to more modern versions of Python, PySide, whatever.
Pull requests welcome, in case anyone is ever interested (it's not a sexy project I suppose).
But I was particularly proud of the login screen emulator for the WYSIWYG part of it :)
Open Source and development is lead by an Intel employee. I use Arch (btw) exclusively on my personal gear and I'm a first class citizen along with pretty much everything. The Windows binaries are signed too, which is nice. It also fully supports Intel AMT (vPro) which is probably why it is supported by Intel.
You can auth with say MS Azure (documented config required) so you simply click on the MS logo instead of filling in username and password and if you have an Azure cookie you go straight in or you go through the usual MS sign in thing. There are several more auth/auth mechs.
There is an agent install required and my Ansible playbook for it is roughly 10 lines long so rather simple.
Xwindows used to have the same advantage, but lost it for most modern applications (i.e. ones written in GTK or Qt, which pre-rasterize almost everything for simplified cross-platform compatibility). Nowadays, unless you restrict yourself to classic X applications, X forwarding is going to be a slower, dumber, version of VNC.
Mac has so many fades & animations that, raster or command, it will probably always be slower.
I've found the SPICE protocol using the QXL driver with some compression settings tweaks gives the best performance. The latency is better than VNC, but video/graphics intensive screens are still a problem unfortunately.
I use it to connect to the console of a VM over VPN for Linux development currently.
You can screen share a remote mac very efficiently, drag and drop files, use keystrokes such as modifier-plus-key in a sane way, and more.
I use it over ssh myself.
for example, if I have a machine call rem:
then I do in one window (which you leave open): then launch /System/Library/CoreServices/Applications/Screen\ Sharing.appchoose Connection -> New and enter: localhost:5903
when you log in using username/password and you will get a nice remote window on your desktop
The window has lots of nice features. You can drag files from your local desktop and drop them on the remote desktop and they are copied over.
cmd-tab in a screen sharing window works on the remote machine, but move it out of the window and it works on the local machine.
You can copy/paste between apps on the local machine and apps on the remote machine, including rich text stuff.
There is probably lots more I don't remember or haven't discovered.
VNC Linux/Windows > MacOS is so incredibly painful and unusable:
Multimonitor: No. Correct scaling: No. Copypaste: No. Thats only some of the bigger problems.
I wonder what Apple is doing differently with their VNC connection.
For my own gaming I used Parsec for a long time, which does stream pixels but has pretty impressive variable rate compression.
In essence, a good remote desktop software will use video encoding/decoding (h264/265 for both ways being very fast) to encode captured frames of the desktop, and a good transport protocol over the network with good tuning parameters to achieve low latency (which is what mine does). I believe this is what NoMachine and Parsec do and why they are so good (along with NICE DCV). From my work I've found that video processing libraries/techniques are extremely poorly documented (think the libav* family of libraries), which makes it a very difficult segment to conquer because of what I perceive as honestly massive gatekeeping (or by Hanlon's razor perhaps laziness). There's nothing impossible about making a remote desktop software (I can say this since I'm doing it right now) but I can say it's harder than it has to be.
What I don't like is that Parsec relies on third-party servers for the session initiation, and that streaming Linux desktops is currently not supported. Maybe the open source implementations of Nvidia's GameStream (Moonlight and Sunshine) could be an alternative.
I was able to use my home computer lag-free at my highschool when it was at home sitting behind a shitty ADSL connection. Later I used it at college with my computer at the dorm with a 100k/sec upload cap (enforced to discourage student file sharing). It pulled some dirty tricks with X forwarding, caching pixmaps, and jpegging the hell out of the individual elements, but it really felt like the computer I was using was right there.
Its better than the Windows client because it just works as another desktop in the Mac OS, with no bar at the top, and you can jump in to and out of various remote session quickly just by switching desktops with Cmd+left or right arrows. Its a really simple, nice to use implementation.
For low bandwidth/high latency links, RDP easily wins.
They do, but the paid version of NoMachine has?/had? a mode called X11 vector graphics explained better by NXDev here [0]. I've used it from 2016 until 2021 and for classic applications (ie apps not requiring a GPU) is incredibly fast. To the point that I used to forget i was working remotely.
[0] https://news.ycombinator.com/threads?id=NXdev
Glad someone mentioned it. I wondered if NX was still a thing...
fast
secure (over ssh)
NoMachine blows past RDP every day of the week and twice on Sundays.
It’s pretty awesome, any device with a x264 decoder chip can be a performant client.
The only performance hit is X11 (no different than normal) and the network - not ssh.
https://unix.stackexchange.com/questions/566/how-does-ssh-x-...
https://www.rfc-editor.org/rfc/rfc6143.html
I've only seen very good performance using the built-in VNC client/server for macOS. You can try it out by turning on remote sharing and doing this from the terminal:
`open vnc://<host>:5900`
Personally, I've used stuff like Steam in-home streaming and Parsec for remote desktop access. They're more meant for game streaming but they handle normal applications just fine and they run on pretty much any platform I can think of. As an added bonus, there's something nice about the idea of picking up a cheap second hand Steam Link and using it as a thin client for your PC.
Don't know about macOS, though.
I'm running an AMD CPU and that worked fine. Perhaps it's the built in GPU that causes a problem? The system I connected to has a standalone GPU.
It's quite usable graphically even with such channel. Of course, running graphically intense programs or remote video would not be practical, but spreadsheets ok.
I wouldn't expect too much from a DSL link but at a low render resolution (<720p) even video should be doable with the right tweaks. Quality won't be great, but those stupid video ads shouldn't lag out a browser session for example.
If xrdp or equivalent don't support those extensions, I see an opportunity for distro makers there. Linux distributions (and others) have been reliant on VNC for way too long in my opinion and the only somewhat supported alternatives with more than one implementation aren't exactly built for this purpose, sadly.
0 - https://tigervnc.org/
A 4k screen scaled to 1080p, then rescaled on the remote end is very useful.