Archive for the 'Remote' Category

Remote X11 computing: VNC is great, but have you tried NX?

I work remotely on my Unix/Linux systems quite a lot. I had known VNC (for Windows and Unix hosts) before starting to use it extensively at work about four years ago. Main use case at work: I have a Windows machine at my desk, but there are plenty of nice Linux blades with a lot of compute power in the air conditioned IT room. Main use case at home: I can use my Linux desktop from the notebook (lap top!) on my lap, e.g. while watching TV, instead of sitting at the desktop machine’s monitor.

Recently (about a year ago), I discovered NoMachine‘s NX. I read about it and its concept of compressed X11, and liked it. When a package of the free derivate FreeNX, built from the open source packages released by NoMachine, appeared in Fedora Core’s Extras, I decided to actually try it. (NoMachine also provides free, non open source server packages.) I loaded the free Windows Client from NoMachine, and connected from my Windows XP laptop to the Linux desktop machine, like I used to do with VNC. There were some initial hiccups in the configuration (soon eliminated by newer packages from Fedora Extras), but it was a great experience. Though in a 100 MBit LAN, the responsiveness experience was greater than expected.

Soon, I tried the same thing from work to this said home desktop machine. I had to tunnel the connection through an HTTP proxy (I would have preferred SOCKS), but it worked out of the box as well! From work, the data travels around 1000 kilometers, and passes out of the corporate network at a proxy. My home machine was on 2000/192 DSL, and the performance of NX was amazing! Now, my home machine is on 16000/1024 DSL (at least theoretically), and performance is almost (almost!) native. Wow.

I do know that similar concepts to NX’s X11 compression have existed for quite some time, such as DXPC (Differential X Protocol Compressor) and LBX-Proxy (as mentioned in this article). Yet NX, provided to me as a package, does everything for me. Just start it up and go!

NX is not all better than VNC though. Let me give you a short rundown of pros and cons from my experience, off the top of my head:

  • NX pro: The NX client starts the server processes. There’s no need for you to initially log into your host, and start a VNC session from the command line. BTW, the same client also detects if there are already running sessions which you may want to connect to instead. And you don’t need to configure anything like a ~/.vnc/xstartup either.
  • NX pro : The NX client tunnels everything through SSH. This gives you:
    • guaranteed encryption – with VNC, you need to additionally set up an SSH tunnel (though I think there are tools which assist you in this);
    • integrated (additional) compression, though I don’t know if this is required additionally to NX’s internal X11 protocol compression;
    • good support for corporate networks which allow you only SSH (and of course HTTP) communication to the outside;
  • VNC pro: The client is extremely lean. Start up and connect times are amazingly slow on even weak PCs, interaction is excellent. FWIW, my VNC client (RealVNC BTW) was sometimes the only responsive Windows app when my machine was down with either or both CPU and I/O load. I could always resort to my VNC terminal session for real work. 🙂 Great!
    NX instead is a true X11 server on your client machine (watch for the server/client wording confusion here as always). On Windows, it’s a modified Cygwin (or XFree86?) server. It takes resources, not only for the basic X11 display, but also for decompression. It has a startup time. And initiating the session via SSH also always seems to take some time.
  • NX con: NoMachine’s NX Windows client seems to require some certain paths on the server side which are apparently hard-coded into the client! I’m trying to install the FreeNX server into non-standard locations on my work hosts (I don’t have root permissions obviously, and even if I did, I wouldn’t want to fiddle with the system), which is possible if you hack the build scripts enough (especially LD_LIBRARY_PATH and RPATH). Yet I can’t get the Windows client to speak with the server. And though FreeNX provides an open source client as well, that one isn’t for Windows (yet?). I haven’t bothered trying to compile it myself for Win though, shame on me.
  • NX con: Either NoMachine’s client or FreeNX needs OpenSSH for its SSH operation. If you use a different SSH implementation, e.g. the commercial one from F-Secure, it won’t work. (I think it’s because the NoMachine client uses OpenSSH, and requires the server to have it as well for certain features or config tricks.)

Go ahead, try NX – you’ll like it!