EDV:FreeNX/NX-2.1.0-on-dapper

From KIP Wiki
⧼kip-jumptonavigation⧽⧼kip-jumptosearch⧽

Vorbemerkungen

Damit die neueren NX-Clients von nomachine.com mit einer freenx-Installation funktionieren, muss man schon freenx 0.6.0 und die 2.1.0-backends von NX installieren.

FreeNX 0.6.0 wurde im Januar 2007 veröffentlicht.

Auf dieser Seite wird beschrieben, wie man diese Software installiert, indem man die Quellen holt und compiliert. Das ist sicher nicht bequem - funktionierte aber zumindest bei uns.

Alternative Möglichkeiten

ubuntu edgy

Laut http://opensource.dental-on-line.com/?page_id=23 kann man FreeNX 0.6.0 auf ubuntu edgy so installieren:

put “deb http://www.dentalonline.com/freenx/ ./†on /etc/apt/source.list
sudo apt-get update
sudo apt-get install freenx

d.h. http://www.dentalonline.com/freenx/ stellt die Pakete für ubuntu edgy zur Verfügung. ( Achtung: noch nicht bei uns getestet ! )

ubuntu feisty

Pakete für ubuntu feisty findet man unter http://seveas.imbrandon.com/dists/feisty-seveas/freenx/

Installation von FreeNX-0.6.0 mit NX-2.1.0-backend auf ubuntu 6.06 LTS

Jaah, das klingt abenteuerlich, das mit den Versionsnummern. Aber mit diesem Beispiel hat es halt mal geklappt. Andere Versionen mögen ähnlich funktionieren, hier kann man sich dafür etwas Inspiration holen.

Inzwischen habe ich die hier beschriebene Installation auch auf einem debian/etch System erfolgreich durchgeführt.

NX-2.1.0 - Quellen holen

mkdir /usr/NX
cd /usr/NX/
wget http://64.34.161.181/download/2.1.0/sources/nxproxy-2.1.0-3.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxcomp-2.1.0-8.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxcompext-2.1.0-5.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxssh-2.1.0-2.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxuexec-2.1.0-2.tar.gz 
wget http://64.34.161.181/download/2.1.0/sources/nxspool-2.1.0-3.tar.gz 
wget http://64.34.161.181/download/2.1.0/sources/nxsensor-2.1.0-2.tar.gz 
wget http://64.34.161.181/download/2.1.0/sources/nx-X11-2.1.0-3.tar.gz 
wget http://64.34.161.181/download/2.1.0/sources/nxwin-2.1.0-3.tar.gz 
wget http://64.34.161.181/download/2.1.0/sources/nxauth-2.1.0-2.tar.gz  
wget http://64.34.161.181/download/2.1.0/sources/nxviewer-2.1.0-12.tar.gz  
wget http://64.34.161.181/download/2.1.0/sources/nxdesktop-2.1.0-9.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxscripts-2.1.0-5.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxagent-2.1.0-18.tar.gz  
wget http://64.34.161.181/download/2.1.0/sources/nxesd-2.1.0-3.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxkill-2.1.0-2.tar.gz  
wget http://64.34.161.181/download/2.1.0/sources/nxbuilder-2.1.0-5.tar.gz
wget http://64.34.161.181/download/2.1.0/sources/nxservice-2.1.0-11.tar.gz 
wget http://64.34.161.181/download/2.1.0/sources/nxcompsh-2.1.0-3.tar.gz 

oder alternativ, wenn die oben genannten Quellen nicht mehr verfügbar sein sollten:

wget http://portal.kip.uni-heidelberg.de/nx/src/nx-2.1.0-all-sources.tgz
tar -xvzf nx-2.1.0-all-sources.tgz

Quellen compilieren

Dafür braucht man natürlich einen compiler und so weiter:

aptitude install make g++ gcc libjpeg62-dev libpng12-dev libssl-dev autoconf xorg-dev

Bei der Gelegenheit sollte man auch gleich noch ein paar weitere benötigte Pakete installieren:

aptitude install netcat expect smbfs
aptitude install icewm icewm-themes

Letzteres, wenn man die unten aufgeführte Konfiguration verwenden möchte

Jetzt packen wir die Quell-Pakete aus und compilieren:

cd /usr/NX 
find . -name "*tar.gz" -exec tar -zxf "{}" \;  
 
cd /usr/NX/nx-X11/
make World

Das dauert eine Weile. Wenn der Prozess mit einem Fehler abschliessen sollte, dann versuchen Sie anhand der Fehlermeldung herauszubekommen, welches Paket noch fehlt. Wenn Sie das Paket ausfindig gemacht und installiert haben sollten, wieder 'make World' eingeben.

Jetzt noch ein paar zusätzliche Programme, die nicht automatisch erzeugt werden:

nxdesktop : für Windows-Terminal-Sitzungen über NX. Es scheint sich dabei um ein modifiziertes rdesktop zu handeln.

cd /usr/NX/nxdesktop/
 ./configure 
 make
 cp doc/rdesktop.1 doc/nxdesktop.1
 make install

nxproxy : für 'weitergeleitete' NX-Sitzungen?

cd /usr/NX/nxproxy/
 ./configure 
 make  

nxviewer : für VNC-Sitzungen über NX.

cd /usr/NX/nxviewer

imake -I/usr/NX/nx-X11/config/cf/
cd libvncauth
imake -I/usr/NX/nx-X11/config/cf/
cd ../nxpasswd  
imake -I/usr/NX/nx-X11/config/cf/
ln -s /usr/NX/nx-X11/config .
cd ../nxviewer  
imake -I/usr/NX/nx-X11/config/cf/
ln -s /usr/NX/nx-X11/config .
cd ..
make

