How to install FreeNX on Suse 10.0?
Tuesday, 01 November 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 Suse 10.0 server.
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.
You also need to allow inbound traffic TCP to port 5000.

The workshop setup could look like this:

FreeNX.gif





Step 1: Install Suse 10.0 with FreeNX support

 Please download Suse 10.0 here:

http://mirrors.kernel.org/ (California, San Francisco)
ftp://mirror.colorado.edu/ (Colorado, Boulder)
ftp://ftp.cise.ufl.edu/ (Florida, Gainesville)
ftp://ftp.belnet.be/ (Brussels)
ftp://sunsite.informatik.rwth-aachen.de/ (Aachen)
ftp://ftp.uni-kassel.de/ (Kassel)
ftp://klid.dk/ (Kopenhagen)


Install the default version and follow the instruction. Prepare the network settings like explained in the documentation. If you have problems, please find here a detailed description about the steps to be taken to setup a SUSE 9.3 based server:

http://www.howtoforge.com/perfect_setup_suse_9.3 

To install FreeNX use SUSE Control Center (YAST2)- Software – Installation and search for the following packages:

FreeNX (Version 0.4.4-4)
knx (0.1-15)


Yast.gif

Freenx requires the “expect” and “tcl” packages and YAST2 will automatically ask you to install them:

Yast_ab.gif


Step 2: Get SSH running on the server
 

80% of the authorization problems are ssh related. So please make sure that you are  able to login to the server using a valid username. I recommend sing PuttY to connect to the ssh server.

Download it here:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

If you have problems accessing the ssh server, make sure that the sever is really running and configured properly.Start the server as  root:

/etc/init.d/sshd start   Check the configuration editing the following file:

 /etc/ssh/sshd_config

 Enable the HostKey files like this.

ssh.gif

 Additionally make sure to add the client machines to the server’s /etc/hosts file.



Step 3 – Prepare first run and check file permissions
 

First of all you need to setup nx for your needs. It should normally work  for the most distributions like this:

nxsetup --install --setup-nomachine-key --clean --purge

Additionally we need to check permissions on /var/lib/nxserver/home/.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/home/.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/home/.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 Files\NX client for Windows\share\

on your client machine. I’m using WinSCP to get this done. Just connet to the server as root and and drag and drop the file client.id_dsa.key from right to left.

winscp.gif



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

Please make sure that sshd is running:

/etc/init.d/sshd status
/etc/init.d/sshd start
/etc/init.d/sshd stop
/etc/init.d/sshd restart

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

nxserver --start: Starts the nx server
nxserver --stop: Stops the nx server
nxserver --status: Shows status of nx server
nxserver --restart: Restarts the nx server and terminate all running sessions
nxserver --help: Shows all options

Linux NX Client:
Please download it from here and install it on your Linux client:
http://www.nomachine.com/download_client_linux.php

or use the kNX client we have installed in Step 1.

knx.gif

Windows NX client:
Download the NoMachine NX client for Windows here and install it on your Windows box:
http://www.nomachine.com/download_fil2.php?Prod_Id=16

winclient1.jpg

winclient2.jpg

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. Please keep in mind that the username you are using to login to your Freenx server, is an accessible user created on the server. Good luck!

Download workshop in pdf format here.


Comments:

Andries van der Leij

I could't find the key on the server which must be copied to the client and thought I was doing something wrong. I found out that if you use the argument: --setup-nomachine-key no such key is generated and the default nomachine key will be used:

from http://fedoranews.org/contributors/rick_stout/freenx/freenx.txt

/usr/bin/nxsetup

This script will setup the configuration directory, the "nx" user account,
its home directory and DSA keys, and user loopback DSA keys. By default and
for security reasons, unique DSA keys are generated by nxkeygen. It is also
possible to use the key from !M. To setup this key, do the following:

/usr/bin/nxsetup --setup-nomachine-key

If you choose this method, please read the security section for possible
issues.


maybe it is my lack of experience, but it took me a while to figure this out. I got it running now so thanks! hope this will help some other linux newbie...