FreeNX: My New Best Friend


FreeNX is the free open source version of NX software. It is a VNC like program that tunnels over SSH and has compression to run well and at high resolutions over even slow internet links. This program has many advantages over the VNC protocol. The biggest is security, it is built into the program from the ground up. All connections are encrypted and tunneled over SSH by default with FreeNX. FreeNX is also faster by a huge factor over VNC this is a real plus on slow connections.

I use FreeNX for remote server administration and also for troubleshooting network issues. It also allows me to use web applications remotely that I would not normally like to have on the open internet (think NTOP). It is basically a drop in replacement for VNC in most cases.

To install in Redhat EL 5.1 or CentOS 5.1 a simple yum install freenx is all that is required. Next step is to install a client version on the computer you want to connect from. I am using Ubuntu so all I had to do was visit and download the .deb file and install it.

Configuration can be a little tricky. First off you have to import the SSH key to the client machine. I just copied the /etc/nxserver/client.id_dsa.key file to the client machine and then imported into FreeNX. More information on configuration and importing a key can be found at

NX Connection WizardNX Connection WizardThe last snag the I ran into with FreeNX is that FreeNX expects a GNOME, KDE, CDE or XDM window manager. Since my servers do not run any of those environments I had to use the custom option to allow me to use XFCE. To do that I went to the NX client wizard and entered in the required information.
For the Desktop I choose the custom option. I then clicked settings off to the right.

In the settings dialog I chose the “Run the following command” radio button and in the box below I entered in “startxfce4” without the quotes.

FreeNX Custom SettingsFreeNX Custom Settings In the options box below I selected the “New virtual desktop” radio button. After clicking ok and saving the information all that was left was to enter my password and enjoy my fast and secure remote desktop.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

FreeNX on Servers that only allow key based ssh logins

To get FreeNX working with a server that only allows key based SSH logins you need to enable FreeNX internal authentication. To do that edit the file /etc/nxserver/node.conf and set ENABLE_PASSDB_AUTHENTICATION="1".

Then add the user that you want to allow to connect like this:
nxserver --adduser

Next add password for that user:
nxserver --passwd
then type the desired password
/-\ ndrew

Configuration Of XFCE

I did not do anything special to XFCE the NX client setup that I touched on is the only thing special that needs to be done. If I could figure out how to use images on this thing I would post some screen shots. I will take a look tomorrow and see if I can edit the article and add some screen shots to help understanding.

/-\ ndrew

fj40dan's picture

Any thoughts on posting the

Any thoughts on posting the config for xfce? I have almost exactly the same setup on 2 servers. I have wanted to try freenx for some time. If I use a desktop on a server it will almost always be xfce.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.