freenx-0.6.0

download

cd /usr/NX
wget http://download.berlios.de/freenx/freenx-0.6.0.tar.gz   
tar -xvzf freenx-0.6.0.tar.gz  
cd freenx-0.6.0
patch <gentoo-nomachine.diff
cd ..

installieren

Diese Beschreibung stammt im Wesentlichen aus dem README von freenx

NXPREFIX=/usr/NX
mkdir -p ${NXPREFIX}/lib ${NXPREFIX}/bin
cd ${NXPREFIX}

# Libraries
cp -a nx-X11/lib/X11/libX11.so* ${NXPREFIX}/lib
cp -a nx-X11/lib/Xext/libXext.so* ${NXPREFIX}/lib
cp -a nx-X11/lib/Xrender/libXrender.so* ${NXPREFIX}/lib
cp -a nxcomp/libXcomp.so* ${NXPREFIX}/lib
cp -a nxcompext/libXcompext.so* ${NXPREFIX}/lib

# binaries
cp -a nx-X11/programs/Xserver/nxagent ${NXPREFIX}/bin
cp -a nxproxy/nxproxy ${NXPREFIX}/bin
#cp -a nxdesktop/nxdesktop ${NXPREFIX}/bin
cp -a nxviewer/nxviewer/nxviewer ${NXPREFIX}/bin

# windows-keymaps for nxdesktop RDP-sessions and keyboard layout != us
cd nxdesktop
make installkeymaps

# scripts
cd ${NXPREFIX}
cp -a freenx*/nxnode ${NXPREFIX}/bin
cp -a freenx*/nxserver ${NXPREFIX}/bin
cp -a freenx*/nxsetup ${NXPREFIX}/bin
cp -a freenx*/nxkeygen ${NXPREFIX}/bin
cp -a freenx*/nxnode-login ${NXPREFIX}/bin
cp -a freenx*/nxloadconfig ${NXPREFIX}/bin
cp -a freenx*/nxprint ${NXPREFIX}/bin
cp -a freenx*/nxclient ${NXPREFIX}/bin
# config file

mkdir -p ${NXPREFIX}/etc/
cp -a freenx*/node.conf.sample ${NXPREFIX}/etc/
cp -a freenx*/node.conf.sample /etc/nxserver/
cd /usr/bin

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  
ln -s /usr/NX/bin/nxviewer nxviewer
ln -s /usr/NX/bin/nxagent nxagent

nxclient installieren

Das nxclient-Paket bekommt man unter http://www.nomachine.com/download-client-linux.php

dpkg -i nxclient_2.1.0-17_i386.deb

Konfiguration vorbereiten

/etc/nxserver/node.conf aus /etc/nxserver/node.conf.sample erzeugen. Ich selbst habe die folgenden Variablen hinzugefügt/gesetzt:

NOMACHINE_NX_HOME_DIR="/var/lib/nxserver/home"
NX_HOME_DIR="/var/lib/nxserver/home"
NX_SESS_DIR="/var/lib/nxserver/db"
DEFAULT_X_SESSION=/etc/X11/Xsession
COMMAND_START_KDE=/usr/bin/icewm-session
COMMAND_START_CDE=/usr/bin/icewm-session
COMMAND_XAUTH=/usr/bin/xauth
DEFAULT_FONT_PATH=$(echo $(grep -v '^ *#' /etc/X11/xorg.conf | grep FontPath | awk '{print $2}' | sed -r "s/^[\"']|[\"']$//g") | sed 's/ /,/g')
AGENT_EXTRA_OPTIONS_X=" -noshmem +kb -xkbdir /etc/X11/xkb -fp $DEFAULT_FONT_PATH"
APPLICATION_LIBRARY_PRELOAD="/usr/NX/lib/libX11.so.6.2:/usr/NX/lib/libXext.so.6.4:/usr/NX/lib/libXcomp.so.2:/usr/NX/lib/libXcompext.so.2:/usr/NX/lib/libXrender.so.1.2"

Manchmal muss man die Konfiguration unter /usr/NX/etc/ anbieten. Mit Hilfe von

ln -s /etc/nxserver/node.conf /usr/NX/etc/node.conf

werden beide Möglichkeiten angeboten.

Konfiguration prüfen

Sie können auf einfache Weise prüfen, ob die Konfiguration OK ist:

nxloadconfig --check

Wenn alles OK ist, dann gibt dieses Skript nichts aus. Im Fehlerfall wird aufgelistet, welche Variable falsch gesetzt ist oder welcher Dienst nicht verfügbar ist.

Das können Sie auch jederzeit später (z.B. nach einer Konfigurationsänderung) aufrufen.

Server initialisieren

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

Letzteres sollte diese Meldung hervorrufen:

# nxserver --status
NX> 100 NXSERVER - Version 1.5.0-60 OS (GPL)
NX> 110 NX Server is running
NX> 999 Bye

Sonstiges

mkdir /etc/X11/xserver
cp /usr/share/doc/examples/SecurityPolicy /etc/X11/xserver/

hmm. weiss nicht mehr, warum -- ist wahrscheinlich nicht nötig.

Aufräumen

Wenn Sie nach der Installation die Quelldateien nicht mehr benötigen:

cd /usr/NX
/bin/rm *.tgz *.tar.gz *.deb
/bin/rm /usr/NX/lib/libjpeg* /usr/NX/lib/libpng* /usr/NX/lib/libcrypto*
/bin/rm -rf freenx-0.* ./nx*