Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:
 
 

HOWTO setup Freenx on Fedora

by Rick Stout on Sep 15, 2004 (UPDATED 2006-07-13)

Introduction

Ever since I'd heard about NX, i was curious to see how it performed as a remote solution. I signed up for one of NOMACHINE's free test accounts, and was truly amazed by the performance of the connection. So here is the culmination of multiple sites worth of information, trial and error, and pure elbow grease, allowing the community to run Freenx. Once you've started using NX, you'll never go back to VNC.

Prerequisite: sshd must be running as a daemon on port 22 (This can be modified later.)

Let's do this...

The rpm takes care of the installation and setup, so there is no need to run "nxsetup".

Do this if you are running FC5:

# Make sure you are up-to-date
yum update

# Install FreeNX and all dependencies
yum install freenx

#SERVER SETUP IS DONE! The RPM takes care of the required setup.

Do this if you are running FC4 or earlier:

# Make sure you are up-to-date
yum update

# Install NX rpm dependencies
yum install expect nc

# Grab a Freenx package

# Use this package for FC2, FC3, FC4, and xorg based distributions
wget http://fedoranews.org/contributors/rick_stout/freenx/freenx-0.4.4-2.fdr.0.noarch.rpm

# Use this package for FC1, RH9, RHEL3 or XFree86 based distributions
# wget http://fedoranews.org/contributors/rick_stout/freenx/freenx-0.4.4-2.rh.0.noarch.rpm

# Next, grab an nx package

# This package was built on FC4
wget http://fedoranews.org/contributors/rick_stout/freenx/nx-1.5.0-4.FC4.1.i386.rpm

# This package was built on FC3
# wget http://fedoranews.org/contributors/rick_stout/freenx/nx-1.5.0-4.FC3.1.i386.rpm

# This package was built on FC2
# wget http://fedoranews.org/contributors/rick_stout/freenx/nx-1.5.0-4.FC2.1.i386.rpm

# Use this package if you are using FC1, RH9, RHEL3 or a Redhat compatible
# distribution using XFree86
# wget http://fedoranews.org/contributors/rick_stout/freenx/nx-1.5.0-4.FC1.1.i386.rpm


# Source rpm's
# wget http://fedoranews.org/contributors/rick_stout/freenx/freenx-0.4.4-2.fdr.0.src.rpm
# wget http://fedoranews.org/contributors/rick_stout/freenx/freenx-0.4.4-2.rh.0.src.rpm
# wget http://fedoranews.org/contributors/rick_stout/freenx/nx-1.5.0-4.FC4.1.src.rpm
# wget http://fedoranews.org/contributors/rick_stout/freenx/nx-1.5.0-4.FC1.1.src.rpm
# wget http://fedoranews.org/contributors/rick_stout/freenx/md5sum

# Install the RPM's
rpm -Uvh nx-1.5.0-4.FC4.1.i386.rpm
rpm -Uvh freenx-0.4.4-2.fdr.0.src.rpm

#SERVER SETUP IS DONE! The RPM takes care of the required setup.

It Needs a client too...

Next, download and install the NOMACHINE client on your client workstation. Using the 1.5.0 nx backend, you will need to use the 1.5.0 client from !M. I used the Win32 client (work computer to access home machine) from www.nomachine.org. Other platforms clients can be found here, as well as installation help. The most important part of the initial connection is the key file. This file, client.id_dsa.key, must be copied from the server and imported into the session of your client. Follow these steps to configure your client.

Enter a "Session" and "Host" name then click "Next".

Wizard Settings

Select "Unix", a Window Manager and a resolution. Make sure that "Enable SSL encryption on all traffic" is checked and click "Next". Check "Show the Advanced Configuration dialog" box and click "Finish".

Wizard Settings Wizard Settings

Click "Key...", "Import", Select the key file and click "Open". This file, client.id_dsa.key can be found on the server either in the

/etc/nxserver/

or

/var/lib/nxserver/home/.ssh/

directories. Click "Save", "Save" and "Ok".

Wizard Settings Wizard Settings
Wizard Settings

Note: If you created the connection icon, it will only prompt for username and password. Your first connection will give you an error about cache - This is normal. Voila! You're connected.

Hints, tricks and other...

Freenx is heavily dependent upon SSH. For testing purposes, you can use the client.id_dsa.key to ssh to your server as nx. You can copy this file to your client users .ssh directory. Replace {NXSERVER} with the name or ip address of your NX Server. For example, you should get something like this:
# This is to be done on the client machine, not the server
mv ~/.ssh/id_dsa ~/.ssh/id_dsa.bak
cp /usr/NX/share/client.id_dsa.key ~/.ssh/id_dsa
chmod 600 ~/.ssh/id_dsa
ssh nx@{NXSERVER}
HELLO NXSERVER - Version 1.4.0-02 OS_(GPL)
NX> 105 quit
quit
Quit
NX> 999 Bye
Connection to {NXSERVER} closed.
If you dont get a connection, use this guide to help you troubleshoot.

If you get an xkb error do this as root:(Thank you, Brad Sammut)
cd /usr/X11R6/lib/X11/xkb/rules
ln -sf xorg-it.lst xfree86-it.lst
ln -sf xorg.lst xfree86.lst
ln -sf xorg.xml xfree86.xml
# this last one may already exist
ln -sf xorg xfree86

There seems to be a bug in the handling of the gnome-session when "Gnome" is chosen for the window manager on FC3 and FC4.
If you are using Gnome, and you cannot get to your normal desktop, try selecting
1)'Unix' 2)'Custom' 3)'Settings' 4)'Run default X client script on server in the client configuration'.

General Tab Custom

Want some more information about freenx, in general? Try here or here.

If installing the Linux client from NoMachine gives an error looking for libXcomp.so.1.4.0-03, you can link it to an existing file:
ln -sf /usr/NX/lib/libXcomp.so.1.4.0 /usr/NX/lib/libXcomp.so.1.4.0-03
Freenx is extremely fast. You will be able to use much higher resolutions than previously used with VNC. Play around: You will be impressed.

Freenx does not need to be setup as a service or added to rc.local. NX uses no memory when not in use and you won't find it by doing a ps aux, because it is a shell that only runs when your client ssh's to your machine. By issuing:
/usr/bin/nxserver --stop
Freenx renames the authorized_keys2 file, making it impossible to logon as nx.

Suspend seems to work when resuming from the same client. Test it out, and let me know.

Uninstall? EASY!

# Remove the packages
rpm -e freenx nx
# The keys and configuration files are retained in /etc/nxserver

Problems? - If you email, i'll try to help as best I can.