FreeNX (Česky)

From ArchWiki
Revision as of 18:57, 19 July 2008 by Rugged (Talk | contribs)

Jump to: navigation, search

Template:I18n links start

Template:I18n entry Template:I18n entry Template:I18n links end


balíček je rozdělen do 2 částí:

  • freenx (server)
  • nxclient (klient)



Server je přítomen v balíčku jménem 'freenx'.

  • Pro povolení přihlašování prosím přidejte balíček 'sshd' do pole daemonů v souboru /etc/rc.conf

Hlavní konfigurační soubor je umístěn zde:


Pokud jako desktopové prostředí používáte KDE nebo Gnome, nemusíte měnit tento soubor, v tomto případě funfuje vše ve výchozím nastavení. Pokud používáte jiného okenního manažera jako třeba Fluxbox/Openbox nebo Xfce, možná budete muset tento soubor trochu pozměnit (viz níže).


Klíče jsou používány k autentizaci klienta se serverem. Jako výchozí je při instalaci generována dvojice náhodných klíčů, jeden pro server a jeden pro klienta. Je třeba zkopírovat klientský klíč do každého klienta, pomocí kterého se budete chtít připojovat k serveru (ve Windows i v Linuxu).

Klientský klíč naleznete zde"


Případně můžete použít výchozí klíč, který je poskztován NoMachine se všemi klienty. V tomto případě není třeba kopírova náhodně generovaný klíč do každého klienta. Aby server přijímal výchozí klientské klíče, zadejte tento příkaz::

/opt/NX/bin/nxsetup --install --setup-nomachine-key --clean --purge

Znovuvytvoření náhodně generovaných klíčů:

  • /opt/NX/bin/nxsetup --install --clean --purge

Transferring nx keys to an other freenx server:

  • /opt/NX/home/nx/.ssh contains the key files
 -rw------- 1 nx root  697  9. Okt 12:55 authorized_keys
 -rw------- 1 nx root  668  9. Okt 11:48 client.id_dsa.key
 -rw------- 1 nx root  609  9. Okt 12:55
  • Save those files.
  • Add those files to your new server, they need the same permissions, names, group and directory!
 # cp authorized_keys client.id_dsa.key /opt/NX/home/nx/.ssh/
 # chmod 600 /opt/NX/home/nx/.ssh/*
 # chown nx /opt/NX/home/nx/.ssh/*
 # chgrp root /opt/NX/home/nx/.ssh/*
  • Recreate known_hosts file:
 # echo -n > /opt/NX/home/nx/.ssh/known_hosts
 # cat /etc/ssh/ >> /opt/NX/home/nx/.ssh/known_hosts
 # chmod 633 /opt/NX/home/nx/.ssh/known_hosts
 # chown nx /opt/NX/home/nx/.ssh/known_hosts
 # chgrp root /opt/NX/home/nx/.ssh/known_hosts

Starting the server

Once installed the server is effectively running and ready to go, you do not have to do anything manually. The only thing that must be running in order to connect is the sshd daemon.

In actual fact, if you check the process list (ps aux) you may not see the nxserver running even though it says it is. This is because the nxserver is actually started by logging into sshd as the special user 'nx'. This user has been set up to use the nxserver as its shell, much like a normal user has bash as the default shell.


Arch Linux

Get the client from pacman:

pacman -S nxclient


Get the client from nomachine's homepage:

Tip: Nomachine tends to remove old clients from their homepage, If your setup works with a client save it at a safe place ;)


As mentioned above, the client must contain the correct key to connect to the server. If you are using the custom keys generated during install, you need to copy the client key to the following locations:

  • Windows: <yourinstalldironwindows>/share/keys/client.id_dsa.key
  • Arch Linux: /opt/NX/share/keys/client.id_dsa.key

After moving the keys you may have use the nxclient GUI to import the new keys. From the configuration dialog press the 'Key...' button and import the new client key.


Keyboard shortcuts

CTR+ALT+F          Toggles full-screen mode. 
CTRL+ALT+T         Shows the terminate, suspend dialog.
CTRL+ALT+M         Maximizes of minimizes the window 
CTRL+ALT+Mouse     Drags the viewport, so you can view different portions 
                   of the desktop. 
