1 AUTHOR: Jaap Struyk <japie@deserver.nl>
5 LICENSE: GPL, MIT/X11 for X11 bits
7 SYNOPSIS: Setup an FreeNX server on a (H)LFS system.
9 DESCRIPTION: Setup a secure remote X-window connection using FreeNX and
12 SYSTEM: x86, 32bit, 2.6 kernel, Glibc-2.3.x.
17 --> http://expat.sourceforge.net/
20 --> http://www.68k.org/~michael/audiofile
23 --> http://www.openssl.org
26 --> http://www.ijg.org
29 --> http://www.libpng.org/pub/png/libpng.html
32 --> http://www.xfree86.org
36 --> http://www.openssh.com
37 You need to have sshd setup listening on your external and loopback
41 --> http://netcat.sourceforge.net
44 --> http://expect.nist.gov
47 --> http://www.cpan.org
52 --> http://www.nomachine.com/sources.php
54 nx-X11-1.5.0-21.tar.gz
55 nxagent-1.5.0-112.tar.gz
56 nxcomp-1.5.0-80.tar.gz
57 nxcompext-1.5.0-20.tar.gz
58 nxdesktop-1.5.0-78.tar.gz
59 nxproxy-1.5.0-9.tar.gz
60 nxscripts-1.5.0-11.tar.gz
61 nxviewer-1.5.0-15.tar.gz
64 --> http://freenx.berlios.de
66 http://debian.tu-bs.de/knoppix/nx/freenx-0.4.4.tar.gz
68 http://www.iem.pw.edu.pl/ftp/distfiles/freenx-0.4.4.tar.gz
70 * Latest version of this hint available at
72 http://www.linuxfromscratch.org/hints/downloads/files/freenx.txt
74 http://www.japie.deserver.nl/ftp/HLFS/freenx.hint
78 * Patch for the NX packages
81 http://www.linuxfromscratch.org/hints/downloads/attachments/freenx/NX-lfs_hint.diff
83 http://www.japie.deserver.nl/ftp/HLFS/NX-lfs_hint.diff
88 http://www.linuxfromscratch.org/hints/downloads/attachments/freenx/freenx-lfs_hint.diff
90 http://www.japie.deserver.nl/ftp/HLFS/freenx-lfs_hint.diff
108 This is a proper and secure way to setup a thin client system on a linux
110 In comparison to a standard remote X session it's very fast and is even
112 on bandwiths off 40k (ISDN).
113 You can use any X-window manager, kde, gnome whatever.
114 As server U can use any configuration, but since that machine will do
116 part and the encryption I would suggest 1Ghz. 512Mb. for several users.
117 (that's a personal opinion)
123 # start with unpacking all the tar.gz files...
124 find . -name "*tar.gz" -exec tar -zxf {} \;
127 # apply the NX patch...
128 patch -p0 < NX-lfs_hint.diff
130 # modify the configure scripts...
131 perl -pi -e"s|CXXFLAGS=.-O.*|CXXFLAGS=\"$CXXFLAGS\"|" */configure
133 # build X11 Support Libraries and Agents...
138 # build Proxy Library...
140 ./configure --prefix=/srv/NX
147 cp -a /usr/X11R6/lib/libXp.so* ../nx-X11/exports/lib/
153 ./configure --prefix=/srv/NX --sharedir=/srv/NX/share
157 # create some directory's...
160 mkdir -p /srv/NX/man/man1
161 mkdir -p /srv/NX/share/doc
163 # install X11 Support Libraries and Agents...
164 cp -a nx-X11/lib/X11/libX11.so.* nx-X11/lib/Xext/libXext.so.*
165 nx-X11/lib/Xrender/libXrender.so.* /srv/NX/lib
166 install -m 755 nx-X11/programs/Xserver/nxagent /srv/NX/lib
168 # create a custom nxagent script that handles all programs...
169 cat > nxagent << "EOF"
172 NXCOMMAND=$(basename $0)
174 export LD_LIBRARY_PATH=/srv/NX/lib:$LD_LIBRARY_PATH
175 exec /srv/NX/lib/$NXCOMMAND ${1+"$@"}
178 # install that script...
179 install -m 755 nxagent /srv/NX/bin
181 # install Compression Libraries and Proxy...
182 cp -a nxcomp/libXcomp.so.* /srv/NX/lib
183 cp -a nxcompext/libXcompext.so.* /srv/NX/lib
184 install -m 755 nxproxy/nxproxy /srv/NX/lib
185 ln -snf nxagent /srv/NX/bin/nxproxy
187 # install RFB Agent...
189 make install DESTDIR=/srv/NX
190 mv /srv/NX/usr/X11R6/bin/nxviewer /srv/NX/lib
191 ln -snf nxagent /srv/NX/bin/nxviewer
192 chmod 755 /srv/NX/bin/nxviewer
193 mv /srv/NX/usr/X11R6/bin/nxpasswd /srv/NX/bin
196 # install RDP Agent...
199 mv /srv/NX/bin/nxdesktop /srv/NX/lib
200 ln -snf nxagent /srv/NX/bin/nxdesktop
201 chmod 755 /srv/NX/bin/nxdesktop
206 cp -r nxscripts /srv/NX/share/doc
211 mkdir -p /srv/NX/var/db
212 mkdir -p /srv/NX/home
213 mkdir -p /srv/NX/home/nx
215 # apply the freenx patch...
216 patch -p0 < ../freenx-lfs_hint.diff
217 cp -a nxnode /srv/NX/bin
218 cp -a nxserver /srv/NX/bin
219 cp -a nxsetup /srv/NX/bin
220 cp -a nxkeygen /srv/NX/bin
221 cp -a nxnode-login /srv/NX/bin
222 cp -a nxloadconfig /srv/NX/bin
223 cp -a nxclient /srv/NX/bin
224 cp -a nxprint /srv/NX/bin
225 install -m 755 node.conf.sample /srv/NX/etc
232 # add user and group and check the gid of your nx is allowed by grsec
235 useradd -c 'FreeNX user' -d /srv/NX/home/nx -g nx -s /bin/bash -u 77 nx
237 chown -R root.root /srv/NX
238 chown -R nx.nx /srv/NX/home/nx
239 /srv/NX/bin/nxsetup --install --uid 77 --gid 77
241 # check if server is running...
242 /srv/NX/bin/nxserver --status
244 # Should provide something like:
245 NX> 100 NXSERVER - Version 1.4.0-44 OS (GPL)
246 NX> 110 NX Server is running
249 # setup the config file...
250 mv /srv/NX/etc/node.conf.sample /srv/NX/etc/node.conf
251 Open that file in your favorite editor and change line 339 so it
253 ENABLE_1_5_0_BACKEND="1" (don't forget to remove the coment)
256 The first thing is to lett freenx find a way to auth your user, the
257 easyest is using your own ssh setup.
258 Edit /srv/NX/etc/node.conf:
259 ENABLE_SSH_AUTHENTICATION="1"
260 And don't forget to remove the # from this line ;-)
261 copy /srv/NX/home/nx/.ssh/client.id_dsa.key to your local machine for
262 import in your nxclient.
269 http://64.34.161.181/download/1.5.0/client/xft/nxclient-1.5.0-113.i386.tar.gz
270 extract to /opt and add the path /opt/NX/bin to your profile.
271 Pitty it needs libstdc++-libc6.2-2.so.3 so you have to compile gcc-2.9x
273 Start with: "nxclient --wizard" and follow the steps, at the end choose
275 "Advanced configuration Dialog" where you can import the
276 client.id_dsa.key from above.
277 Now you would be able to login as any user would via ssh.
284 http://www.gnomeuser.org/documents/howto/nx.html
285 http://fedoranews.org/contributors/rick_stout/freenx/
286 Rick Stout's spec file.
292 * Upgraded some packages.
293 * Eased up build order.
295 * Fixed some problems with installing freenx scripts.
296 * Fixed the freenx patch.
297 * Unlock the nx user.
300 * Added download location for the patches.