Xrdp: An open source RDP server

by tomato2juiceon 6/11/20, 6:57 PMwith 78 comments
by peckrobon 6/12/20, 12:45 AM

So a long time ago I worked volunteer IT for a fan convention. This is roughly mid to late 2000s. Among many other things, I was constantly looking for ways to speed up the registration line. And rather than have reg workers type things in, one way I hit on was to have terminals there for people to enter their own information.

Shoestring doesn't even begin to cover it. Buying computers was definitely out. So I hit on the idea of buying used Wyse Winterms. Winterms are thin clients that talk either RDP or Citrix ICA. These could be had for about $20 a pop on eBay. I would hit local pawn shops, thrift stores and recycling places to get monitors and keyboards to go with them.

But they're just dumb terminals with Windows CE on them. How to actually use them?

xrdp!

I set up a Linux system with xrdp and a bunch of X sessions for the Winterms to talk to. Took a lot of fiddling to get it right. Like I probably spent two weeks in the evenings getting everything right. But even I was surprised how well it worked. With a full-screen web browser in kiosk mode it shaved massive amounts of time off how long it took to get through the reg line.

We actually used that setup for about three years before we had enough money to invest in better hardware. Over that time I'd estimate about 8,000 people used them. But I'll always have a soft spot for those stupid Winterms and xrdp.

by rudolph9on 6/11/20, 10:40 PM

Another option is http://xpra.org/ . It’s a bit more of a commitment as (from what I understand) it replaces you displayManager (e.g. Gnome gdm) and I haven’t gotten around to trying it but I personally prefer Xforwarding over rdp.

Is the difference between RDP and xforwarding basically RDP is giving you a video of the remote display and sending the mouse clicks + XY position top? Vs xfowarding which natively renders the buttons and such and in the button example sending signal that a particular button got clicked?

I imagine a trade off is more security vulnerabilities with xforwarding? Does some have more incite into this?

by anonymousse1234on 6/11/20, 10:01 PM

I use RDP multiple times every day. I have tested Linux RDP server implementations and they are very buggy and really not production ready only NX kinda is (yet not as good as MS RDP). VNC is so bad and lacks so many features that it's not even considered a competition - it's old insecure slow protocol that should be forgotten by now.

by thanirion 6/11/20, 10:52 PM

I used to maintain some linux remote desktops at my job for specific workflows of certain employees.

Wow, using xrdp was a complete gong show to manage. The most common bugs were in the assignment of displays on user logon, as well as a crappy, often buggy, login screen (though GUI logins for linux are fascinatingly weird pretty much universally.)

That being said, even in evaluating alternatives there wasn't anything much better. Linux remote desktop managers are just not that great yet.

As much as I hate Windows, I have to tip my hat to Microsoft's and say that their RDP implementation stands more than head and shoulders above any alternative remote desktop implementations I've tried.

Developers these days are getting much better at doing things over the command line. The trend of using GUIs for everything recently appears to be ebbing into a "right tool for the right job" mindset. Which is a very promising trend I've noticed. Hopefully remote workflows are entirely done through emulating terminals over SSH in a few years time :)

by ryanmjacobson 6/11/20, 9:55 PM

Xrdp has been buggy for me as an RDP server... but... it's been a godsend as a VNC proxy.

The student computers at my lab run Windows and do not allow user's to install software or run foreign executables. They have great monitors though. I use an RDP instance to access my VNC linux boxes remotely.

Windows 7 and Windows 10 come with a built-in RDP client.

Also, VNC is pretty insecure. So I only listen on localhost, then connect via RDP for authentication.

by wronglebowskion 6/11/20, 7:22 PM

Can someone explain to me how Xrdp is so much simpler to use than VNC? I setup a new CentOS workstation the other day and ended up trying to follow long tutorials with config files and services. I gave up, installed the Xrdp package and seconds later I had a remote session going.

by dhrjtncon 6/11/20, 9:18 PM

Tried to use xrdp on couple clients' machines and gave up at the end after 2 months (Ubuntu was used as host and client). Always had problems starting with keyboard layouts, xdisplays, remmina client, and ending with black screens (https://github.com/neutrinolabs/xrdp/issues/1358). Also, it requires a very good connection, if you have sometimes a long ping - your clients would be randomly frozen. The solution only restart sessions on host. Very unstable not only xrdp itself, but xorg, vnc, xdisplays, etc within protocol implementation, at least for Ubuntu.

Even having working it was much slower than on windows stack within same datacenter.

I've recently heard good words about x2go. I didn't know about it earlier. Maybe it could save someone brain cells :)

For myself I decided do not use the RDP protocol on linux clients' machines.

by philsnowon 6/11/20, 8:30 PM

In the past I've used and loved https://xpra.org/ .

The performance is good and it doesn't rely on weird (to me) installation like NX does (NX installation creates a unix user, maybe this is necessary for some enterprise-y things, but my use case is "a smoother VNC").

I seem to recall facing issues with having exactly the same version on both client and server because the code didn't try for any forward or backwards compatibility, don't know if that's still the case.

by pixelhorseon 6/11/20, 11:00 PM

A few years ago, I managed to build XRDP with RemoteFX enabled. This was the smoothest remote desktop I have ever experienced.

I couldn't replicate it a while later after an OS upgrade and I have since given up on it. Does anybody else have experience with this? Should I give it another try?

by ttulon 6/12/20, 12:21 AM

And then there is Teradici’s PCoIP hardware, which is shockingly good. It compresses and encapsulates video, audio, and device data. You just install a card into your machine at one end and run a thin client box at the other end - or use a software client.

