Ask HN: Why is there no performant remote desktop for Mac/Linux?

198 points by asiachick ↗ HN
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 ] thread
X2Go/FreeNX since forever.
I noticed that remote desktop from Linux to Mac (with Remmina) is much slower than Linux to Windows 10. It's definitely RDP on Windows, maybe it's VNC on the Mac.

No 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.

For the slowness of Linux > Mac. I'm not sure if this helps, but I always had better performance from the freerdp2 nightly and remmina next repositories. At least on Ubuntu, looking at the package website for 22.04 freerdp is at version 2.6.0. However 2.8.0 is available in nightly.

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.

Circa 1995 the physics department I was studying at received a grant from Microsoft and Intel to buy a large number of x86 workstations, first most of them were running Windows NT but the only people who would use NT were another grad student who liked Windows and me who would use vnc to log into a Linux computer without competing for one.

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.

"High latency nature of the protocol" is a bit misleading.

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"

I believe it is impossible for an RDP app to rely on "more synchronous behavior" as you put it.

Remote X11 worked well in the past. It's possible to latency-optimize software for it, but it's not common anymore.

I wonder why cloud vendors, even AWS, wouldn't invent a modern remote desktop protocol that works cross platform in easy way such as through ssh protocol that may perform at near native performance and they may just have a wider use case for cloud servers to increase their revenue. Of course it helps other vendors too but no one loses including the users.
As someone who likes to remotely stream games from my desktop, Parsec has been extremely easy to use and very performant. Could be worth a try!
I'll second this. It may be gaming focused, but it's perfectly functional as a general remote access tool too. The visual quality and latency are second to none in my experience.
It seems like it's "latency focused" which is good for gaming but also things like video editing, remote visual/graphical coding (like for games). It seems a good number of people use it for more business-related purposes.
I think the gaming focus is to market the free product. The enterprise version is all about productivity stuff. The big things it adds are better color quality and multi-monitor support.
https://www.paperspace.com/ is a SaaS that uses Parsec and they are not game-focused - it barely works for games. They are focused on professionals who need good GPUs, like 3D modeling and rendering.
Same, I Parsec into my machine at the office using my dual screen 1440p monitor set up at home, the latency is incredibly good, so good sometimes I forget I'm using a remote machine. I was skeptical of it at first, but now I am a convert - it works very well for coding as well as gaming stuff.
The only downside IMHO is the lack of an iOS/iPad OS client. I’m in the “make my iPad a general purpose computer” crowd though, mainly to avoid carrying a beefy machine around.
I found that RustDesk worked very well for me: https://github.com/rustdesk/rustdesk

(I'm using it for linux to linux.)

As in LAN, or did you test across the tubes of the Internet?
I used it across the tubes! ;)

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].

I used to use NoMachine with good success. I believe they have the cross platform capability and performance you might expect, though it's been years since I used it. Can it work?
I second this! I was also looking for performance (3d graphics usage) and NoMachine is surprisingly performant; currently using it across both Windows, Linux and Mac and consider my search to be over.
I remember being surprised that watching a video on my remote desktop worked as well as it did, over 100Mb LAN, circa 2010.
Nomachine turned out to handle latency very well. My company is based in Brazil but we have our infrastructure on Aws north Virginia. I build an EC2 with Ubuntu and installed the gnome desktop and nomachine and the result was a very usable and cheap remote workspace.
DCV is the best remote desktop tool I've found - alas it is closed source and requires a paid license unless you're running on AWS EC2.
It also looks like a paid license can only be purchased by through a "contact us" partner? That's a hurdle.
(comment deleted)
There's an implementation of RDP for Linux, Xrdp.

https://github.com/neutrinolabs/xorgxrdp

Glad someone mentioned Xrdp.

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 :)

Meshcentral is fantastic and cross-platform. Hosting it yourself is really simple. One of my favorite open source projects. https://meshcentral.com/info/
Thanks for the info -- I'm going to try this out!
meshcentral - https://meshcentral.com/info/ - self hosted server needed for best effect.

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.

