Fedora 11 x86_64 Setup freeNX Server

Scenario / Question:

How do I setup freeNX on a remote server system running Fedora x86_64 4bit OS.

Solution / Answer:

Installing the freeNX server software on the remote server machine and using the NoMachine freenx client to connect to it from you local machine.

Installing freeNX Server:

On the server you want to control with freeNX

Install freenx using yum:

# yum install nx freenx

Copy minimal configuration file:

# cp /etc/nxserver/node.conf.sample /etc/nxserver/node.conf

Enable PASSDB for NX Database User Authentication pass-through:

Uncomment and change the following line in /etc/nxserver/node.conf

ENABLE_PASSDB_AUTHENTICATION="1"

Add a user account to the nxserver database ( the user account must already exist on the system as a standard linux user account):

# /usr/libexec/nx/nxserver --adduser <username>

Give the user a password:

# /usr/libexec/nx/nxserver --passwd <username>

Setup the FreeNX SSH Keys

You need to have nx create the ssh keys.

# /usr/libexec/nx/nxsetup --install --setup-nomachine-key

Setup GDM XDMCP access

You need to configure GDM config file /etc/gdm/custom.conf and add “Enable=true” to [xdmcp] and

# vi /etc/gdm/custom.conf

# GDM configuration storage

[xdmcp]
Enable=true

[chooser]

[security]
DisallowTCP=false

[debug]

Installing freeNX NoMachine Client:

The NoMachine client needs to be downloaded from their site. Download the client that matches the operating system on your local machine.

http://www.nomachine.com/download.php

After installing the NoMachine client open the NX Connection Wizard.

Enter a Session Name, Hostname or IP of the remote server system, SSH Port number of the remote server system (usually 22), and select your connection type. Click Next

nx-connection-wizard

nx-connection-wizard

Select the connection type, desktop system and the size of the desktop. Click Next

nx-connection-wizard-1

nx-connection-wizard-1

Click Finish

nx-connection-wizard-2

nx-connection-wizard-2

freeNX SSH Keys configuration:

In order for freeNX to function securely we need to copy the ssh key from the remote server system to the local machines NoMachine client software.

On the remote server system copy the client.id_dsa.key contents (including the —BEGIN— and —- END— lines):

# cat /etc/nxserver/client.id_dsa.key

On the local client system open the NX client software and click on “Configure”:

nx

nx

Under the General tab, click “Key”

nx-test1

nx-test1

Delete the contents and paste in the contents from the remote server system /etc/nxserver/client.id_dsa.key

general-key-management

general-key-management

Now connect using the username and password you created when you configured freeNX on the remote server system.

Common Errors:

The nx service is not available or the nx access was disabled

The issue with the above error is that you copied the wrong ssh key and most likely followed the process from an old tutorial that told you to copy the key from /etc/nxserver or told you to create your own key. The key you should copy is found at /etc/nxserver/client.id_dsa.key

Keyboard Layout Error

When connecting to FreeNX server your keyboard layout is giving errors. Typically the up arrow key is causing the print screen dialog to show. To correct problem you need to adjust Xorg on the client system.

Fedora:

Create xorg.conf:

# Xorg -configure :1
# cp /root/xorg.conf.new /etc/X11/xorg.conf

Add the following to xorg.conf:

Section "ServerFlags"
        Option          "AllowEmptyInput" "off"
        Option          "AutoAddDevices" "false"
        Option          "DontZap" "false"
EndSection

Restart Xorg:

ctrl-alt-backspace
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
Fabio Milano has written 79 articles for us. Fabio Milano is a certified RHCE, MCP, and CFOI. He runs an IT consulting and services company called RDS Support inc. Website:http://www.rdssupport.com
The information provided is for educational purposes only. All content including links and comments is provided "as is" with no warranty, expressed or implied. Use is at your own risk and you are solely responsible for what you do with it.

