Page 1 of 2 12 LastLast
Results 1 to 10 of 89

Thread: HOWTO: Install FreeNX

Hybrid View

  1. #1
    Join Date
    Apr 2005
    Location
    Galatina, LE - Italy
    Beans
    15
    Distro
    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


    0. CONFIGURING THE RIGHT PACKAGE REPOSITORY


    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:

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

    Code:
    gpg --keyserver subkeys.pgp.net --recv-keys 1135D466 
    gpg --export --armor 1135D466 | sudo apt-key add -


    1. INSTALLING THE SERVER


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

    Code:
    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
    Code:
    sudo /etc/init.d/ssh restart

    2. INSTALLING THE CLIENT

    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...).



    3. (Optional) DEFINING AND USING CUSTOM KEYS

    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:

    Code:
    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.


    Conclusions

    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.

    Bye




  2. #2
    Join Date
    Aug 2005
    Location
    On the Internet / Southea
    Beans
    104
    Distro
    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
    Beans
    66

    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
    Beans
    5

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

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

  5. #5
    Join Date
    Mar 2005
    Beans
    108

    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
    Beans
    2

    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
    Beans
    1

    Re: HOWTO: Install FreeNX

    Hi All

    I hope I'm not covering old ground here but I haven't found an answer yet so here goes...

    I walked through the process of installing freenx on Breezy and everything seems to install fine. When I try to connect from any client (I've tried a win98 client and a local client on the same machine as the server) with exactly the same results. The connection goes through the authentication process with no problem then times out. The client error log is:


    ----------------------------------------------------------------------------------------------------------------------------------
    NX> 203 NXSSH running with pid: 6200
    NX> 285 Enabling check on switch command
    NX> 285 Enabling skip of SSH config files
    NX> 200 Connected to address: 140.252.38.32 on port: 22
    NX> 202 Authenticating user: nx
    NX> 208 Using auth method: publickey
    HELLO NXSERVER - Version 1.4.0-45-SVN OS (GPL)
    NX> 105 hello NXCLIENT - Version 1.5.0
    NX> 134 Accepted protocol: 1.5.0
    NX> 105 SET SHELL_MODE SHELL
    NX> 105 SET AUTH_MODE PASSWORD
    NX> 105 login
    NX> 101 User: cole
    NX> 102 Password:
    NX> 103 Welcome to: dallas user: cole
    NX> 105 listsession --user="cole" --status="suspended,running" --geometry="1600x1200x24+render" --type="unix-kde"
    NX> 127 Sessions list of user 'cole' for reconnect:

    Display Type Session ID Options Depth Screen Status Session Name
    ------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------


    NX> 148 Server capacity: not reached for user: cole
    NX> 105 startsession --session="dallas" --type="unix-kde" --cache="16M" --images="128M" --cookie="******" --link="adsl" --kbtype="pc102/us" --nodelay="1" --encryption="1" --backingstore="when_requested" --geometry="800x600+400+261" --media="0" --agent_server="" --agent_user="" agent_password="******"" --screeninfo="800x600x24+render"

    ssh_exchange_identification: Connection closed by remote host
    Killed by signal 15.
    ----------------------------------------------------------------------------------------------------------------------------------


    I enabled the server logging and the server error log shows:

    ----------------------------------------------------------------------------------------------------------------------------------
    NX SERVER START: -c /usr/lib/nx/nxserver
    HELLO NXSERVER - Version 1.4.0-45-SVN OS (GPL)
    NX> 105 hello NXCLIENT - Version 1.5.0
    NX> 134 Accepted protocol: 1.5.0
    NX> 105 SET SHELL_MODE SHELL
    NX> 105 SET AUTH_MODE PASSWORD
    NX> 105 login
    NX> 101 User: cole
    NX> 102 Password:
    Info: Auth method: passdb
    NX> 103 Welcome to: dallas user: cole
    NX> 105 listsession --user="cole" --status="suspended,running" --geometry="1600x1200x24+render" --type="unix-kde"
    NX> 127 Sessions list of user 'cole' for reconnect:

    Display Type Session ID Options Depth Screen Status Session Name
    ------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------


    NX> 148 Server capacity: not reached for user: cole
    NX> 105 startsession --session="dallas" --type="unix-kde" --cache="16M" --images="128M" --cookie="******" --link="adsl" --kbtype="pc102/us" --nodelay="1" --encryption="1" --backingstore="when_requested" --geometry="800x600+400+261" --media="0" --agent_server="" --agent_user="" agent_password="******"" --screeninfo="800x600x24+render"

    &session=dallas&type=unix-kde&cache=16M&images=128M&cookie=******&link=adsl& kbtype=pc102/us&nodelay=1&encryption=1&backingstore=when_reques ted&geometry=800x600+400+261&media=0&agent_server= &agent_user=&agent_password=******&screeninfo=800x 600x24+render&clientproto=1.5.0&user=cole&userip=1 40.252.38.32&uniqueid=729621A34353FD29CB3D918230CA 698F&display=1000
    NX> 1004 Error: Session did not start.
    ----------------------------------------------------------------------------------------------------------------------------------

    The tail end (the first time I see errors in it) of the runlog file in my ~/.nx session directory looks like:

    ----------------------------------------------------------------------------------------------------------------------------------
    [Fri Jan 27 23:01:13 2006]: Received line from nxssh process [startsession --session="dallas" --type="unix-kde" --cache="16M" --images="128M" --cookie="******" --link="adsl" --kbtype="pc102/us" --nodelay="1" --encryption="1" --backingstore="when_requested" --geometry="800x600+400+261" --media="0" --agent_server="" --agent_user="" agent_password="******"" --screeninfo="800x600x24+render"
    ] with code [-1]
    [Fri Jan 27 23:01:13 2006]: Received code[-1]
    [Fri Jan 27 23:01:13 2006]: Received line from nxssh process [
    ] with code [-1]
    [Fri Jan 27 23:01:13 2006]: Received code[-1]
    [Fri Jan 27 23:01:20 2006]: Received line from nxssh process [ssh_exchange_identification: Connection closed by remote host^M
    ] with code [-1]
    [Fri Jan 27 23:01:20 2006]: Received code[-1]
    [Fri Jan 27 23:02:10 2006]: printFatalError [Connection timeout]
    [Fri Jan 27 23:02:10 2006]: KillAllComponents 0x86bd320
    [Fri Jan 27 23:02:10 2006]: LoginDialog: stopAllTimers
    [Fri Jan 27 23:02:10 2006]: LoginDialog: stopProgressTimer
    [Fri Jan 27 23:02:10 2006]: LoginDialog::killAllComponents() stopping NXProtoSSH
    [Fri Jan 27 23:02:10 2006]: LoginDialog::killAllComponents() stopping NXssh
    [Fri Jan 27 23:02:10 2006]: NXProcessUnix::StopProcess process [nxssh] with pid [6200]
    [Fri Jan 27 23:02:10 2006]: Received SIGCHLD
    [Fri Jan 27 23:02:10 2006]: end of killAllComponents
    [Fri Jan 27 23:02:10 2006]: LoginDialog::ShowConnectionStatus code=[268] str=[Connection timeout] error=[1]
    [Fri Jan 27 23:02:10 2006]: ProgressDialog:rintNxStatus: [Connection timeout]
    [Fri Jan 27 23:02:10 2006]: LoginDialog: isReconnecting() [0]
    [Fri Jan 27 23:02:10 2006]: Logfile path [/home/cole/.nx/temp/6196/sshlog] exists.
    -------------------------------------------------------------------------------------------------------------------------------

    It looks like there is something wrong with starting the X session from nx but I don't have a clue as to what is happening.

    Again, I apologize if this has been covered somewhere else and I just missed it, but I've been trying to fix this problem for a couple of weeks with no luck. Assistance would be greatly appreciated.

    Thanks
    Lonnie

  8. #8
    Join Date
    Feb 2006
    Beans
    3

    Re: HOWTO: Install FreeNX

    I setup freenx a few weeks ago based on similar instructions.

    I was curious if you or someone else could tell me the reason for this step.

    >> 3) modify the "AuthorizedKeysFile" line in "AuthorizedKeysFile %h/.ssh/authorized_keys2" (default is "%h/.ssh/authorized_keys")

    I recently spent a lot of time setting up key authentication in ssh and I think the above instruction might be outdated/uneccessary but I'm not certain. I think recent versions of ssh don't use authorized_keys2 anymore. I can't figure out why it really matters what the file is called. It seems like changing the name would also cause existing keys to stop working.

    I will look forward to learning more.

    Thanks
    Ryan

  9. #9
    Join Date
    Feb 2006
    Location
    The Netherlands
    Beans
    19
    Distro
    Ubuntu 6.06

    Re: HOWTO: Install FreeNX

    I've installed FreeNX thru apt-get and I've got problems to setup a gnome session. I've followed the instructions at the start of this post. SSH key authentication works on the nxserver. I've enabled gnome sessions in /etc/nxserver/node.conf . But when I try to connect with the NoMachine NX client after authentication a window pops up for a short time showing the NoMachine logo.

    The /var/log/nxserver.log output:

    NX> 1000 NXNODE - Version 1.4.0-45-SVN OS (GPL)
    NX> 700 Session id: boolean-1000-332E484B92FBC5E168B7151EB796B57D
    NX> 705 Session display: 1000
    NX> 703 Session type: unix-application
    NX> 701 Proxy cookie: ac67a433e3357400eb50c258c6c1dd49
    NX> 702 Proxy IP: 127.0.0.1
    NX> 706 Agent cookie: ac67a433e3357400eb50c258c6c1dd49
    NX> 704 Session cache: unix-application
    NX> 707 SSL tunneling: 1
    NX> 710 Session status: running
    NX> 1002 Commit
    NX> 1006 Session status: running
    NX> 105 bye
    Bye
    NX> 999 Bye
    NX> 1009 Session status: terminating
    NX> 1006 Session status: closed
    NX> 1001 Bye.
    Another question I've got is which protocol nx uses, is it a nx protocol or is it also posible to use GDM + xdmcp on port 177? Because xdmcp is enabled, and it is working with a thin client. But selecting xdm in the Nomachine client results in an error that unix-xdm is not supported.

  10. #10
    Join Date
    Nov 2004
    Location
    Curious Land
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Install FreeNX

    Please someone give me a hand with configuration:

    job@UbuntuServer:~$ sudo /etc/init.d/ssh restart
    * Restarting OpenBSD Secure Shell server... /etc/ssh/sshd_config: line 4: Bad configuration option: What
    /etc/ssh/sshd_config: terminating, 1 bad configuration options

    top part of config file with line 4:
    # Package generated configuration file
    # See the sshd(8) manpage for details

    What ports, IPs and protocols we listen for Port 22
    #Use these options to restrict which interfaces/protocols sshd will bind to
    #ListenAddress ::
    #ListenAddress 0.0.0.0
    Protocol 2
    # HostKeys for protocol version 2
    HostKey /etc/ssh/ssh_host_rsa_key
    HostKey /etc/ssh/ssh_host_dsa_key
    #Privilege Separation is turned on for security
    UsePrivilegeSeparation yes

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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