I second this, meshcentral is very good and efficient, works on Windows and MacOS too, developpers are very responsive.
RDP also does its fair share of raster shuffling. Where it has the edge is that most windows programs still use GDI (i.e. windows native draw commands), and RDP can send a lot of that as commands instead of pixels.

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.

RDP has not worked that way in a long time. Look up “rdp gfx rfx” for an idea of how it works a lot more like streaming video today.
(comment deleted)
VNC is not too bad now with internet connection speeds increasing. It is usable for development, but not for video/graphics in the way RDP can.

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.

I think it's worth mentioning that apple screen sharing is pretty amazing for apple <-> apple.

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.

Which app is this? I’ve checked the box in sharing for screen sharing and it’s just using vnc. Is there a different one hidden somewhere?
/System/Library/CoreServices/Applications/Screen\ Sharing.app
The easiest way to see it is to browse to another Mac on the Network in Finder and if it has "Screen Sharing" enabled, you should see a "Share Screen..." button in the finder window.
I keep Screen Sharing App in my dock at right click for prior connections from the popup list.
Maybe they have some custom protocol extensions that only work between mac os and mac os?
You can use screen sharing to non-apple devices using the VNC protocol, but between macs it does something different.

I use it over ssh myself.

for example, if I have a machine call rem:

  Host rem
    Hostname 10.1.2.3
    User foo
    IdentitiesOnly yes
    IdentityFile ~/ssh/id_rem
    # rem screen shares on port 5900 locally
    # this forwards rem:5900 to this machine:5903
    LocalForward 5903 localhost:5900
then I do in one window (which you leave open):

   ssh rem
then launch /System/Library/CoreServices/Applications/Screen\ Sharing.app

choose 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.

Yea I have a 2009 Macbook laying around just for screen share to my work hackintosh.

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.

Remmina on linux will support RDP, VNC, SPICE and others. I've used it to remote into my Windows laptop from my linux desktop.
Yep, I just used Remmina earlier today to go cross-continent and it was fine.
Others are giving options for Linux/Mac I’ve not used. Probably the reason a name like RDP for Linux/max isn’t so widely spread is because RDP is daily driven in IT “enterprise” at scale for course of business stuff. The equivalent for IT pros in Linux is ssh. Mac is decidedly un-“enterprise” friendly.
Have you considered something like NICE DCV which uses QUIC and is pretty performant?
For demonstration purposes I've stood up Digital Ocean droplets, installed Apache Guacamole and streamed YouTube videos. If that's your definition of performant check out the app: it's easily installed and configured and there are demo scripts on GitHub that automate it.
It's probably not what you're looking for, as it's proprietary & closed-source, but I've found AnyDesk to be pretty smooth. They have a free tier for personal use. I really only use it to help out my parents when they can't figure something out on their computers, but one advantage is it's very easy to walk a non-technical person through the setup process, without knowing anything about their network topology.

For my own gaming I used Parsec for a long time, which does stream pixels but has pretty impressive variable rate compression.

I have been working on one for the past two/three months to scratch this itch. I will probably release it soon (and hopefully shill it on HN!). In the meantime, NoMachine is a very good remote desktop software (macOS and Linux), and possibly Sunshine (GameStream host), but basically I'm not sure why a more popular one exists.

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.

NoMachine is ok...if you haven't spent much time in RDP. Windows RDP is so far ahead of anything else out there it puts them all to shame. I use RDP for work all day long and I couldn't find a workable solution that would have a similar experience on Mac/Linux. And these machines are all on the local network!
This was the case 10 years ago too iirc. Windows RDP is excellent. Wish Linux RDP worked as well.
I've found, over NoMachine and even RDP, that Parsec is hands down the best solution that I've encountered because of how low-latency it is. It might not support all the input methods/etc. that RDP does (IIUC RDP has good touchscreen support), but Parsec is faster than everything else.
thanks for this input! Parsec looks promising
This matches my experience. With a Gigabit Ethernet connection, I find it very difficult to distinguish a desktop streamed via Parsec from a local one. RDP is noticeably laggy in comparison. I would even say that Parsec over a good internet connection (a few 10 MBit, ~10 ms ping) feels more responsive than RDP over LAN.

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.

