NX server on Raspberry Pi

Finally I had some time to get my hand on new Raspberry Pi 2.
I think it’s useful to access the RPi2 by ssh (work out of the box) and NX. Installation of NX server is quite time-consuming, but I think it’s worth to give it a try! Here is what I did:

# install dependencies
sudo apt-get install xutils-dev expect xorg-dev libjpeg8-dev libpng12-dev cups xfonts-base x11-xserver-utils autoconf

sudo mkdir -p /usr/NX/{bin,etc}

# install freenx
wget http://pkgs.fedoraproject.org/repo/pkgs/freenx-server/freenx-server-0.7.3.tar.gz/856f597e139018f7ed62713c9d6c9ed5/freenx-server-0.7.3.tar.gz
tar xpfvz freenx-server-0.7.3.tar.gz
cd freenx-server-0.7.3
patch < gentoo-nomachine.diff
make
sudo make install

# copy node.conf
# and replace #COMMAND_MD5SUM="openssl md5" with COMMAND_MD5SUM="md5sum"
# and #COMMAND_START_GNOME=gnome-session with COMMAND_START_GNOME="/usr/bin/startlxde"
sudo cp node.conf.sample /usr/NX/etc/node.conf

# get nx source
wget http://code.x2go.org/releases/source/nx-libs/nx-libs_3.5.0.13-full.tar.gz
tar xpfvz nx-libs_3.5.0.13-full.tar.gz
cd nx-libs_3.5.0.13

# compile & relax for ~1 hour...
make build-full
sudo make install

# copy libs and binaries
sudo ln -s /usr/lib/NX3/lib/nx /usr/NX/lib
sudo cp -a nx-X11/lib/X11/libNX_X11.so* nx-X11/lib/Xext/libNX_Xext.so* nx-X11/lib/Xrender/libNX_Xrender.so* nxcomp/libXcomp.so* nxcompext/libXcompext.so* nxcompshad/libXcompshad.so* /usr/NX/lib
sudo cp -a nx-X11/programs/nxauth/nxauth nx-X11/programs/Xserver/nxagent nxproxy/nxproxy /usr/NX/bin

# link binaries & install
for f in /usr/bin/nx*; do echo $f; sudo ln -s $f /usr/NX/bin; done
sudo nxsetup --install

After these steps, you should be able to connect with NX client using fake GNOME session.
Raspberry Pi 2 over NX

Post is based on TiaoWiki with some updates/improvements.

One thought on “NX server on Raspberry Pi

  1. Dear,
    at the tail of installation process I got following set of errors:

    —-> Testing your nxserver configuration …
    Error: Could not find nxagent in /usr/bin. Please install some OSS components.
    Warning: Could not find nxdesktop in /usr/bin. RDP sessions won’t work.
    Warning: Could not find nxviewer in /usr/bin. VNC sessions won’t work.
    Warning: Invalid value “APPLICATION_LIBRARY_PRELOAD=/usr/lib/libX11.so.6.2:/usr/lib/libXext.so.6.4:/usr/lib/libXcomp.so:/usr/lib/libXcompext.so:/usr/lib/libXrender.so.1.2”. /usr/lib/libX11.so.6.2 could not be found. Users will not be able to run a single application in non-rootless mode.
    Warning: Invalid value “COMMAND_FOOMATIC=/usr/lib/cups/driver/foomatic-ppdfile”
    Users will not be able to use foomatic.
    Warning: “/usr/lib/cups/backend/smb” is not executable.
    Users will not be able to enable printing.
    Warning: Invalid value “CUPS_ETC=/etc/cups/”
    Users will not be able to enable printing.
    Warning: Invalid value “DEFAULT_X_SESSION=/etc/X11/xdm/Xsession”
    Users might not be able to request a default X session.
    Warning: Invalid value “COMMAND_START_KDE=startkde”
    Users will not be able to request a KDE session.
    Warning: Invalid value “COMMAND_START_GNOME=gnome-session”
    Users will not be able to request a Gnome session.
    Warning: Invalid value “COMMAND_START_CDE=cdwm”
    Users will not be able to request a CDE session.
    Warning: Invalid value “COMMAND_XTERM=xterm”
    Users will not be able to request an xterm session.
    Warning: Invalid value “COMMAND_SMBMOUNT=smbmount”. You’ll not be able to use SAMBA.
    Warning: Invalid value “COMMAND_SMBUMOUNT=smbumount”. You’ll not be able to use SAMBA.
    Warning: Invalid cupsd version of “/usr/sbin/cupsd”. Need version 1.2.
    Users will not be able to enable printing.
    strings: ‘/usr/bin/nxagent’: No such file
    Error: Could not find 1.5.0 or 2.[01].0 or 3.[01].0 version string in nxagent. NX 1.5.0 or 2.[01].0 or 3.[012].0 backend is needed for this version of FreeNX.

    Errors occured during config check.
    Please correct the configuration file.

    I realized that files that installation script expects at /usr/bin are located at /usr/NX/bin. How to repair my installation please? (I’m linux beginner…)

Leave a Reply

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