Saturday, May 4, 2013

Using a Raspberry Pi as a Thin Client for RDP/RemoteFX/VMWare View or Citrix

There is a cool project by Gibbio at blogger that uses Debian Linux as a base turn the Raspberry Pi into a thin client that works with RDP, VMWare View, Citrix, OpenNX, and Spice. After imaging your SD card you can plug and go. I've tested it with RDP complete with RemoteFX, and it works well with a few caveats which I'll note below.

Let's Set it Up

If you're on Linux, skip to step 6. Download DD for windows from here.

Unpack DD to a working directory and make note of where it is; we'll be using it in a moment.

Insert your SD card and wipe out all partitions on it. I'll assume you know how for Linux; in Windows use Diskpart: Diskpart (Enter), List Disk (Enter), Select Disk X (Enter), List Partition (Enter), Select Partition X (Enter), Delete Partition (Enter). Repeat list, select, delete for each partition on the SD card then Exit (Enter). Make sure you don't execute this sequence on any other drives or you will loose all your data!

Image the drive using DD: dd bs=1M if=c:\temp\RPi-TC_ARMv6j_r1.img od=d: WHERE: c:\temp\RPi... = the image location and od=d: references the location of the SD card. Update: If you have issues with dd, give Roadkill's disk imager a try.

Remove the SD card (properly) and insert it into the Raspberry Pi

Start it the Pi.

Using RDP

Once the Pi Boots (Note that boot animation) you'll see a bunch of icons on the desktop. To connect to an RDP session, do the following:

Double click on X2Go Client

Click the "New Session" button in the upper left corner.

Name the session, enter the host (make sure the host name corresponds to the cert CN)

Click the "Settings" tab and change the Display to the desired resolution. (Fullscreen works) Note that I haven't been able to get xfreerdp to work yet but rdesktop is working.

Click "OK"

Click the newly created session and then enter in your password.

Enjoy your RDP session! If you selected Fullscreen, note that the kb combo to go back to a window is CTRL+ALT+ENTER

RDP Notes:

As of now it seems that NLA is not supported, though I'm looking into it. To disable NLA uncheck the box labled "Allow connections only from computers running Remote Desktop with Network Level Authentication" in the "Remote" tab of the advanced system properties dialog of the machine you're connecting to.

RemoteFX works, but it is actually slower than standard RDP. I'm looking into this too.

Misc Notes:

I haven't tried the other clients yet, though I can report success using the VMWare view client direct from a friend.

The Raspberry Pi has issues with some mice. If your mouse seems unresponsive try a different model.

The newest build uses a tweaked kernel. Though I haven't needed to, you can switch back to the standard Raspberry Pi kernel by changing the line kernel=kernel.img to kernel=kernel-std.img in /boot/config.txt and rebooting. Debian comes with Vi and Nano that you can use to modify it.

Overall this is a interesting project that has been alot of fun to play around with. As always if you have any questions or comments throw them in the comments section!

Update: I'm getting quite a few hits on this one and I just want to underscore before it is proposed in production at your company that it's not quite ready for prime time yet due to the issues listed above. I look forward to helping drive it there though; I intend on updating as I drive towards tweaking RDP to be perform better.

And more importantly, there is a new build posted here! Note Remmina isn't working yet but Gibbio is working on it.

Update 6/27: Gibbio has posted a new build that looks quite interesting. Among other things he has provided the XFCE desktop environment.

Update 7/1: The newest build works fine with xfreerdp which seems to perform a bit better than rdesktop. To use it, either launch from a terminal or create a shortcut with the following syntax:

Where: /v: is the target machine, /u: is the username to use, /p:is that user's password, /d:is the domain in which the user resides, /f is for fullscreen mode (if desired) and /cert-ignore is to ignore an untrusted cert, which is likely if you're using the default self-signed certs. For the rest of the options, see the wiki page.

11 comments:

Thanks Kroeger; I'm glad you enjoy the animation... I didn't create it, I only wrote this article about setting it up. The package has been put together by Gibbio. That boot animation is amazing; almost worth the price of admission alone.

I notice that there is an XFreeRDP example shortcut on the desktop, but no matter what I try, it seems I cannot use XFReeRDP to make a connection to any servers I have - either directly nor through RDP Gateway as every time, there's an SSL protocol error.

Have you looked at the certificate name associated with the RDP host? By default FreeRDP enforces host->published host name matching and is even case sensitive with its enforcement. This means if your server is named SerVer01.mynetwork.local and your connection points to Server01.mynetwork.local it will fail with an SSL error because the cert name does not match the host name.

Hopefully that's your issue... if not feel free to follow up and we'll get to the bottom of it. Thanks for reading!

I'm a bit confused about what you're trying to do but I'll address both possibilities. If you're hoping multiple users can use the Raspberry Pi at one time, that really won't be possible because the Pi doesn't have enough power to host multiple sessions that require any real processing power. If you're talking about multiple Pis accessing a single server, you would need to ensure you're setup and licensed correctly on that server. For example, you would need TS Licensing for Windows servers if that's what you're trying to access. Good luck!

RDP Thin clients are cost effective and alternative to PC’s. It largely depends on host computer to fulfill its computational roles. It improves maintenance and security due to central administration of the hardware and software in the servers.