(comment deleted)
I've literally never found anything better than the NX-based NoMachine (I think version 3 was the last one to support it). I'll never understand why they downgraded themselves to yet another desktop video stream. If you can find a copy of the older version or one of the open source replacements (freenx? x2go?) it's worth it.

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.

Interestingly the RDP client on the mac app store is really good.

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.

I requested that feature for Windows RDP client over 2 years ago to no avail. Sort of surprising they made it work like this on Mac, but not on Windows.
For me it's the opposite when it comes to lan. Vnc is buttery smooth with no perceivable delay, while RDP still seems to limit to some low-ish fps.

For low bandwidth/high latency links, RDP easily wins.

How is Parsec actually in comparison? Never tried RDP but Parsec just blew my mind
I found x2go being a nice and performing FOSS replacement fo NX NoMachine.
This. x2go has served me well and can be tuned to be even more performant with some X11 settings changes.
> 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)

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

> NoMachine is a very good remote desktop software

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 flipped the other way around. VMWare’s Blast Extreme is essentially an x264 stream that outperforms RDP in most ways.

It’s pretty awesome, any device with a x264 decoder chip can be a performant client.

Very minor nitpick, but I think you mean h264. x264 is the name of a certain software project used for encoding video into h.264, but it's not a video codec itself.
export your $DISPLAY with X11, Citrix stole the idea. not many really do it anymore it seems, and i doubt Wayland does it at all.. works great for me
ssh -x does that, _and_ it sets up authentication, making it harder to blow your foot off. No need to reinvent the wheel.
And it kills performance, making you watch redraws, while sshd is maxing out a single core.
The drawing is local to your machine, so it doesn't have any overhead over exporting $DISPLAY, and several sshd implementations have moved to fully multithreaded, since at least '08.

The only performance hit is X11 (no different than normal) and the network - not ssh.

Doesn't fit with my experience. Moving from using ssh -X to just pointing remote X applications at my local X server without tunnelling it over SSH consistently improves performance for me. Not just in terms of experience, but also no process maxes out a CPU, so the machine has spare compute capacity for other tasks. It's really not an issue of ssh not being multithreaded. That shouldn't happen even on a single core. If sshd divided that workload over my n cores, it would still be very bad.
VNC doesn't send all pixels of every frame. If you look at the RFC for the frame buffer protocol it uses, it concerns itself with areas of the screen.

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`

Ubuntu 22 ships an RDP server by default these days. Haven't tried it myself (my manual attempts at running xrdp way back in Ubuntu 18 broke stuff) but it seems to work quite well. Just open the settings application and enable it. Might not even be Ubuntu-specific, might be available in every GNOME distro?

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.

Wanted to add this also is setup on Fedora workstation 36 and is turned on the same way. It was super easy and works really well. I only use it on a local network now and then though. So I can’t say I’ve hammered on it very hard, but it was exactly what I wanted at the time.
Last I checked it didn't work if your cpu is amd or your resolution is wrong
Well I'm not sure about the resolution part. Mine was nothing notable, maybe 1920x1080, but it seemed okay? Maybe there are other problems 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.

On Ubuntu I used Remmina client to have a remote desktop of another Ubuntu over ssh tunnel. I did it over local WiFi attached to low-speed DSL and a fiber on the remote end.

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.

The RDP protocol should be pretty good even for running video as it can switch to a simple MP4 stream on the fly, at least in Microsoft clients and servers. I don't know if the open source implementations have that capability, though.

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.

TigerVNC[0] might be of interest in this domain.

0 - https://tigervnc.org/

Yes, along with x11vnc and its scale option.

A 4k screen scaled to 1080p, then rescaled on the remote end is very useful.