or                 Moves the viewport by an incremental amount of pixels. 
CTRL+ALT+S         It will activate "screen-scraping" mode, so all the GetImage
                   originated by the clients will be forwarded to the real
                   display. This should make happy those who love taking
                   screenshots ;-). By pressing the sequence again, nxagent
                   will revert to the usual "fast" mode.
CTRL+ALT+E         lazy image encoding
CTRL+ALT+Shift+ESC Emergency-exit and kill-window

Leaving fullscreen

There is a magic-pixel in the top right corner of nearly every nx-application in fullscreenmode. Right-click the pixel and application-window gets iconified.

Tips on resume

  • Resume is a bit experimental, crashes might appear after session has resumed. You have to find out which apps like resuming and which do not ;) .
  • Resuming between Linux and Windows sessions does not work.
  • If resume fails let it time out and don't use the cancel button, else sessions will stay open and consume RAM on server. To kill such sessions use the Session Admin program to kill them.

Fix DPI settings

If you like to have the same font-sizes/dpi sizes on all your client session, set the X resource "Xft.dpi". For example putting the following line into a user's "~/.Xresources" makes her/his "desktop" a 100dpi. Xft.dpi: 100

Setting up non-KDE or Gnome desktop managers

Before following anything in this part, make sure the server working setup and accepting connections. This section only deals with problems once NXClient has logged on.

It is quite simple (once the server is setup) to connect to Gnome and KDE sessions, however connecting to other window managers (fluxbox, xfce, whatever) is slightly different.

Choosing "custom" and using a command like startx of startfluxbox will either result in a blank screen after the !M logo or the Client to present an error complaining about lack of a X server. A way around this is open a session with the command "startx", and the another with the command to start your window-manager-of-choice.

If you do not want to do this, you can start X by installing a login manager like SLIM or XDM. I would recomend using SLiM because of it's small size.

(Authors note: This is how I got fluxbox, xfce and others to work on my arch installation- however, I have now removed slim from inittab and set the run level back to 3, and yet I can still login perfectly with NXClient. Possibly try this if you get your system working this way, if like me you have a low memory machine.)

Alternative fix

A simple fix without resorting to the above seems to involve a simple edit to the config file. This should work for fluxbox/openbox/xfce or any other window manager that uses the .xinitrc startup file in a call to startx.

Simply edit the config file (as root):


and change




Remember to remove the # symbol from the start of the line.

Then in the client under configuration settings, choose Custom as the desktop, and click on settings:

  • In the first group select - Run the default X client Script on server
  • In the second group select - New virtual desktop


Debug problems

Edit the nxserver config file:

 vi /opt/NX/etc/node.conf





Then you can look/debug the log files in:


For succesfull connections and:


For failed ones.

Authentication OK, but connection fails

If you are trying to startkde

 vi /opt/NX/etc/node.conf

And search for:


Replace for:


Key changes

Change the key in GUI setup to new generated key.

Xorg 7

Be aware that you have to remove the /usr/X11R6 directory, else strange things can happen.

Wrong password / No connection possible

  • If you get always wrong password or no connection after authentication was done and you are sure that you typed it correct, check that your server can connect to itself using localhost by ssh and that it is not blocked either by /etc/hosts.deny or not allowed by /etc/hosts.allow.
  • If you messed up your key files, create new ones or fix the old ones, it's probably caused by a wrong known_hosts file.

NX Crashes on session startup

If your NX Client shows the NX logo then disappears with a Connection Problem dialog afterwards.

Then it could be due to missing fonts. Mostly applies if you have installed ArchLinux base and then installed freenx after without the whole X11 set.

Solution until FreeNX Dependencies is fixed is to install xorg-fonts-misc on your NX Server (pacman -S xorg-fonts-misc) and your NX should work.

Note: This does not apply to freenx 0.6.1-3 and above, fix has been incorporated in it and following versions.

NX logo then blank screen

If you see the NX logo (!M) then a blank screen.

This problem can be solved by running a login manager- The problem is that X11 is not started, and it appears that "startx" or similar do not work from the freenx client. Follow these instructions to setup a login manager and load it at startup: Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup