Found something useful? Don't forget to leave a comment!

Wednesday, April 7, 2010

NX: Linux Remote Desktop Access Done Right

Being able to access a computer remotely is becoming a more and more useful feature these days. This is especially true for headless servers and virtual machines, where local/direct access is often not an option. Windows machines (at least the non-home versions have the option of using Remote Desktop, which is a solid and reasonably fast solution. VNC is an option for both Windows and Linux, but it tends to be slow and inefficient as it runs through the framebuffer and is bitmap-based.

I was recently setting up an Ubuntu 9.10 VM for academic programming purposes. Since my (Windows-based) laptop, a four-year-old Dell, is a little underpowered, my plan was to connect to this VM remotely to do all my work. Sure, I could do X forwarding through SSH + PuTTY + Xming or something, but that tends to be somewhat cumbersome, especially when a full desktop is desired. I did try Ubuntu’s VNC-based Remote Desktop feature – it works fine, especially considering the fact that everything was being sent/received over a wireless network. But there was still a bit of lag and window tearing. I wanted something that could really push the envelope of remote computing. A bit of internet research indicated that NX is the king of remote-access technology for Linux, and after field-testing it on my VM and laptop I must say that I would totally agree. Not only is NX speedy, it also provides SSH-based connection security – something VNC can’t do on its own.

Installing and Configuring the NX Server on Ubuntu

An excellent official guide to setting up the open-source FreeNX server software can be found here. The instructions work well for the latest version of Ubuntu at the time of this writing, 9.10.

Installing and Configuring the NX Client on Windows

The preferred client is provided by NoMachine. The setup package can be downloaded here. The latest version at this time is 3.4.0-7.

After running the install, you can create a new connection profile by running the NX Connection Wizard. The questions are fairly straightforward – give your session a name, supply the server hostname, etc. For Ubuntu you want to use the Unix connection type. Set the desktop to GNOME or KDE if you have it installed. One of the nice things about NX is that it can dynamically set up the resolution. You can choose fullscreen or a specific resolution. Note that if fullscreen is used, you will still be able to ALT+TAB out of the NX window if you want to go back to your Windows desktop/programs for a bit.

Once a profile has been created, you can just use the NX Client for Windows shortcut. Type in your username + password (same as your local Linux credentials), wait a few seconds, and boom! Your Linux desktop in all its glory should appear. The claim that NX can achieve near-local-speed responsiveness is certainly not a joke, as I’m sure most users of it would agree.


No comments: