Novell Home

Installing the Latest (As of Oct 2005) FreeNX Server on Novell Linux products

Novell Cool Solutions: Feature
By Peter Van den Wildenbergh

Digg This - Slashdot This

Posted: 25 Oct 2005
 

License and Disclaimer

See http://www.opencontent.org/opl.shtml for the full software and documentation license. Basically, you can copy, redistribute, or modify this "how to," provided that modified versions, if redistributed, are also covered by the OpenContent License. Please e-mail a copy of your modified document to pvdw <@> criticalcontrol <.> com. Use this document at your own risk; it comes with no warranty. See the OpenContent License mentioned above.

Overview

This article describes the steps needed to install FreeNX 1.4.4 on a SLES 9 server or SUSE 9.x workstation from scratch. Although the procedure is only tested on both Novell distributions by the author, it should work on any other Linux distribution.

Warning: Once you used NX you'll NEVER GO BACK to VNC...
It is fast (compression and cache technology applied to the X protocol), allowing you to work remotely using a higher resolution,... and secure (it runs over SSH).

Prerequisites

  • computer with SUSE 9.x or SLES 9 installed and fully patched. If not done during the initial SUSE/SLES installation, install the C/C++ Compiler and Tools package now, using YaST – Install and remove software.
  • sshd must be running as a daemon on port 22.
  • basic Linux knowledge always helps; basics of vi (to add 1 line on the bottom of a file) and YaST to search for installed packages and install missing components are must haves.

0. Get started

Open up a command line shell as root.

  1. Download the sources from http://www.nomachine.com:
  2.   cd /usr
      mkdir NX
      cd NX/
      wget http://64.34.161.181/download/1.5.0/sources/nxproxy-1.5.0-9.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxcomp-1.5.0-65.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxcompext-1.5.0-16.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxssh-1.5.0-21.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxuexec-1.5.0-3.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxspool-1.5.0-2.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxsensor-1.5.0-5.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nx-X11-1.5.0-15.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxwin-1.5.0-6.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxauth-1.5.0-1.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxagent-1.5.0-93.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxviewer-1.5.0-14.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxdesktop-1.5.0-75.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxesd-1.5.0-3.tar.gz
      wget http://64.34.161.181/download/1.5.0/sources/nxscripts-1.5.0-11.tar.gz
  3. Unpack all the goodies at once:
  4. find . -name "*tar.gz" -exec tar -zxf {} \;
  5. Compile the nx sources:
  6.  cd /usr/NX/nx-X11/
     make World
    This may take a while, if   make World stops with an error it probably fails because it cannot find the necessary libraries, header files etc. Check for the exact error message and add the required package(s) by using YaST. (or apt-get, emerge,... depending on your distribution). On a typical SUSE 9.x or SLES 9 installation that does have the C/C++ you may want to check for the following packages that are required:
    libjpeg-devel
    openssl-devel
    netcat
    expect

    and, of course, it also depends on X (If you have a graphical environment than this is installed...)
    if you don't have a graphical environment why would you install FreeNX...?

    If it failed, try make World again. You can retry without manually removing earlier compiled nx sources, make World will cleanup previous attempts for you.

      cd /usr/NX/nxdesktop/
      ./configure 
      make
      make install
    
      cd ../nxproxy/
      ./configure 
      make
    
  7. Download and install the FreeNX scripts. Make sure netcat and expect are installed, FreeNX depends on it.
  8.   cd /usr/NX
      wget http://debian.tu-bs.de/knoppix/nx/freenx-0.4.4.tar.gz
      tar -zxf freenx-0.4.4.tar.gz 
      cd freenx-0.4.4/
      patch <gentoo-nomachine.diff 
      cd ..
  9. Putting things into place, create a lib and bin directory in /usr/NX. (The bin directory might be already there, created during the make install for nxdesktop)
  10. A geeky line to copy all the FreeNX executables towards /usr/NX/bin:

      find . -type f -perm +u+x -exec cp -a {} ./../bin/ \;

    Making sym-links in /usr/bin to the executable in /usr/NX/bin is not really needed but makes life easier...

      ln -s /usr/NX/bin/nxdesktop nxdesktop
      ln -s /usr/NX/bin/nxkeygen nxkeygen
      ln -s /usr/NX/bin/nxloadconfig nxloadconfig
      ln -s /usr/NX/bin/nxnode nxnode
      ln -s /usr/NX/bin/nxnode-login nxnode-login
      ln -s /usr/NX/bin/nxproxy nxproxy
      ln -s /usr/NX/bin/nxprint nxprint
      ln -s /usr/NX/bin/nxserver nxserver
      ln -s /usr/NX/bin/nxsetup nxsetup
      ln -s /usr/NX/bin/nxclient nxclient
  11. Finish up by creating a nx user, generating the famous ssh keys (50% of the questions about installing FreeNX on the FreeNX mailing list are 'ssh' related...) and starting the nx server. This sounds like a lot of work but is all done in one command:
  12.   nxsetup --install --uid 80 --gid 100
    Check if the server is running:
      nxserver --status
    Which should respond with:
      NX> 100 NXSERVER - Version 1.4.0-44 OS (GPL)
      NX> 110 NX Server is running
      NX> 999 Bye
  13. Allow FreeNX 1.4.4 to talk to a 1.5 client.
  14.   cd /usr/NX/etc/
      cp /usr/NX/freenx-0.4.4/node.conf.sample node.conf
      vi node.conf 
    At the bottom of the file, add:
      ENABLE_1_5_0_BACKEND="1"

    Whenever you change node.conf there is NO need to restart nxserver!

    If you don't have a user configured on the Linux nx-server you have to create one. (Testing with root will fail!)

      useradd -c "Peter Linux" -d "/home/peter" -g 100 -m -u 500 -s /bin/bash
    and set a password
      passwd peter
  15. Download and install a client.
  16. Go to http://www.nomachine.com/download.php and download a 1.5 NX Client for your client platform.
    The ssh client.id_dsa.key you need to copy to the client will be on the server in /usr/NX/home/nx/.ssh/client.id_dsa.key.

    Install the client, make sure you import the right key (during initial configuration) and login.

Note: Installing FreeNX on SUSE 10–
Compiling from source following the instructions above will fail, but...
SUSE 10 comes with a FreeNX rpm (Version 1.4.4)
After you installed the rpm :

  yast -i FreeNX-0.4.4-4.rpm
run
  nxsetup --install --uid 80 --gid 100

The adjustment to allow 1.5 clients is still needed.
You will find node.conf in /etc/nxserver/

With the rpm also the client.id_dsa.key changed location:
  /var/lib/nxserver/home/.ssh/client.id_dsa.key

Appendix

Additional Documentation Sources

Where it all begins:
http://www.nomachine.com

HOWTO setup FreeNX on Fedora:
http://fedoranews.org/contributors/rick_stout/freenx/
It is worth a read, especially the "Hints, tricks and other..." section

About the Author

Peter Van den Wildenbergh is a Senior Linux Administrator and a Linux advocate. He can be reached at: pvdw <@> criticalcontrol <.> com. CriticalControl Solutions is an IT solution provider based in Calgary, Alberta, Canada. For more info visit http://www.criticalcontrol.com.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell