Tunneling X over SSH (covered in the previous chapter) is one good way to run a remote graphical desktop. Like everything else, the Linux world has several good variations on the same theme. In this chapter, we'll look at some more programs for running remote graphical desktops in different ways, such as cross-platform networking and remote helpdesk work. It's a lot easier to take control of a user's computer remotely and fix problems than to talk a poor user through a diagnosis and repair over the telephone. (I'm still puzzled at how anyone ever thought that was a good idea.)
The Linux world offers several ways to get a remote graphical desktop with decent performance, and across different platforms, especially Linux and Windows. In this chapter, we'll look at three different applications: rdesktop, FreeNX, and VNC.
rdesktop is a Linux client that uses the Remote Desktop Protocol (RDP) to connect to Windows Terminal Services on Windows NT/2000/2003 servers, and Remote Desktop Connection on Windows XP Pro. rdesktop can attach to an existing session or start a new one.
FreeNX runs graphical desktops over low-speed, high-latency connections (e.g., dial-up) at satisfying speeds. So far, it is for logging in to Linux boxes only, from Linux , Windows, Solaris, and Mac OS X clients. It has built-in encryption, and lets you configure any desktop or window manager to use for the remote session. It supports new independent X sessions only, so you cannot attach to an existing X session.
FreeNX has some rough edges. It requires the free-of-cost Linux client from NoMachine, which depends on some very old libraries. (The commercial NXServer uses the same client.) The client version and server version must match, which becomes a problem when NoMachine distributes only the latest clients, and you can't get updated FreeNX server packages. Once you get it up and running, the basic functions work fine, but selecting the desktop you want doesn't always work, and there are problems with file and printer sharing.
NoMachine also distributes a freebie NX server for Linux users, if you can't get the open source FreeNX working the way you want. Like the client, it also depends on some very old libraries that you will likely have to hunt down and install. When it works, it's fast, and the built-in encryption is nice.
In my opinion, VNC and its many derivatives are preferable. It's open source, very flexible, and it's well-maintained and reliable. Need encryption? Tunnel it over SSH.
Virtual Network Computing (VNC) is the grandmother of cross-platform remote desktops, and the most flexible. It comes in many variations, and supports most operating systems: Mac OS X, Linux , various Unixes, and Windows, so you can remotely log in to anything from anything. On Linux , you may create new independent login sessions, or attach to an existing X session with x11vnc. A unique VNC feature is controlling any two computers with a single keyboard and mouse.
VNC has been around long enough to spawn a host of knockoffs and forks. If reliability is what you're after, stick with the established, stable versions:
TightVNC (http://www.tightvnc.com/) is a fast fork of RealVNC. Runs well over slow connections, especially with the new DFMirage video driver for Windows.
RealVNC (http://www.realvnc.com/) offers good free and commercial versions.
UltraVNC (http://ultravnc.sourceforge.net/) is good for Windows-to-Windows remote administration. It has a number of Windows-specific tweaks, such as a mirror video driver similar to DFMirage, encryption, user monitoring, and the ability to log in as any user.
MSRC4 DSM plug-in (http://home.comcast.net/~msrc4plugin/) is an open source encryption plug-in for UltraVNC.
OS X VNC (http://www.redstonesoftware.com/VNC.html) is a VNC server for Mac OS X.
Chicken of the VNC (http://sourceforge.net/projects/cotvnc/) is a VNC viewer for Mac OS X. And a really bad pun.
Win2VNC (http://fredrik.hubbe.net/win2vnc.html) is a Windows VNC server for sharing a mouse and keyboard with a second PC.
x2vnc (http://fredrik.hubbe.net/x2vnc.html) is a Linux server for sharing a mouse and keyboard with a second PC.
x11vnc (http://www.karlrunge.com/x11vnc/) lets you attach to an existing X session, instead of starting a new one. This is great for roaming users who like to wander from PC to PC, and for remote helpdesk work.
There are a large number of VNC forks for other platforms. Here is a partial list:
VNC server for MorphOS: http://binaryriot.com/dreamolers/vncserver/
MorphVNC, VNC client for MorphOS: http://bigfoot.morphos-team.net/files/
TwinVNC, a VNC client for MorphOS and AmigaOS: http://twinvnc.free.fr/
J2ME VNC client for Java™-enabled cell phones: http://j2mevnc.sourceforge.net/
PocketPC VNCViewer VNC client: http://www.cs.utah.edu/~midgley/wince/vnc.html
PocketPC VNCServer and WindowsCE.NET server: http://www.pocketvnc.com/pocketVNC.aspx
PalmVNC Palm OS client: http://palmvnc2.free.fr/
Both KDE and Gnome come with remote desktop sharing built-in. On
KDE, it's called KDE Remote Desktop Connection; you can start it from the
command line with the krdc
command.
KRDC supports both VNC and RDP (Remote Desktop Protocol), the Windows
remote desktop sharing protocol.
Gnome's Remote Desktop Sharing is based on Vino, a VNC server for Gnome. It does not support RDP, just VNC. Both implementations are nicely done and easy to use.