Remote access with FreeNX in 5 steps
Sunday, 30 January 2005
NoMachine NX is a Terminal Server and remote access solution based on a comprising set of enterprise class open source technologies. NX makes it possible to run any graphical application on any operating system across any network connection at incredible speed.
FreeNX application/thin-client server is based on NoMachine’s NX technology. It can operate remote X11 sessions over 56k modem dialup links or anything better. FreeNX package contains a free (GPL) implementation of the nxserver component.
The following workshop describes the FreeNX installation on a Linux Mandrake server.

Added 10 March 2005:
Upgrade  freenx 0.2.7 to version 0.3.0  in  3 steps:

1. Stop current nx server and delete old version:

nxserver –stop
rpm –e  freenx-0.2.7 

2. Get the source rpm and rebuild it

Download source rpm from here:

rpmbuild --rebuild freenx-0.3.0-3mdk.src.rpm
cd /usr/src/RPM/RPMS/noarch/
rpm –i  freenx-0.3.0-3mdk.noarch.rpm

3. Repeat  step 4 (“Prepare first run”) according  to the article below.
-----------------------------------------------------------------------------------

In the workshop setup the NX server is running behind a firewall. You can access it from outside your environment (i.e. the Internet) via an analog or ISDN MODEM or from inside you LAN.

NOTE: Please make sure to configure your firewall correctly to allow SSH connections (Port 22) from both sides.

The workshop setup could look like this:

Workshop setup

Step 1: Download FreeNX

Please download the following rpm packages here:
http://downloads.mrball.net/Mandrake/10.1/RPMS/ 

freenx-0.2.7-2mdk
nxagent-1.4.0-1mdk
nxproxy-1.4.0-1mdk
libnxX11_0-1.4.0-1mdk
libxcomp1-1.4.0-1mdk
libxcompext1-1.4.0-1mdk

Step 2: Create a user called nx

useradd -u 500 -p "*" -s /usr/bin/nxserver nx

Step 3: Installation

Mandrake requires additional packages installed on your server. Please use your installation CD-ROM and install the following packages or use the Mandrake Control Center.

expect-8.4.5-6mdk
nc-1.10-18mdk
X11R6-contrib

If you have that done, we can install freenx. Please install (because of dependencies) the packages in the following order:

(libx)libaries – nxproxy –nxagent - freenx

…using the following command:

rpm –i package_to_install

Please watch for error messages and dependencies. If you need other packages you have not installed on your server, please go one step back and download or install it from CD-ROM.


Step 4 – Prepare first run

First of all we need to fix permissions on /var/lib/nxserver/nxhome/.ssh/authorized_keys2

Permissions need to be 640, otherwise you won't be able to connect and you'll receive error messages in /var/log/messages.

chmod 640 /var/lib/nxserver/nxhome/.ssh/ authorized_keys2

Now we'll need to copy the secure key that was generated onto the client machines so that your NX client can use it. The key on the server is located in "/var/lib/nxserver/nxhome/.ssh/client.id_dsa.key".

If you are using Linux on your client machines you will need to copy it to "/usr/NX/share/client.id_dsa.key" and chmod 644 it.

If you are using Windows on your client machines you will need to copy it to "C:Program FilesNX client for Windowsshare" on your client machine .

Next we add the NX capable user and setup a password for them.

NOTE: You have to make sure that you have valid users installed on you system before you create nx users. If not, create users with the following command first:

adduser user1
passwd user1

Add NX user like this:

/usr/bin/nxserver --adduser user1
/usr/bin/nxserver --passwd user1

Step 5 – Run freenx and use Linux or Windows clients to connect to your server

After the rpm package installation, freenx is already running. Start, stop and restart the service using the following commands:

nxserver --start: Start the nx server
nxserver --stop: Stop the nx server
nxserver --status: Show status of nx server
nxserver --restart: Restart the nx server and terminate all running sessions
nxserver --help: Show all options

Linux NX Client :

Please install the package nxclient-1.4.0-50 from your installation CD-ROM and run it from the console or download it first from here: http://www.nomachine.com/download.php 

Windows NX client :

Download the NoMachine NX client for Windows here and install it on your Windows box:
http://www.nomachine.com/download.php 

Add Host, Port and Desktop settings like this and login as a nx user you created in step 4.

At this point we should have everything on our FreeNX server setup and ready to test. It is now time to try connecting to your new FreeNX server. Good luck!

Download latest PDF version here.