FreeNX Server HOWTO
From openSUSE
Contents |
About
NX is a new wonderful remote access protocol. It is both fast, secure, graphical & open. (as opposed to telnet protocol, which is only fast & open.)
NX is basically a client-server protocol, that allows you to graphically access any machine, is based on both SSH (for security) and X Compression (for GUI and speed), and NX is much easier to use than normal X protocol.
This How-To describes how to use SUSE Linux 10.0 as a Terminal Server, how-to configure stuff, and how to connect to it.
Short History
After created by NoMachine a few years ago, they released their core libs and commandline tools to the public (as GPL). Kurt Pfeifle - a KDE contributor - took those libs and tools and created a first humble (unreleased) script that automated the setting up of a remote NX connection to a degree. After he introduced Fabian Franz (at the time contributor to Knoppix and MPlayer) to NX, Fabian created a project called FreeNX; FreeNX is a work-alike implementation of NoMachine's commercial (and closed source) NX Server.
NoMachine still releases their core libraries under GPL, gives away their NX Client and grants free binary redistribution rights for it. Their client can be used to access FreeNX servers.
We - the community - can use the GPL'ed implementation of the FreeNX server & the KDE "knx" client (though that one does still miss many features and lacks maintenance).
There's also the GPL-ed client for the 2X server (another commercial product by a different company that uses the NX core libs) that is supposed to work with FreeNX.
Setting up things
If you are, like me, running SUSE Linux 10.0 - you will need to install FreeNX package (the server) using YaST (freenx is on SUSE CDs/DVD) as well as some client software (to test on local machine) - you can use freeware NX Client (from www.nomachine.com/download) or use Open-Source "knx" - the standard KDE NX Client.
After setting up the procedure is damn easy.
First enter root mode, then:
1) let's make sure that you installed the right package:
linux:/ # rpm -q FreeNX
FreeNX-0.4.4-4
If it returs nothing, then install it using YaST. If returns "FreeNX-0.4.4-4" like in my case, then all is OK.
2) This will configure the FreeNX server: (using the standard key)
linux:/ # nxsetup --install --setup-nomachine-key --clean
3) start any NX client - I use NoMachine's - and type: localhost as my host, 22 as my SSH port - after all NX is based on SSH, my user's name & password, desktop: UNIX/KDE set the resolution press ok - and - everything works wonderfully !
NX-In-Action Screenshot:
Congratulations ! ! ! You are done !
The next paragraphs are strictly optional for Advanced NX configuration. You don't need to read them to make NX working.
Running The Terminal Server
In the real world, running a Terminal Server requires more than just configuring NX Server - it also requires to configure users on the server. On SUSE Linux it's easiest to do with Yast. Now we need to configure the clients - there are two ways for achieving this:
1) Using existing (Windows ?) Workstations and simply install NX Clients on them.
2) Use LiveCD that comes with NX Client. Newer Knoppixes do. v3.9+.
NOTE1: Unfortunately, the SUSE Live DVD do not meet the specs - it doesn't include NX Client _and_ doesn't include UnionFS to install the NX Client. SUSE Live DVD can still be used - but you will have to manually install the NX client with user account but it's harder than Knoppix.
NOTE2: FreeNX as a Terminal Server is great, because it's very fast, secure, and the software is not the limited to the number of clients -- your only limitation is the power of your Server. (that is -- the performance of your CPU & amount of RAM)
A note about NX Clients
There are two NX clients in existence - namely:
a) the freeware NoMachine's "NX client" (closed-source). Advanced client.
b) and an open-source KDE "knx" client. Simple Client.
Each is supported on different platforms:
1) Windows 95...XP - must use a.
2) Mac OS X (ppc) - must use a.
3) Linux - can use a -or- b.
4) FreeBSD - must use b.
5) Solaris (sparc) - must use a.
A Server can be Linux or UNIX host only.
SUSE Linux 10.0 is very well supported. Another UNIXes/Linuxes might need to compile stuff.
Changing NX TCP Port
Because changing NX port on the client is straightforward - I will concentrate on the server here.
Since FreeNX server is based on SSH, changing NX port will require you to change SSH port as well, or NX will fail. The default TCP port of SSH and NX is 22. The configuration files on SUSE Linux 10.0 are:
/etc/nxserver/node.conf
/etc/ssh/sshd_config
...and don't forget to restart the SSH service afterwards.
Tip for advanced users:
By using this technique - you can effectively setup a farm of Linux distros even on your home PC - using some kind of virtualization (VMware/Qemu/Xen) - by setting up virtual NX servers to listen on different ports. This is really cool - because it can be used from both a LAN and from the Internet at the same time !
Runlevels
The NX Server can run in runlevel 3 or 5. NX Server doesn't use video card, so it will work.
NX Client will require you to use runlevel 5. (*Applicable only if you run NX client on SUSE Linux - since Windows has no runlevels concept)
To find out in which runlevel you are working now, use:
> who -r
run-level 5 2006-04-24 17:33 last=S
International Keyboard Support
The NX Server requires a small modification of /etc/nxserver/node.conf as root to allow NX clients to use other keyboards settings than the US (QWERTY) one:
Locate the line in /etc/nxserver/node.conf reading:
#AGENT_EXTRA_OPTIONS_X=""
And change it to read:
AGENT_EXTRA_OPTIONS_X="-xkbdir /usr/share/X11/xkb"
Restart your NX Server with:
nxserver --restart
Then reconnect your NX Client and that's it. You should now have a working international keyboard.
-By Alexey Eremenko. 21.apr.2006.
-Internation Keyboard Support area by Xavier Colinot. 14.jul.2007
If you want to go level up, click here: http://en.opensuse.org/Configuration


