From LQWiki
Jump to: navigation, search

NX aims at providing stateful desktop sessions, similar to VNC, but with sound and requiring much less bandwidth. One NX implementation is FreeNX.

Install NX as an application

As a first step, create a connection from your local computer to your local computer, just to make sure it works:

rpm -ivh nx*.rpm
  • Start NX as root:
nxserver --start
  • Verify as user root that the NX server is active
nxserver --status
  • Connect to the NX server
nxclient --wizard

Continue as advised.

Now, to connect from a remote host, open the 500# ports in your target host's firewall. If you do not know how to do this, you can also shut down the firewall.

Install NX as display manager

Maybe you have a very old computer and want to make it a thin client to a faster one (the faster one acting as terminal server). Then you want the old computer to display the NX client program right after startup, without a user having to log in. So you want Nx to be your display manager. Here are some changes I did to /etc/init.d/xdm to make this happen:

case "$1" in
        X &
        export DISPLAY=:0
        while true; do sleep 9; done

Tweaking NX

Almost everything is very fast and low-latency with NX. However, Window resizing effects are slow. Switch them off, e.g. in KDE using kpersonalizer:

kpersonalizer -> chose Next till you come to the Eyecandy-O-Meter -> Show details -> Window Moving/Resizing Effects


In order to run KDE 4 in an NX session, you may need to change the call startkde to startkde4 in /usr/NX/etc/node.cfg and /usr/NX/scripts/setup/nxnode. This is the case if your KDE is started with the command startkde4.


not available

If you get an error message that NX is not available or has been disabled, re-install it:

/usr/NX/bin/nxserver --uninstall
/usr/NX/bin/nxserver --install

maximum session number exceeded

List your user sessions with

nxkill --list

Then kill them.

no sessions are active

enable users

If you cannot log in to the NX server and get an error message like

maximum session number exceeded


nxkill --list 

shows you there are no active user sessions, this can be the case because your user is not enabled to log in. To find out if your user is enabled to log in, use

nxserver --userlist

You will be able to log in with all users that are shown then.

Re-install NX

If no sessions are shown, you will have to re-install NX:

/usr/NX/bin/nxserver --uninstall
/usr/NX/bin/nxserver --install

See also