Remote X desktop on CentOS with FreeNX
NXServer and NXClient from NoMachine is a great way to run a remote desktop that is low on resources and very fast due to its use of compression. It also has the feature of storing your X sessions so when you log back to them later they are unchanged.
The procedure for installing this on Fedora or other Redhat based distros will be similar, but I only tested this on CentOS 4. It's also possible do on Debian, Ubuntu or any other Linux system for that matter, but that is not covered here.
Server Side Configuration
First check to see if the centos extras repository is enabled for yum. Open up /etc/yum.repos.d/CentOS-Base.repo and under the [extras] section, change enabled=0 to enabled=1 if it is not already done. While you are at it you may also want to do the same for [centosplus] and [contrib] to give you access to even more packages.
Install the "freenx" package with "yum install -y freenx".
For a KDE desktop, do "yum install -y kdebase".
For Gnome, do "yum install -y gnome-session".
Copy /etc/nxserver/node.conf.sample to /etc/nxserver/node.conf. The defaults should be sufficient so don't worry about making changes to it.
Create a new ssh key and copy it to /ect/nxserver/client.id_dsa.key. To create this key, do "ssh-keygen -t dsa -N '' -f client.id_dsa.key".
Client Side Configuration
Go to http://www.nomachine.com/download.php and download the NX Client. It is available for Windows, Linux, Mac OS X, and Solaris. Install it as you would any software for your OS. For Windows you will also want to install the nxfonts addon downloads.
Copy client.id_dsa.key from your server over to your local machine.
When you start up NX Client you will get a login window. Click the configure button to the lower left. Enter the hostname of your server and click the Key button. Paste in the contents of client.id_dsa.key. Choose your desktop type (KDE or Gnome) and your network speed, then click OK.
Now you will be returned to the login window, so click Login, and within a few seconds your remote desktop will be started.
If you want to disconnect from your session without logging out, start up the NX Session Administrator, right click on your session and choose Disconnect. This way your session is saved and you can come back to it later by logging in as before.