Nomachine NX Libraries and freenx-server

unfortunately there are no up-to-date freenx-server/-libs Packages for Debian Etch available. I found the documentation for building the required lib’s either wrong, or incomplete - here is another try.

This rough guide should help to setup a basic FreeNX 0.73 Server.
Basic NX- and rudimental linux-building knowledge to track down compilation errors is expected.
First:

  • You might save your nx .ssh directory with the authorized_keys and client.id_dsa.key from a previous Installation.
  • Remove/Purge all NX packages and freenx. Mainly you can identify them with a dpkg -l | grep nx , lynx doesnt count however ;)
  • Move /usr/NX out of the way.

Second:

  • install some required packages:
    apt-get install xdialog expect netcat libxcomposite1 libxdamage1 xutils xutils-dev build-essential
  • get the freenx-server files as Archive or svn:
    # svn checkout http://svn.berlios.de/svnroot/repos/freenx/tags/freenx-server/FreeNX-0.7.3
    enter the FreeNX directory and apply the gentoo-nomachine.diff - who knows where this misleading name comes from.
    # patch -p0 < gentoo-nomachine.diff and install freenx-server with
  • # make ; make install
  • get the NX sources and unpack them:
    Goto http://www.nomachine.com/sources.php and download the following archives into your build folder and untar them. I choose /usr/local/src/nxlibs for this:

    -rw-r--r--  1 root staff  1611890 2008-07-23 15:18 nxagent-3.2.0-10.tar.gz
    -rw-r--r--  1 root staff    30679 2008-04-08 11:05 nxauth-3.2.0-1.tar.gz
    drwxr-xr-x  2  501   501    12288 2008-09-01 11:27 nxcomp
    -rw-r--r--  1 root staff   532187 2008-05-22 13:35 nxcomp-3.2.0-7.tar.gz
    drwxr-xr-x  2 tim  users     4096 2008-09-01 11:29 nxcompext
    -rw-r--r--  1 root staff    90315 2008-04-08 11:05 nxcompext-3.2.0-1.tar.gz
    drwxr-xr-x  2  512   512     4096 2008-09-01 11:33 nxcompshad
    -rw-r--r--  1 root staff    76668 2008-05-22 16:57 nxcompshad-3.2.0-3.tar.gz
    drwxr-xr-x  3  505   505     4096 2008-09-01 11:47 nxproxy
    -rw-r--r--  1 root staff    82736 2008-04-08 11:05 nxproxy-3.2.0-1.tar.gz
    drwxrwxr-x 10  501   501     4096 2008-09-01 11:24 nx-X11
    -rw-r--r--  1 root staff 20215674 2008-06-23 14:42 nx-X11-3.2.0-2.tar.gz
    
  • go inside nx-X11 and run
    # make World. (with current multicore cpus “-j 4″ will speed up the buildprocess)
    If you get an error, read them carefully and install the required “-dev” Package. To name them all is beyond this howto, but to have a basic build environmet install build-essential (Debian).
    To get most (or even all) required -dev packages install libqt3-mt-dev (QT -dev Pack of Debian). Note: libqt3-mt-dev itself is not needed for NX but its dependecies will install many other needed packages.
  • afterwards go inside nxproxy and run
    # ./configure && make
  • there is no make install for the NX libs and bins, so we do it by hand:
    cp -a nx-X11/lib/X11/libX11.so* /usr/NX/lib
    cp -a nx-X11/lib/Xext/libXext.so* /usr/NX/lib
    cp -a nx-X11/lib/Xrender/libXrender.so* /usr/NX/lib
    cp -a nxcomp/libXcomp.so* /usr/NX/lib
    cp -a nxcompext/libXcompext.so* /usr/NX/lib
    cp -a nxcompshad/libXcompshad.so* /usr/NX/lib
    cp -a nx-X11/programs/Xserver/nxagent /usr/NX/bin
    cp -a nxproxy/nxproxy /usr/NX/bin

    I prefer to have some links in /usr/bin:

    cd /usr/bin
    ln -sf /usr/NX/bin/nxloadconfig .
    ln -sf /usr/NX/bin/nxsetup .
    ln -sf /usr/NX/bin/nxserver .

Third:

  • /usr/NX/bin/nxsetup –install
  • cp /usr/NX/etc/node.conf.sample /usr/NX/etc/node.conf
  • migrate your keys to /usr/NX/home/nx/.ssh

easy!

