||<>|| 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 is now quite easy: == Server == === Installation === 1. Launch Ubuntu desktop or the server edition and install ubuntu-desktop {{{ sudo aptitude install ubuntu-desktop }}} 1. Download the Nomachine NX packages for Ubuntu (http://www.nomachine.com/download) (versions as of 2011-07-25) {{{ wget http://64.34.161.181/download/3.5.0/Linux/nxclient_3.5.0-7_i386.deb wget http://64.34.161.181/download/3.5.0/Linux/nxnode_3.5.0-3_i386.deb wget http://64.34.161.181/download/3.5.0/Linux/FE/nxserver_3.5.0-4_i386.deb }}} 1. Install the packages all at the same time: client, node, server {{{ sudo dpkg -i nxnode_3.5.0-3_i386.deb nxserver_3.5.0-4_i386.deb nxclient_3.5.0-7_i386.deb }}} === Security === By default, the SSH key is a shared key amongst all NX clients. This is OK, but if you want added security, generate your own unique key as follows. (!) Caveat: You'll have to modify your NX client wherever you're connecting from to use the custom key. 1. Import localhost key {{{ sudo cp /usr/NX/etc/keys/node.localhost.id_dsa.pub /tmp/node.localhost.id_dsa.pub.save sudo /usr/NX/bin/nxnode --keyadd /tmp/node.localhost.id_dsa.pub.save }}} (!) WARNING: Don't directly import the file /usr/NX/etc/keys node.localhost.id_dsa.pub. First copy it, otherwise it will be deleted after the importation). 1. Regenerate new SSH key for NX user as the default is common for all others {{{ sudo /usr/NX/bin/nxserver --keygen }}} 1. Change the owner of the nx user public key on the server {{{ sudo chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2 }}} 1. If you are going to use it with e.g. [[http://aws.amazon.com/ec2|Amazon ec2]], then NX's hard link between authorized_keys2 and the default.id_dsa.key will create problems when bundling AMIs. {{{ sudo cp /usr/NX/home/nx/.ssh/authorized_keys2 /usr/NX/home/nx/.ssh/authorized_keys2.tmp sudo rm /usr/NX/home/nx/.ssh/authorized_keys2 sudo cp /usr/NX/home/nx/.ssh/authorized_keys2.tmp /usr/NX/home/nx/.ssh/authorized_keys2 }}} 1. Check that the name conforms to the filename given in the /etc/ssh/sshd_config file. With the default Ubuntu SSH setting this is not neccessary, but someone might have changed it to e.g.: {{{authorized_keys}}} {{{ sudo chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2 sudo mv /usr/NX/home/nx/.ssh/authorized_keys2 /usr/NX/home/nx/.ssh/authorized_keys -- }}} === Additional Potential Steps for Consideration === ==== SSH Password Login ==== 1. You might need to enable password login into SSH. We can do this by editing SSH configuration: {{{ sudo vi /etc/ssh/sshd_config }}} 1. Configure the following values: {{{ PasswordAuthentication yes UsePam yes }}} ==== SSH Allow NX ==== 1. If you have restricted SSH with {{{AllowUsers}}} you need to add {{{nx}}} to the list: {{{ AllowUsers nx ''youruser''' }}} 1. It may be necessary to remove a line in SSH's your known host file for your user on the server, or remove it all together(reset it): {{{ sudo rm /home/$USER/.ssh/known_hosts }}} 1. Restart services {{{ sudo /etc/init.d/ssh restart sudo /etc/init.d/nxserver restart }}} 1. Check if your user will work: {{{ sudo /usr/NX/bin/nxserver --usercheck ''youruser'' }}} == Client == 1. Install the client on your local machine. 1. Start it either via {{{Applications/Internet/NX Client for Linux/NX Connection Wizard}}} or via cmd line; {{{ /usr/NX/bin/nxclient --wizard & }}} 1. Enter the hostname and so on till you get prompted for login. 1. Enter your username and password. 1. Import the new nx key by: 1. Downloading the new DSA key from the server:{{{ scp ''SERVERNAME'':/usr/NX/share/keys/default.id_dsa.key \ ''SERVERNAME''.id_dsa.key }}} 1. Then click on ''Configure...'', then ''Key'' under ''General'' and then on ''Import''. 1. Find the file {{{''SERVERNAME''.id_dsa.key}}} and click save, save then Ok. 1. Login should now hopefully work.... References: * http://soniahamilton.wordpress.com/2008/01/29/howto-setup-nomachinenx-on-ubuntu/ * http://alestic.com/2009/11/ec2-karmic-desktop