From Applied Optics Wiki
Revision as of 16:10, 24 February 2010 by Sds (talk | contribs) (Initial edit)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Back to Linux How-tos


NX is a system by which you can log onto a PC running Linux over the network - either from elsewhere in the university, or from home, say. You are presented with your usual desktop, running inside a window on whatever PC you log on from. Graphics are compressed, so it works well even over normal domestic broadband. Crucially, you can "detach" a session, so that your programs (eg Matlab model) carry on running on the Linux PC. You can then re-establish a connection, from a different client if you like.

There are one or two little niggles with the programs (they are not entirely bug free). This wiki page will tell you how to install the NX client (the one on your win/lin/mac PC), work around the niggles, and install the NX server (installed on an AOG Linux PC).

Downloading and installing the NX client

You get the NX client software by downloading it from the NoMachine website. Click on the link for either NX Client for Windows, NX Client for Linux or NX Client for Mac OSX.

Extra Linux install notes

If you want the Linux client, then you probably want the "NX Client RPM for Linux - x86_64" (ie 64-bit) as most PCs now are 64-bit (and have 64-bit operating systems). If you need the 32-bit version, then choose "NX Client RPM for Linux - i386" instead.

Once it is downloaded, to install on SuSE, either find the RPM in the graphical file manager and click on it to install, or (in a terminal window) type:

sudo zypper install file.rpm

(where file.rpm is the name of the file, obviously).

Setting up the NX client

The first time you run the NX Client (type "nxclient" in Linux, or find it in the Applications menu like on Windows or Mac) it will take you through a setup procedure.

You will need a "key" - ask Steve or Roger to email you this.

Make sure you enable the "Show the Advanced Configuration dialog" checkbox, then click on the "Key" button. Delete the existing key, and cut and paste the key that you will have been emailed.

That's pretty much it. You need the IP address of the machine you want to NX into (one that is running an NX server) - for instance the PC we call "rug". You also need your usual username and password.


Common to all architectures

The fact that this is common to all versions (win/lin/mac) suggests it's actually a problem with the server rather than the client.

When you close the NX Client, a process called "nxssh" keeps running on the client (until you power off your PC, or maybe log out). This prevents you re-opening a session (either a new one, or re-attaching to the one you detached from earlier). You have to manually "kill" this nxssh process.

On Windows use the Task Manager (ctrl-alt-delete). On Mac use the equivalent (alt-apple-escape? apple-ctrl-escape? Something like that). On Linux use:

pkill -KILL nxssh

Windows 64-bit specific niggles

Unless you uncheck an option that's something like "allow direct draw" (Richard to confirm), then things run cripplingly slow.

Linux running KDE4 (eg SuSE Linux 11.2)

The cursor keys and those nearby (Page Up/Down/Home/End/Delete/Insert) are incorrectly mapped.

As a workaround, run the following when you first log in:

xmodmap -e "keycode 110=Home"
xmodmap -e "keycode 111=Up"
xmodmap -e "keycode 112=Page_Up"
xmodmap -e "keycode 113=Left Left"
xmodmap -e "keycode 114=Right"
xmodmap -e "keycode 115=End"
xmodmap -e "keycode 116=Down"
xmodmap -e "keycode 117=Page_Down"
xmodmap -e "keycode 118=Insert"
xmodmap -e "keycode 119=Delete"

I suggest you cut and paste the above into a little script called "fixkeys" or something.

Installing the NX server

sudo zypper install FreeNX
sudo nxsetup --install

When asked if you want to install custom keys, answer yes.

cd /home/share/suse_hacks/nx/
sudo make