11 Responses to “Nomachine NX Libraries and freenx-server”

  1. gonzo Says:

    Hi, thanks for this guide, I followed one by one steps listed, and I think that nxserver is running, but I dont understand the last step “migrate your keys to /usr/NX/home/nx/.ssh”, as a result the client says (in windows) “Authentication failed for the user”.

    What I have to do in that step?

    Thanks again.

  2. tim Says:

    Hello gonzo!
    the last step is only intended for users that want to migrate the key from a previous installation.
    “Auth failed f. t. user” can have several reasons. Try with the nomachine default key and enable LOG_LEVEL 7 in node conf to get more informations.

    Greetings,
    Tim

  3. gonzo Says:

    the error log says:

    – NX SERVER START: -c /usr/NX/bin/nxserver - ORIG_COMMAND=
    HELLO NXSERVER - Version 2.1.0-72 OS (GPL, using backend: 3.2.0)
    NX> 105 hello NXCLIENT - Version 2.1.0
    NX> 134 Accepted protocol: 2.1.0
    NX> 105 SET SHELL_MODE SHELL
    NX> 105 SET AUTH_MODE PASSWORD
    NX> 105 login
    NX> 101 User: ingeco
    NX> 102 Password:
    Info: Auth method: passdb ssh
    NX> 404 ERROR: wrong password or login
    NX> 999 Bye

  4. tim Says:

    I would do following:
    delete /usr/NX/home/nx/.ssh/ and run the nxsetup script again

    and
    try setting this in node.conf:

    ENABLE_SSH_AUTHENTICATION=”1″
    ENABLE_USER_DB=”0″

    report back!

  5. gonzo Says:

    Hi, the report of /usr/NX/bin/nxsetup –install is:

    # /usr/NX/bin/nxsetup –install
    ——> It is recommended that you use the NoMachine key for
    easier setup. If you answer “y”, FreeNX creates a custom
    KeyPair and expects you to setup your clients manually.
    “N” is default and uses the NoMachine key for installation.

    Do you want to use your own custom KeyPair? [y/N] N
    Setting up /usr/NX/etc …done
    Setting up /usr/NX/var/db …done
    Setting up /var/log/nxserver.log …done
    Adding user “nx” to group “utmp” …done
    Setting up known_hosts and authorized_keys2 …done
    Setting up permissions …done
    Setting up cups nxipp backend …done

    —-> Testing your nxserver configuration …

    Warning: Could not find nxdesktop in /usr/NX/bin. RDP sessions won’t work.
    Warning: Could not find nxviewer in /usr/NX/bin. VNC sessions won’t work.
    Warning: Invalid value “APPLICATION_LIBRARY_PRELOAD=/usr/NX/lib/libX11.so.6.2:/usr/NX/lib/libXext.so.6.4:/usr/NX/lib/libXcomp.so:/usr/NX/lib/libXcompext.so:/usr/NX/lib/libXrender.so.1.2″. /usr/NX/lib/libXrender.so.1.2 could not be found. Users will not be able to run a single application in non-rootless mode.
    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_CDE=cdwm”
    Users will not be able to request a CDE 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.
    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.[01].0 backend is needed for this version of FreeNX.

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

    I think that last error is the problem, but I don’t know how to resolve it.
    Thank for help me.

  6. gonzo Says:

    I deleted /usr/NX/home/nx/.ssh/ and then I did the setup, and happens the same

  7. tim Says:

    set SESSION_LOG_CLEAN=0 in node.conf
    relogin and investigate the files under /home/you/.nx for error message.
    I think the Error from nxsetup can be ignored.

  8. gonzo Says:

    Now is running!!
    what was the problem?

    Thanks a lot.

  9. Chris Says:

    Hi,

    Very useful article. I need just an information : In effect, I have an error as soon as I must doing the “make world”. And you say, at this subject :

    “# make World. (with current multicore cpus “-j 4″ will speed up the buildprocess)
    If you get an error, read them carefully and install the required “-dev” Package

    It’s perfect, but… could you say mefrom what “-dev Package” do you speak, please? lol, there are many.

    Thanks at advance.
    Chris

  10. tim Says:

    Hello Chris,
    sorry for the delay. I have added a little help concerning your question.

    Greeting Tim

  11. jean Says:

    hi,
    All is working for me except RDP session,

    When i open a windows session : i have error : “can’t open /usr/NX/bin/nxdesktop_helper …”

    I fix it by replacing nxdesktop_helper provided en freenx 0.73 by 0.72 version

    Now, it’s running

Leave a Reply

You must be logged in to post a comment.