- Add the FreeNX team repo
sudo add-apt-repository ppa:freenx-team
- Install FreeNX
sudo apt-get update && sudo apt-get install freenx
- Apply Patch
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz && tar xvf nxsetup.tar.gz && sudo cp nxsetup /usr/lib/nx
- Setup NoMachine keys
sudo /usr/lib/nx/nxsetup --install --setup-nomachine-key
- Import public key for server
sudo cp /usr/NX/etc/keys/node.localhost.id_dsa.pub /tmp/node.localhost.id_pub.save
sudo /usr/NX/bin/nxnode --keyadd /tmp/node.localhost.id_pub.save
sudo nx:root /usr/NX/bin/nxserver --keygen
sudo chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2
sudo chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2
sudo mv /usr/NX/home/nx/.ssh/authorized_keys2 /usr/NX/home/nx/.ssh/autohriazed_keys --
- Add new user using useradd, then add this username to /etc/ssh/sshd_config under AllowedUsers (multiple usernames can be specified with spaces separating the names)
- check if the user is ableto login to NXServer bu uisng command
sudo /usr/NX/bin/nxserver --usercheck
- Add the following shell script to /usr/NX/bin/nxwrapper
#!/bin/bash
nxnode=${ps -o ppid= -p $PPID}
nxagent=${pgrep -p $nxnode -u $USER -x nxagent}
${1+"$@"}
exec kill $nxagent
- Import the key in /usr/NX/keys/rsa_id.pub.key on to client. use custom for desktop manager specify path to nxwrapper and specify startfluxbox