FreeNX on Ubuntu Feisty

I just recently installed the FreeNX server on my Ubuntu linux system, and I’ve documented the very brief set up that was required. Fortunately the work is minimal, as compiling from source is complicated and poorly documented elsewhere.

Edit /etc/apt/sources.list, add the following lines:

deb http://free.linux.hp.com/~brett/seveas/freenx feisty-seveas freenx
deb-src http://free.linux.hp.com/~brett/seveas/freenx feisty-seveas freenx

You don’t need to add the GPG keys for the repository, but it keeps Ubuntu happy.

wget http://free.linux.hp.com/~brett/seveas/freenx/seveas.gpg -O- | sudo apt-key add -

Now update the apt cache, and install freenx (the server application)

apt-get update
apt-get install freenx

It seems that the freenx package doesn’t run nxsetup like it use to, so run it manually

nxsetup --install

The question of whether to use the NoMachine SSH keys or your own is debatable. My suggestion is to use NoMachine’s initially, until you have tested and got things working, then before going into production, switch to your own keys.

Now you will get lots of scary warnings, at this stage I’m not sure why they are appearing, but I ignored them and everything worked. I’ll figure it out later.

That, believe it or not, is about it. Now just install the nxclient on another machine (you can download the Nx Client from NoMachine’s website).

Once the client is installed, attempt to login to the server. Specify a valid username/password and you’ll have a client session.

Things to find out

  • What are all the warnings about
  • How do you limit access to only one or more users
  • Procedure for changing the keys on the nxserver, and for distributing the keys with the NX client

6 Responses to “FreeNX on Ubuntu Feisty”

  1. Mohamed Ibrahim Says:

    I’ve followed your steps. I installed freenx, did the setup, downloaded the nxclient for windows from the nomachine website. When I run the client the black window pops up that has the !m logo, then it disappears with a message that the connection was terminated.

    That doesn’t happen with the nomachine nxserver. I installed the nomachine nxserver before and it ran seamlessly. My problem with it is the limit of 2 users only, and I’ve tried installing the freenx server numerous times, and even when enabling the log the messages I get in /var/log/nxserver.log is really helpless !

    I would appreciate if you can post more details. I’m using feisty dist-upgraded to latest.

  2. Installing freenx on ubuntu feisty - step by step till you see the GUI » Mohamed Ibrahim Says:

    [...] read a lot in the internet, and many posts claim that freenx installs seamlessly and works without any hiccups even the ubuntu community docs, [...]

  3. zaf Says:

    Mohamed, Oooh, now thats a tricky one. I had that happen to me when I was fiddling with some things. It’s been a while since I’ve played with FreeNX, as in the end I decided it wasn’t what I was looking for.

    If I recall correctly (and I’m not sure that I do), the black screen issue often comes about because it can’t start whatever process is required. I found this issue was because of fonts for the X server.

    There are a number of debugging options that you can set:
    In /etc/nxserver/node.conf
    NX_LOG_LEVEL=7
    NX_LOGFILE=/tmp/nxserver.log
    will log pretty much everything to the above log file
    Also set
    SESSION_LOG_CLEAN=0
    To ensure that it doesn’t remove the session directories after disconnection.

    When you next try to connect, look at /tmp/nxserver.log for any errors, and also check your ~/.nx/ directory. There should be at least one directory in there that refers to your last session. Inside that directory is a lot of information on that session. Look through each file looking for errors.

    If I’m right, and its a font issue, the fix that I used was set the following option in node.conf
    AGENT_EXTRA_OPTIONS_X=”-fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/75dpi,/usr/share/fonts/X11/100dpi”

    I would suggest using the Windows client tool to change to a “Custom” connection (rather than KDE/Gnome) and configure it to run xeyes (eg: /usr/bin/xeyes). If that works, then it gives you something to go from.

  4. zaf Says:

    Just an addendum to that previous comment, the AGENT_EXTRA_OPTIONS_X field should all be on one line, and surrounding with double quote ” marks.

  5. Mohamed Ibrahim Says:

    Zaf, thanks for this. I will try it, and hopefully it works. I also did some playing yesterday, and managed to get it to work but it looks like that I removed some parameters that were used to pass to the agent. Those include the amount of compression – so I’m always now running on LAN.

    There two reasons that it is not working. The nxagent does not find the options file, and there is a font problem. I will try your fixes and see if it is still not finding the options file in the .nx dir.

    Thanks for reponse.

  6. Matthew Richardson Says:

    A different option, which worked for me on Feisty, is to set in /etc/nxserver/node.conf:

    AGENT_EXTRA_OPTIONS_X=”-fp unix/:7100″

Leave a Reply