Page 1 of 9 123 ... LastLast
Results 1 to 10 of 89

Thread: HOWTO: Install FreeNX

  1. #1
    Join Date
    Apr 2005
    Galatina, LE - Italy
    Kubuntu 7.04 Feisty Fawn

    HOWTO: Install FreeNX

    HOWTO: Install FreeNX on (K)Ubuntu Breezy

    This is my experience in installing the FreeNX server and the NoMachine NX Client on my Kubuntu Breezy.
    I had some troubles in getting the whole thing work, so I write this little howto hoping that it may be useful for other (K)Ubuntu users


    I used .deb packages from Seveas repository. In order to configure it for apt-get (or Synaptic) add the following line to /etc/apt/sources.list:

    deb breezy-seveas all
    In order to install the appropriate gpg key, execute the following commands (as described on the Seveas home page):

    gpg --keyserver --recv-keys 1135D466 
    gpg --export --armor 1135D466 | sudo apt-key add -


    Having Seveas repository configured, it is easy to install the server part of FreeNX. Simply install the freenx package:

    sudo apt-get install freenx
    It will also install some dependencies, notably ssh, nxagent and nxlibs. Your (K)Ubuntu will ask you if you want to use the standard NoMachine key, among some other options. I recommend to use the standard NoMachine key for standard use (or for the initial debug of the NX protocol). We will see later how to setup a custom key for higher security.
    Please note that the key is used for public key authentication on the user "nx", who is used by the NX protocol to establish an SSH tunnel for the secure protocol data transport. Session authentication is (by default setup) based on PAM, allowing server users to establish a remote NX session by mean of their own credentials (username and password, as defined on the server).

    It is now necessary to check some settings of the ssh subsystem, by editing the /etc/ssh/sshd_config file:

    1) sshd should listen on the standard 22 port. Please check that the sshd_config contains the line "Port 22" and that it is not commented out.
    2) public key authentication is turned on. Check the sshd_config so it contains the line "PubkeyAuthentication yes"
    3) modify the "AuthorizedKeysFile" line in "AuthorizedKeysFile %h/.ssh/authorized_keys2" (default is "%h/.ssh/authorized_keys")
    4) By default, sshd should allow every system user to access the system. If your system is configured differently, please add (or modify) the "AllowUsers nx" line to allow the nx user to access. I think you can use the "user@host" syntax for this sshd parameter to limit hosts from which users can logon via NX.

    If you have made any change to the sshd_config, restart the ssh daemon with
    sudo /etc/init.d/ssh restart


    On the client machine, from the Seveas repository, install the nxclient package.
    In my KDE, I found the "NX Client for Linux" in the "Lost+found" submenu. Launching the client for the first time brings up a connection wizard that will allow you to setup a connection to a remote NX server (in this case, the one configured above). Insert the session name (just an identifier of the server/service/host you will connect to), the server IP address and pay attention to check the "Enable SSL encryption of all traffic" option. You may set other options in the connection wizard, for example the type of remote window manager to fire up when the nx user connects (KDE, GNOME, others) and the resolution of the virtual NX session.
    Please note that the connection created by the wizard make use of the standard NoMachine key. We will see later how to change the connection key to a custom one.
    At the end of the wizard, the NX client logon form fires up. You can insert the username, the password and choose one of the defined sessions.
    The login button will attempt the NX connection to the server as defined in the selected session. If you press the "Configure..." button, you can change ALL the parameters of the selected session (the ones defined with the connection wizard and other...).


    If you chose "Custom keys" when prompted during the server package, the installation creates a random authentication key for the user "nx". If you chose the standard NoMachine key, you can reconfigure the freenx package to change this setting to "Custom keys" with the following command:

    sudo dpkg-reconfigure freenx
    The key is stored in the client.id_dsa.key file in the .ssh subdirectory of the nx home directory (default: /var/lib/nxserver/home/.ssh/client.id_dsa.key). You have to share this key with all the client hosts you want to authorize, by copying this file on the client machine and then importing it into the NX client. The destination path is not important, but you must know it to import the key file into the NX client.
    To import the key, open the NX client, select the right session and click on the "Configure" button. From the "General" tab of the configuration window, click on the "Key" button and then on the "Import" button. Then select the client.id_dsa.key you copied from the server and click on the "Save" button, "OK" button (please confirm to save the new configuration)
    From now on the NX connection to the server will use the new key. Clients with the default key (or other custom keys) cannot authenticate to the server anymore.

    You can return to the standard NoMachine key by reconfiguring the freenx package on the server, and by modifying the key used by the client with the same procedure described above, but clicking on the "Default" button instead of the "Import" button we used before.

    If you played with NX keys and your client doesn't authenticate anymore to the server, you can start from a clean state by reconfiguring the freenx package on the server and choosing the "Remove freenx keys" and reconfiguring again choosing the "NoMachine keys" or the "Custom keys" options.


    I apologize for my english, far from being good. However I hope that this howto can help some user that (like me) has encountered troubles in configuring this powerful remote control protocol.

    As a last note, if you has other troubles and you have set up a firewall, please check firewall settings keeping in mind that only the port 22 (ssh) have to be enabled in order to establish a connection to the server.


  2. #2
    Join Date
    Aug 2005
    On the Internet / Southea
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Install FreeNX on (K)Ubuntu Breezy

    Very nice HOWTO.
    Quad Core Q6600 2.4Ghz / 1066FSB;XFX nForce 680i LT SLI Socket 775 MBoard; GeForce 8500GT 256MB;OCZ 700W GameXstream PS;Seagate 500GB SATA HD 7200/16MB/SATA-3G;4GB Corsair TWINX PC6400 DDR2 800MHz EPP RAM

  3. #3
    Join Date
    Apr 2005

    Re: HOWTO: Install FreeNX on (K)Ubuntu Breezy

    I get the following error when I try to apt-get freenx:

    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.

    Since you only requested a single operation it is extremely likely that
    the package is simply not installable and a bug report against
    that package should be filed.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    freenx: Depends: expect but it is not installable
    E: Broken packages

  4. #4
    Join Date
    Oct 2005

    Re: HOWTO: Install FreeNX on (K)Ubuntu Breezy

    i have tried the howto and it worked great... thanks...

  5. #5
    Join Date
    Mar 2005

    Re: HOWTO: Install FreeNX on (K)Ubuntu Breezy

    Great work. It worked on my first try. Does exactly what it says on the tin. Now I can provide support to my parents without biking over half an hour trough rainy weather

  6. #6
    Join Date
    Sep 2005

    Re: HOWTO: Install FreeNX

    If you get errors when you run nxsetup --setup-nomachine-key related to not being able to connect-check sshd_config AllowedUsers nx, make sure sshd allows public key authenication, .etc. Check the permissions on the directory /var/lib/nxserver/home/. Make sure it has the correct permissions to allow user "nx". I spent several hours trying to get freenx going only to find the permissions on this directory were wrong. As soon as I corrected this and ran nxsetup --setup-nomachine-key the program set up the nxserver without errors.

    If you need to access your linux box on your local network from windows or another linux box to run programs, .etc, freenx is a better choice than vnc. It is much faster and doesn't have the screen and mouse issues that I have run into with vnc.

  7. #7
    Join Date
    Dec 2005

    Re: HOWTO: Install FreeNX

    I am having a problem with connecting to my breezy machine running FreeNX with the Windows NoMachine client. I have no problem running the linux client within the server using localhost but when I try to connect from my windows box it just sits there and displays "Setting up the X environment". I have copied over the DSA key from the server and everything seems to be setup correctly. I can ssh into the server from the windows box fine.
    Last edited by statop; December 18th, 2005 at 09:34 AM.

  8. #8
    Join Date
    Feb 2005

    Re: HOWTO: Install FreeNX

    That repository does not work, I think it is now:
    deb ubuntu-seveas freenx

    but I am still following the HOWTO and not sure if it works. But the old repo defenitely does not work

  9. #9
    Join Date
    Nov 2005

    Re: HOWTO: Install FreeNX

    here's a podcast all about FreeNX along with afew other things.

  10. #10
    Join Date
    Sep 2005

    Re: HOWTO: Install FreeNX

    I got this to work locally but after opening the port in my router that i set in /etc/nxserver/node.conf and etc/sshd/sshd_config (not 22) i can not get it to login. It gets past auth ok and then says negotiating link params, then hangs for while, then gives me some crap about couldnt establish link with proxy or some babble.. i dont have a proxy, i have setup apache with custom port just fine and enabled it on the net... Whats wrong?
    i even added a range of ports that the nxclient uses (1000 + )

Page 1 of 9 123 ... LastLast


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts