Beware that the following packages are not free but if you're facing problems with the freeNX packages, it may be a good solution
Setting up Nomachine NX packages on Ubuntu
Download the Nomachine NX packages for Ubuntu (http://www.nomachine.com/download)
- Install the packages in this order: client, node, server
- Make a copy of the key (if you import it directly, it'll be deleted)
cp /usr/NX/etc/keys/node.localhost.id_dsa.pub ~/tmp/node.localhost.id_dsa.pub.save
- Import the copied key:
cd /usr/NX/bin; ./nxnode --keyadd ~/tmp/node.localhost.id_dsa.pub.save
- /usr/NX/bin/nxserver --keygen
- import the new private DSA key (/usr/NX/share/keys/default.id_dsa.key) in the desktop client
- Change the owners of the nx user public keys on the server
chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2 chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2
- Fix the name if it's different from the one in /etc/ssh/sshd_config:
mv /usr/NX/home/nx/.ssh/authorized_keys2 /usr/NX/home/nx/.ssh/authorized_keys
