Dion Moult Seriously who ever reads this description.

Setting up FreeNX (nxserver-freenx) on Gentoo

NX is, in laymans’ terms, some fancy technology that allows you to remote desktop control your computer. If you’ve used VNC before, where VNC simply works by sending screenshots over the internet, NX does cool stuff in between like compression that makes NX much faster and better.

NX is a pain to set up. Maybe it’s just my bad luck that something goes wrong every time I try to set it up, or perhaps I’m just plain stupid but I find it a pain and it normally makes me feel like chewing my ethernet cable after a while. A long while back I managed to get nxserver-freeedition working fine, but recently it stopped and in the process I decided to switch over to using FreeNX – an open-source implementation of NX. Here is how I got it up finally, mainly for archival purposes.

Before starting, you may want to clean your system. unmerge nxclient nxnode nxserver-freeedition nxserver-freenx, etc, rm -r /usr/NX (if freeedition), rm -r /etc/nxserver (if FreeNX), remove the nx user and the nx group, rm -r ~/.nx/ for all users.

  1. emerge nxclient
  2. emerge nxserver-freenx
  3. nxsetup --install --setup-nomachine-key --clean --purge (the –setup-no-machine key option means that you just need to use the default key that the nxclient comes with)
  4. Try to connect via nxclient, tail -f /var/log/messages, if it complains about the user being locked, do usermod -p foo nx, where foo is a password you’ll use.
  5. Start debugging why it doesn’t work.

When debugging I normally:

As for my experience switching over to FreeNX from freeedition, honestly in terms of usability it’s no different at all, but personally in terms of installation procedure FreeNX wins by a mile. But for the moment I’m just happy I won’t be restricted by my school’s web filtering system and glitchy, laggy, virus-filled OS. Perhaps when NeatX stabilises a little I might check it out.

No related posts.


5 Comments

Voyageur says: (1 October 2009)

Latest ~arch nxserver-freenx warns about the locked user, it should go stable in 2 weeks. As for the other points, they would make a nice troubleshooting section in the NX guide I’m planning to write for 2 years ;)

Glad you got it working though, it can get complicated when not working out-of-the-box

Dion Moult says: (1 October 2009)

Thanks – hopefully I’ll be able to update this later to work passwordless.

thinkMoult - Setting up FreeNX (nxserver-freenx) on Gentoo « | Just linux! says: (5 October 2009)

[...] Excerpt from:  thinkMoult – Setting up FreeNX (nxserver-freenx) on Gentoo « [...]

freakwent says: (28 December 2009)

Still @#$%@ won’t work for me.

It makes no sense to me. It’s not even clear if the client wants the username nx, or my username.

ssh as me or as nx works fine, and as nx I get the nxserver CLI.

# Make sure you own your own authorized_keys(2) file, after a while of mucking about you might’ve screwed the permissions (600).

Wait what? what authorized_keys file? You just said “PasswordAuthentication is set to yes, as that’s how you’ll authenticate with NX with nxclient”

My authkeys file or nx’s ? What should be in it?

# Check that you’re pointing at the right authorized_keys(2) file

Where do I check? Which one is the right one?

I get
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.

So that’s probably my problem, but this is getting me down. Anyone got a neatx howto for gentoo?

Dion Moult says: (28 December 2009)

Before I try and answer I would like to point out that there are currently 3 iterations (or 3 I have heard of) of NX server – that is nxserver-freeedition, nxserver-freenx, and neatx. This guide does not cover neatx.

You should only need to bother about authorized_keys(2) files if you are using nxserver-freedition. If you are using freenx (which I recommend) you shouldn’t have to bother with those and should stick to the defaults.

As long as you can SSH in fine with NX the SSH keys should be set up fine. What happens is that NX will SSH in, then it will use password authentication to verify your user account data. Therefore it does not use keys for your own account but only for the NX account. It is possible to change this to use keys for both on freeedition but I have found it to be a pain to set up, so I stick to the defaults on freenx.

Hope that helps. NX is always a pain to set up no matter what.

Leave a Comment