I love network computing, so I decided to improve it with a slice of Pi.

Given that I’m very familiar with RDP and use it routinely (I’m prone to set up sessions across the Atlantic Ocean to this Linode, where I keep a copy of the Android SDK and a few extra things that I can access from my iPad), I’ve been searching for a way to use it properly on the Raspberry Pi — i.e., speedily and with the minimum amount of hassle.

Raspbian includes rdesktop and a couple of other clients, but they all require X11 — which at this point in time lacks hardware acceleration and is more of a hindrance than help.

However, FreeRDP includes a DirectFB client that is almost completely functional and that is vastly more performant than anything using X11 on the Pi — and considering that RDP updates are essentially highly optimized bitmap transfers, accessing the frame buffer directly is probably faster than trying to run those updates by the GPU.

So even though it would be nice to have accelerated X, it likely won’t be as fast as DirectFB. The only thing that’s likely to be somewhat faster is a fully native OpenGL ES implementation, but I haven’t found one yet (I’d love to be proven wrong on this, though, for the sake of completeness).

Building the client

After digging around a bit, I came up with the following recipe for setting it up using the latest stable tarball as of this writing1:

If cmake fails along the way simply apt-get the required libraries. When you’re done, you’ll have a dfreerdp executable that you can invoke with something like:

dfreerdp -g 1920x1080 -f servername

Granting Permissions

However, nothing’s quite that simple. For starters, dfreerdp will need access to a number of system devices (like /dev/fb0), so you’ll have to run it as sudo until you grant access to all required devices2 via udev:

You can learn more about these settings by reading the man page, if you’re so inclined.

Running it

Some experimentation may be in order (especially regarding keymaps, that bane of every remote user), but I think you’ll find this to be speedier and pleasanter than other remote desktop solutions for the Raspberry Pi — I’m using it against a native xrdp server, and it’s good enough to scroll a full-screen web browser without hassle (and much, much faster than anything you could possibly run locally on the Pi).

As usual, lowering your resolution will make a very significant difference — I find 1280x720 to be almost as good as sitting at my server console, but prefer 1920x1080 for researching and coding.

Right now the only (minor) hassle I’ve come across is the lack of dynamic cursors in the DirectFB client, but I’m hoping the FreeRDP folk will eventually get around to it.

Judging from the Github repo, there were a few recent changes that add a bunch of dependencies — none of which we actually need for running the DirectFB client. Still, you might want to check out the build instructions just the same. ↩

Note that the pi user is already a member of the video group — so if you’re using another username, make sure you sudo usermod -a -G video username to add yourself to it. ↩