Tuesday, June 29, 2010

NX client and server for RHEL

After having used numerous ssh sessions open from your windows PC to linux, you are going to appreciate the NX client and server. They are extremely fast and easy to set up. I followed the instructions on http://www.penlug.org/twiki/bin/view/Main/FreeNX for my RHEL 5 distributions.

Here are the quick steps. I am planning to set this up on all my boxes:

  1. Make sure what the release of RHEL or any other flavor of linux you are running is by typing the following command: cat /etc/*-release
  2. Get into a temporary folder where you can download all the binaries (e.g /tmp)
  3. Go to the Centos site to find the binaries for freenx, nx and expect which will work for you. After a bit of checking I found that CentOS release numbers are matched up with their RHEL counterparts, so I downloaded the packages for the CentOS 5.X releases:
    • wget http://mirror.centos.org/centos/5/extras/i386/RPMS/freenx-0.7.3-4.el5.centos.i386.rpm
    • wget whttp://mirror.centos.org/centos/5/extras/i386/RPMS/nx-3.4.0-4.el5.centos.i386.rpm
  4. Now install these rpms as follows:
    • rpm -Uvh nx-3.4.0-4.el5.centos.i386.rpm
    • rpm -Uvh freenx-0.7.3-4.el5.centos.i386.rpm
  5. This may tell you that you need expect. So download and install it as well
    • wget http://mirror.centos.org/centos/5/os/i386/CentOS/expect-5.43.0-5.1.i386.rpm
    • rpm -Uvh expect-5.43.0-5.1.i386.rpm
You are now done with the server side. Now download the client from http://www.nomachine.com/download.php. The client requires some set up. You can pick any name for the session. If it fails to connect to the server, you need to check if you disabled encryption - it may be trying to connect to ports which are not open on your linux box. So enable encryption. Also root account works in case you have that question! Also you must remember to copy paste the client key from the server as the link above notes in the client. The windows client comes coded with some default key which doesnt work.

Note: The client key is located on the server at:
and I found most of the other dependencies for RHEL 5 here (for some reason my yum update wouldnt work): 
Ciao and enjoy!