The quality is amazing.

by alexellisukon 6/11/20, 8:40 PM

I would usually have gone for vnc and have used TigerVNC on my Mac - you can even run a VNC server and desktop in a Docker container. I actually learned about xrdp over the weekend whilst trying to help an inlets user connect to his remote lab in Edinburgh from Vienna. There's a couple of screenshots here showing it in action - https://twitter.com/alexellisuk/status/1269639837335904257?s... - inlets PRO is a pure TCP tunnel with TLS encryption https://inlets.dev/

by rcarmoon 6/12/20, 8:41 AM

If anyone wants to have a go at a “normal” end-to-end user experience, I have a Docker setup with Xrdp and audio enabled at https://github.com/rcarmo/ubuntu-xrdp that I poke at now and then, and loads of previous attempts at the same all over my GitHub (many of my “desktop app” containers have VNC, Xrdp or Guacamole bundled in for remote access from my Mac and iPad).

Right now the biggest issue I have with RDP on Linux is that the default packages that ship with most distros are useless—they are either outdated (still in VNC proxy mode) or poorly integrated with login managers. Also, even though I get “free” multi-head when accessing a Windows desktop from my Mac (and believe me, that is an amazing way to work on a daily basis) I have yet to get it to work 100% with a Linux server (it works and I get multi-head, but sometimes displays are swapped for some reason).

Many people don’t “get” RDP because they confuse it with VNC and other remote display solutions. But when it is set up properly, it is _massively_ better than VNC, NX or Xpra in terms of bandwidth, latency, and client support (yes, there are thousands of VNC clients, and every Linux box can do X over SSH, but I can use RDP from my iPad, Android, etc., and those are the thin clients I travel with).

by jennasyson 6/12/20, 12:57 AM

I've been using xrdp for headless Raspberry Pi installations running Rasbian for years. It's easy to install and is a way smoother experience than vnc. Connections from Windows and Linux have rarely ever been a problem. Connecting from Android used to be an issue, but I think even that has been resolved at this point.

by smoocon 6/14/20, 6:20 PM

We run over 500 concurrent desktops with Guacamole and XRDP in Kubernetes in non privileged conatiners. This allows us have a secure environment while still having it light weight and not having te resort to Citrix for example.

Anyone comparing VNC to RDP favorably is nuts. RDP is a much more optimized protocol for high latency, low bandwidth. Only Citrix compares favorably from user's point of view. Maybe NoMachine NX as well. Both i cannot get to work over https (nomachine) and kubernetes (citrix).

Not requiring a custom, vague client also helps.

XRDP uses a Xorg driver or is able to use a VNC backend. Even then its faster than VNC. It can use pam for authentication.

by fomine3on 6/12/20, 2:12 AM

Xrdp is now used by Hyper-V Enhances Session Mode. It performs great.

Personally I encountered a problem that Xrdp recognizes wrong keyboard layout (I use JPN Windows and US keyboard, but recognized as JP keyboard in Xrdp)

by fockon 6/11/20, 11:26 PM

so, is there any open-source alternative including a login manager and preferably supporting accelerated graphics - xrdp is no solution you can sell anyone today just from the looks of it? I suppose the state of this affair is, what is really killing Desktop-linux deployment - to my knowledge you can't setup a VDI-infrastructure a la Windows Terminal Server at all without buying into Citrix or various other vendors (at which any "clients can be cheaper with Linux" argument is just obliterated)

by monksyon 6/11/20, 10:39 PM

x2go always worked well for me.

by cpbothaon 6/12/20, 8:59 AM

I've been using xrdp more extensively with WSL2 recently. Because WSL2 often gets a new network interface assigned, X connections back to Windows are terminated, while rdesktop to xrdp running on the WSL2 instance does not.

RemoteFX is active, but on my 2560x1440 display there is still a bit of sluggishness. However, it's fine to run PyCharm locally on the WSL2, which is my primary use case with this.

by oddlyon 6/12/20, 6:31 AM

I used this as a solution for remote workers in my company. Set up rdp on Windows with 24-bit color and select "LAN" connectivity improves sluggishnes. It takes a bit of tinkering to get the xRDP config working well, but when it works, it's really smooth. I used X over RDP. Make sure no users are locally logged in before logging in via RDP.

by m1keilon 6/12/20, 3:01 AM

I've been recently evaluating vnc and xrdp for a project. xrdp was much harder to install and configure. Documentation was sparse and outdated. VNC provided multiple choices of well established implementations and in low latency environment with simple Desktop (xfce), both provided pretty good feel.

by cf100clunkon 6/12/20, 3:20 AM

Headless?

In the Features section of the xrdp GitHub project page is this: "Connect to a Linux desktop using RDP from anywhere (requires xorgxrdp Xorg module)"

Does this imply that serving from a headless Linux machine is not possible like we can with vncserver instances?

by hendryon 6/12/20, 4:14 AM

Not sure why you would use this over `ssh -Y`, so I guess it's for Windows users to experience the joy of the "Linux Desktop"?

MacOS sorely needs an RDP server though. VNC is an awful UX for me and idk why. Didn't start off that way.

by skee0083on 6/12/20, 12:52 AM

Wow. i'm glad i found this. I've been looking for a way to connect to my laptop running Ubuntu 20.04 from my desktop running windows 10. I tried a few other programs before but they weren't compatible with windows rdp.

by mehrdadnon 6/11/20, 8:53 PM

Does it support UDP?

by nunezon 6/11/20, 9:47 PM

xrdp is nice but i prefer rdesktop since it's more established