Lampros - Weird Bricks

Step by Step instructions on setting up FreeNX on FreeBSD 8.1

15 March, 2011 | FreeBSD

For today I was thinking something a little different. 

How about we have a look in FreeNX ?

For those who don't know what FreeNX is, it is a free (open-source) implementation for a remote desktop, similar to TightVNC and to Remote Desktop in Windows.

The description from the FreeNX page summarizes it a lot better than I ever will:

"NX is an exciting new technology for remote display. It provides near local speed application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by NoMachine under the GPL. FreeNX is a GPL implementation of the NX Server and NX Client Components. "

Let's see how to setup this in FreeBSD using packages.

Prerequisites:


Server Side:
1. Start up FreeBSD and login as root
2. do a time pkg_add -r freenx (Note: X-Windows MUST be already set up).

This took about 19 seconds on my system!!

3. Do a cd /usr/local/NX/bin

4. ./nxsetup

5. Install the server – 'Do you want to abort now?' Press 'n' for 'no'

6. 'Do you want to use your own custom KeyPair?' Press 'n' for 'No'

You should get something like this

7. Add a user to FreeBSD. Type: echo lampros | pw useradd -n lampros -s /bin/csh -m -h 0

8. ./nxserver --status (to check if server is running)

Client Side:
On the Windows side now (Screens from Windows Vista), let's install the NX client and try it out.
Go to http://www.nomachine.com/download.php and download the 'NX Client for Windows'

Click on 'NX Client for Windows' again to download.

And again on 'Download package' to download

Save the file somewhere, e.g. On your desktop and double click to install
You should get something like this, click 'Next'

Take the default installation path, and click 'Next'

Take the default Shortcuts... click 'Next'

Leave the 'Create a desktop icon' ticked and click 'Next'

You'll see a summary of the installation, click 'Install' to continue

If all goes well, you should see this, just click 'Finish'

Double click on the Desktop shortcut of 'NX Client for Windows'

You'll get the NX Connection Wizard, click 'Next' to continue

You can put anything in the session – it's just an identifier. Host, is the IP address of the system you are connecting to, in my case 192.168.2.8 in my LAN. I'll also change the internet connection to LAN. Click 'Next' when done

In the next screen, leave the first field to 'Unix' and on the 2nd one, change it to 'Custom'. Then click on Settings...

Under 'Application', pick 'Run the following command' and enter /usr/X11R6/bin/icewm-session. Also make sure to select 'New virtual desktop' under Options. Then click 'OK'.

Now click 'Next' to continue, you'll get a summary of the configuration, leave the 'Create shortcut on desktop' and also tick 'Show the Advanced Configuration dialog' and then click 'Finish'

You'll be presented with the Advanced options for the connection. We just need one change here, make sure to change the Display under 'Display' as show in this screenshot:

Then click 'OK' to finish.

You'll get a question about saving your configuration - it is a good idea to do so. Tick 'Do not ask me anymore' and then click 'Yes'.

You'll be presented with the login screen. Use your username and password to login and just click on 'Login'.

If all goes well NX will try to connect and might prompt you to accept the SSH keys. This is normal and if it happens just click 'Yes', it will only ask you the first time.

This is what you should get upon a successful connection:

Note:Interestingly, you cannot close the window by clicking the red 'X'. You actually need to logout to close the session!