9 Comments so far

  1. DaveyBob on August 17th, 2009

    I’m running Fedora 10, and this was working until recently. Apparently, some update hosed it. I completely uninstalled freenx and nx, and reinstalled it following your directions, but I get the same result: NX server is not available blah blah blah.

    This is driving me nuts…

  2. Knu-o2 on August 26th, 2009

    I’m running Fedora 11, and am having same problem as DaveyBob. I am as sure as I can be that I have copied the correct key over to the Windows Nomachine client. But still I get “The NX service is not available or the NX access was disabled on host xxx.xxx.xxx.xxx.”

    Anybody got a clue?

  3. Fabio Milano on August 28th, 2009

    @Knu-o2,

    Have you tried rebooting the fedora 11 machine ?

    Tell nx to install new key:

    /usr/libexec/nx/nxsetup –install –setup-nomachine-key

  4. DaveyBob on August 29th, 2009

    I solved this problem!

    I installed Ubuntu 9.04, and Remote Desktop stuff worked without a hitch right off the bat.

    Probably not the fix you were looking for, but there it is. Works for me.

  5. Arbaal on September 9th, 2009

    the problem with nx server not being available most of the time is related to wrong permissions on the key files and authorized_keys (or authorized_keys2) files.

    here is what you have to do:
    chmod 755 /var/lib/nxserver
    chmod 755 /var/lib/nxserver/home
    chmod 755 /var/lib/nxserver/home/.ssh
    chmod 600 /var/lib/nxserver/home/.ssh/authorized_keys

    or

    chmod 600 /var/lib/nxserver/home/.ssh/authorized_keys2

    chown nx /var/lib/nxserver/home/.ssh/authorized_keys2

    or
    chown nx /var/lib/nxserver/home/.ssh/authorized_keys

    depending on your server’s sshd configuration!

    after that, if you add your own id_dsa.pub to authorized keys:

    1) generate your key :
    cd ~/.ssh
    ssh-keygen -t dsa
    (press enter few times as answers to questions)
    you will have two files there:
    id_dsa and id_dsa.pub

    copy the content of id_dsa.pub

    ssh as root to your server machine (the one running nxserver) and copy and paste that into

    /var/lib/nxserver/home/.ssh/authorized_keys
    or
    /var/lib/nxserver/home/.ssh/authorized_keys2

    (depending which file is being used by sshd )
    Arbaal

  6. JRozario on October 30th, 2009

    Fedora 11 worked like a breeze , THANKS !!!!!!

  7. glen worstell on November 5th, 2009

    I am running freenx on ubuntu 9.04 amd64 server. I have 8 or so clients that connect using nx client from nomachines. There is a mixture of client oses – windows xp (mostly), mac, ubuntu.

    This has happened to two different users: everything was working great, and then one day the nx connection timed out.

    When it does not work it does not work from any client computer, so I don’t think the client nx program is the problem.

    The latest versions of freenx server and nomachine client are installed on the server and on the client machines.

    Has anyone else had a problem like this? Any suggestions?

    g.

  8. muthii on January 2nd, 2011

    A solution I found to the “The NX service is not available or the NX access was disabled on host xxx.xxx.xxx.xxx.” error is to use the key below in my clients

    /var/lib/nxserver/home/.ssh/client.id_dsa.key

    But at first I was using the key fabio is using above then after a reboot I had to use this key to connect.

  9. martin on March 27th, 2011

    Very nice tutorial. I tried all steps and the last one from muthii, could pass authentication but still can’t get it work. Have the following from NXClient. Any suggestion what i should look at next?

    Info: Display running with pid ’2424′ and handler ’0x1905e4′.

    NXPROXY – Version 3.4.0

    Copyright (C) 2001, 2010 NoMachine.

    Info: Proxy running in client mode with pid ’3776′.
    Session: Starting session at ‘Mon Mar 28 09:11:17 2011′.
    Warning: Connected to remote version 3.3.0 with local version 3.4.0.
    Info: Connection with remote proxy completed.
    Info: Using ADSL link parameters 512/24/1/0.
    Info: Using cache parameters 4/4096KB/16384KB/16384KB.
    Info: Using pack method ‘adaptive-7′ with session ‘kde’.
    Info: Using ZLIB data compression 1/1/32.
    Info: Using ZLIB stream compression 4/4.
    Info: No suitable cache file found.
    Info: Forwarding X11 connections to display ‘:0′.
    Info: Listening to font server connections on port ’12000′.
    Session: Session started at ‘Mon Mar 28 09:11:17 2011′.
    Info: Established X server connection.
    Info: Using shared memory parameters 0/0K.
    Session: Terminating session at ‘Mon Mar 28 09:11:17 2011′.
    Session: Session terminated at ‘Mon Mar 28 09:11:17 2011′.

    I have no Info: Display running with pid ’2424′ and handler ’0x1905e4′.

    NXPROXY – Version 3.4.0

    Copyright (C) 2001, 2010 NoMachine.

    Info: Proxy running in client mode with pid ’3776′.
    Session: Starting session at ‘Mon Mar 28 09:11:17 2011′.
    Warning: Connected to remote version 3.3.0 with local version 3.4.0.
    Info: Connection with remote proxy completed.
    Info: Using ADSL link parameters 512/24/1/0.
    Info: Using cache parameters 4/4096KB/16384KB/16384KB.
    Info: Using pack method ‘adaptive-7′ with session ‘kde’.
    Info: Using ZLIB data compression 1/1/32.
    Info: Using ZLIB stream compression 4/4.
    Info: No suitable cache file found.
    Info: Forwarding X11 connections to display ‘:0′.
    Info: Listening to font server connections on port ’12000′.
    Session: Session started at ‘Mon Mar 28 09:11:17 2011′.
    Info: Established X server connection.
    Info: Using shared memory parameters 0/0K.
    Session: Terminating session at ‘Mon Mar 28 09:11:17 2011′.
    Session: Session terminated at ‘Mon Mar 28 09:11:17 2011′.

Leave a reply