FreeNX on FreeBSD

FreeNX is the new VNC. VNC is so…20th century. The performance of FreeNX blows VNC (including TightVNC and UltraVNC) out of the water. FreeNX is the server component. You actually can use the clients from the commercial NX product from NoMachine (NX technology is commercial, but GPL’d which is why we have FreeNX). I’ve been using the Mac client which is pretty good, except that it seems that if a connection fails, I must exit the program and relaunch it; otherwise the next connection attempt will hang.

There is no FreeNX Windows server, but you can connect to a VNC server with an NX client, using an NX server (including FreeNX) as a proxy, thereby gaining a bit of performance from the NX compression and caching. Thus, in some ways NX and VNC are complementary technologies.

This is roughly what it took to setup FreeNX on my FreeBSD 4.10 box. It wasn’t as easy as simply installing the FreeBSD port, but this might’ve been due to the uniqueness of the environment I was using or because my FreeBSD version is a bit old. I may have missed a step or two or added one that isn’t strictly necessary – if you try it and run into problems, let me know and I’ll try to help.

cd /usr/ports/net/freenx
sudo make install

# Create "nx" user
# nxsetup is supposed to do this, but it wasn't working for me
sudo pw user add nx
sudo pw usermod nx -s "/usr/X11R6/NX/bin/nxserver"
sudo passwd nx

# Test user "nx"
su nx

# Create some directories
sudo mkdir -p /var/lib/nxserver/closed
sudo mkdir -p /var/lib/nxserver/failed
sudo mkdir -p /var/lib/nxserver/running
sudo chown -R nx /var/lib/nxserver

sudo ./nxsetup --install --setup-nomachine-key
sudo ./nxserver --adduser marc
sudo ./nxserver --passwd marc


All You Can Meet

3 thoughts on “FreeNX on FreeBSD

  1. I stumbled upon your blog and FreeNX today. I wrote a how-to on my blog, based on your entry here and thought I would pass it along. The entry is here.

    Also, I didn’t create the directories as you did in your tutorial but they were either created for me by running the nxsetup script or after the first connect. I suspect the nxsetup script created them though I’ll have to do an install on a fresh box to verify.

    Anyway, thanks for your post. It was very helpful.

    Jeff

  2. Pingback: links for 2011-02-22

Leave a Reply

Your email address will not be published. Required fields are marked *