https://wiki.archlinux.org/api.php?action=feedcontributions&user=Teekert&feedformat=atomArchWiki - User contributions [en]2024-03-29T12:22:40ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Drupal&diff=255535Talk:Drupal2013-04-28T07:35:18Z<p>Teekert: </p>
<hr />
<div>Question: Is this the right place for a question?<br />
<br />
If so:<br />
I wish to install multiple Drupal sites on my server so I do this:<br />
# pacman -S drupal<br />
<br />
I create a database and "cp -rv /usr/share/webapps/drupal/* /srv/http/mysite"<br />
<br />
Everything works at 127.0.0.1/mysite ! Nice. Now comes site number 2.<br />
<br />
I create a second database and "cp -rv /usr/share/webapps/drupal/* /srv/http/mysite2"<br />
<br />
And this site is my first site but just at the different (127.0.0.1/mysite2) location?<br />
I thought I had copied clean files into the directory?<br />
<br />
When I download the base packages from the Drupal site, I do go into the installation but it complains: "The directory sites/default/files does not exist."<br />
<br />
What am I missing?<br />
<br />
<br />
OK, forget about it... I specifically added each site location separately to "basedir" in "/etc/php/php.ini" and now it works.</div>Teekerthttps://wiki.archlinux.org/index.php?title=Talk:Drupal&diff=255439Talk:Drupal2013-04-27T20:46:05Z<p>Teekert: Instructions on running multiple drupal sites?</p>
<hr />
<div>Question: Is this the right place for a question?<br />
<br />
If so:<br />
I wish to install multiple Drupal sites on my server so I do this:<br />
# pacman -S drupal<br />
<br />
I create a database and "cp -rv /usr/share/webapps/drupal/* /srv/http/mysite"<br />
<br />
Everything works at 127.0.0.1/mysite ! Nice. Now comes site number 2.<br />
<br />
I create a second database and "cp -rv /usr/share/webapps/drupal/* /srv/http/mysite2"<br />
<br />
And this site is my first site but just at the different (127.0.0.1/mysite2) location?<br />
I thought I had copied clean files into the directory?<br />
<br />
When I download the base packages from the Drupal site, I do go into the installation but it complains: "The directory sites/default/files does not exist."<br />
<br />
What am I missing?</div>Teekerthttps://wiki.archlinux.org/index.php?title=FreeNX&diff=127431FreeNX2011-01-09T10:02:23Z<p>Teekert: /* Server */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|FreeNX}}<br />
<br />
''NX is an exciting new technology for remote display. It provides <u>''near local speed''</u> application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by [http://www.nomachine.com/ NoMachine] under the GPL. '''FreeNX''' is a GPL implementation of the NX Server and NX Client Components.''<br />
<br />
: &mdash; [http://freenx.berlios.de/ FreeNX - the free NX]<br />
<br />
== Installation ==<br />
package is split up into 2 parts:<br />
* freenx (the server)<br />
* nxclient (the client)<br />
<br />
If you plan using freenx to connect to a headless PC, keep in mind that you'll also need an X server configured, so you should install any relevant [[xorg]] package.<br />
<br />
== Setup ==<br />
<br />
=== Server ===<br />
<br />
The free server is the 'freenx' package. The sshd daemon must be installed and running for it to function properly. Add 'sshd' to daemons array in /etc/rc.conf and ensure your hosts.deny/hosts.allow allows ssh services.<br />
<br />
The main configuration file is located at:<br />
/opt/NX/etc/node.conf<br />
<br />
''If you are running your SSH daemon on a port other than the default port 22, you'll need to uncomment and update:''<pre>SSHD_PORT=22</pre><br />
<br />
{{Note|As of OpenSSL 1.0.0, it is necessary to set proper md5sum command in {{Filename|/opt/NX/etc/node.conf}}: <pre>COMMAND_MD5SUM="md5sum"</pre>}}<br />
<br />
If you use KDE or Gnome desktop environments you do not need to edit this file, as the defaults with the modified MD5SUM command should work in this case. If you use another window manager such as Fluxbox/Openbox or Xfce, you may need to edit this file slightly (see below).<br />
<br />
After installing the freenx package, run <code>/opt/NX/bin/nxsetup --help</code> for an overview of the install and uninstall procedures.<br />
<br />
{{Note|You should also install "xdialog" on the server or you will not see the "suspend/terminate" dialog when you try to close the window or hit "ctrl-alt-T": <pre>pacman -S xdialog</pre>}}<br />
<br />
==== Keys ====<br />
Keys are used to authenticate the clients with the server. By default a new set of random keys are generated during the install, one for the server and one for the clients. You will need to copy this client key to each of your clients that want to connect (Windows and linux).<br />
<br />
The client key can be found here:<br />
/opt/NX/home/nx/.ssh/client.id_dsa.key<br />
<br />
Alternatively you can use the default key that is provided by NoMachine with all clients. In this case you do not need to copy a custom generated key to each client. To get the server to accept the default client keys run:<br />
/opt/NX/bin/nxsetup --install --setup-nomachine-key<br />
<br />
Recreation of random keys:<br />
<br />
/opt/NX/bin/nxsetup --install<br />
<br />
<br />
<br />
Transferring nx keys to another freenx server:<br />
* /opt/NX/home/nx/.ssh contains the key files<br />
-rw------- 1 nx root 697 9. Okt 12:55 authorized_keys<br />
-rw------- 1 nx root 668 9. Okt 11:48 client.id_dsa.key<br />
-rw------- 1 nx root 609 9. Okt 12:55 server.id_dsa.pub.key<br />
* Save those files.<br />
* Add those files to your new server, they need the same permissions, names, group and directory!<br />
# cp authorized_keys client.id_dsa.key server.id_dsa.pub.key /opt/NX/home/nx/.ssh/<br />
# chmod 600 /opt/NX/home/nx/.ssh/*<br />
# chown nx /opt/NX/home/nx/.ssh/*<br />
# chgrp root /opt/NX/home/nx/.ssh/*<br />
* Recreate known_hosts file:<br />
# echo -n 127.0.0.1 > /opt/NX/home/nx/.ssh/known_hosts<br />
# cat /etc/ssh/ssh_host_rsa_key.pub >> /opt/NX/home/nx/.ssh/known_hosts<br />
# chmod 633 /opt/NX/home/nx/.ssh/known_hosts<br />
# chown nx /opt/NX/home/nx/.ssh/known_hosts<br />
# chgrp root /opt/NX/home/nx/.ssh/known_hosts<br />
<br />
==== Starting the server ====<br />
<br />
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. 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.<br />
<br />
You can specify the local addresses sshd should listen for by editing /etc/ssh/sshd_config and adding them in the following format:<br />
<br />
ListenAddress host|IPv4_addr|IPv6_addr<br />
<br />
The original ListenAddress in sshd_config is 0.0.0.0. This listens to all addresses, however adding any address will take precedent to this and and accept connections from the new address only.<br />
<br />
Restart the sshd daemon to put any changes to its configuration into effect:<br />
<br />
sudo /etc/rc.d/sshd restart<br />
<br />
In actual fact, if you check the process list (<code>ps aux</code>) you may not see the nxserver running even though 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.<br />
<br />
=== Client ===<br />
<br />
==== Arch Linux ====<br />
<br />
Get the client from pacman:<br />
pacman -S nxclient<br />
<br />
==== Windows ====<br />
<br />
Get the client from nomachine's homepage: http://www.nomachine.com<br />
<br />
Tip: Nomachine tends to remove old clients from their homepage,<br />
If your setup works with a client save it at a safe place ;)<br />
<br />
==== Configuration ====<br />
<br />
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:<br />
* Windows: <code><yourinstalldironwindows>/share/keys/client.id_dsa.key</code><br />
* Arch Linux: <code>/opt/NX/share/keys/client.id_dsa.key</code><br />
<br />
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.<br />
<br />
<br />
== Running ==<br />
<br />
After installing nxclient on Arch Linux, executables are available in /opt/NX/bin. At the first run of /opt/NX/bin/nxclient, the user will be led through a wizard. <br />
<br />
=== Keyboard shortcuts ===<br />
<br />
<pre><br />
CTR+ALT+F Toggles full-screen mode. <br />
CTRL+ALT+T Shows the terminate, suspend dialog.<br />
CTRL+ALT+M Maximizes of minimizes the window <br />
CTRL+ALT+Mouse Drags the viewport, so you can view different portions <br />
of the desktop. <br />
CTRL+ALT+Arrows <br />
or Moves the viewport by an incremental amount of pixels. <br />
CTRL+ALT+Keypad <br />
CTRL+ALT+S It will activate "screen-scraping" mode, so all the GetImage<br />
originated by the clients will be forwarded to the real<br />
display. This should make happy those who love taking<br />
screenshots ;-). By pressing the sequence again, nxagent<br />
will revert to the usual "fast" mode.<br />
CTRL+ALT+E lazy image encoding<br />
CTRL+ALT+Shift+ESC Emergency-exit and kill-window<br />
</pre><br />
<br />
=== Leaving fullscreen ===<br />
<br />
There is a magic-pixel in the top right corner of nearly every nx-application<br />
in fullscreenmode. Right-click the pixel and application-window gets iconified.<br />
<br />
=== Tips on resume ===<br />
<br />
* 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 ;) .<br />
* Resuming between Linux and Windows sessions does not work. UPDATE: It appears that version 3.2.0-14 is able to resume Windows-suspended sessions.<br />
* 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.<br />
<br />
=== Fix DPI settings ===<br />
<br />
If you like to have the same font-sizes/dpi sizes on all your client session,<br />
set the X resource "Xft.dpi". For example putting the following line into a<br />
user's "~/.Xresources" makes her/his "desktop" a 100dpi.<br />
Xft.dpi: 100<br />
<br />
<br />
== Setting up non-KDE or Gnome desktop managers ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
If you do not want to do this, you can start X by [[Display Manager|installing a login manager like SLIM or XDM]]. I would recomend using SLiM because of it's small size.<br />
<br />
(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.)<br />
<br />
==== Alternative fix ====<br />
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'''.<br />
<br />
Simply edit the config file (as root):<br />
/opt/NX/etc/node.conf<br />
and change<br />
#USER_X_STARTUP_SCRIPT=.Xclients<br />
to<br />
USER_X_STARTUP_SCRIPT=.xinitrc<br />
Remember to remove the # symbol from the start of the line.<br />
<br />
Then in the client under configuration settings, choose '''Custom''' as the desktop, and click on settings:<br />
* In the first group select - '''<code>Run the default X client Script on server</code>'''<br />
* In the second group select - '''<code>New virtual desktop</code>'''<br />
<br />
<br />
== Problems ==<br />
<br />
<br />
=== Debug problems ===<br />
<br />
<br />
Edit the nxserver config file:<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
Change:<br />
<br />
#SESSION_LOG_CLEAN=1<br />
<br />
to <br />
<br />
SESSION_LOG_CLEAN=0<br />
<br />
Then you can look/debug the log files in:<br />
<br />
$HOME/.nx/T-C-<hostname>-<display>-<session-id><br />
For succesfull connections and:<br />
<br />
$HOME/.nx/F-C-<hostname>-<display>-<session-id><br />
For failed ones.<br />
<br />
<br />
=== Authentication OK, but connection fails ===<br />
<br />
If you are trying to startkde <br />
<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
<br />
<br />
And search for:<br />
<br />
COMMAND_START_KDE=startkde<br />
<br />
Replace for:<br />
<br />
<br />
COMMAND_START_KDE=/usr/bin/startkde<br />
<br />
=== Key changes ===<br />
Change the key in GUI setup to new generated key.<br />
<br />
=== Xorg 7 ===<br />
Be aware that you have to remove the /usr/X11R6 directory, else strange things<br />
can happen.<br />
<br />
=== Wrong password / No connection possible ===<br />
* If you have changed your ssh daemon to run on an alternate port, be sure to modify SSHD_PORT within /opt/NX/etc/node.conf.<br />
<br />
* 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.<br />
You must allow local access for sshd. Example /etc/hosts.deny file :<br />
# /etc/hosts.deny<br />
#<br />
sshd: localhost.localdomain: ALLOW<br />
ALL: ALL: DENY<br />
<br />
* 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.<br />
<br />
* If you get wrong password or login, put '''ENABLE_PASSDB_AUTHENTICATION="1"''' in /opt/NX/etc/node.conf and add a user by<br />
# /opt/NX/bin/nxserver --adduser [username]<br />
# /opt/NX/bin/nxserver --passwd [username]<br />
<br />
==== NX Crashes on session startup ====<br />
If your NX Client shows the NX logo then disappears with a Connection Problem dialog afterwards.<br />
<br />
Then it could be due to missing fonts. Mostly applies if you have installed Arch Linux base and then installed freenx after without the whole X11 set.<br />
<br />
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.<br />
<br />
Note: This does not apply to freenx 0.6.1-3 and above, fix has been incorporated in it and following versions.<br />
<br />
=== NX logo then blank screen ===<br />
<br />
If you see the NX logo (!M) then a blank screen.<br />
<br />
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.<br />
Follow these instructions to setup a login manager and load it at startup: [[Display Manager]]<br />
<br />
Blind: If this does not resolve your issues, be aware that freenx and bash_completion do not play well together. I only got things to work after removing bash_completion from the .bashrc.<br />
<br />
=== GDM/XDM Session Menu Error with non-KDE or Gnome Desktop Managers (more common with non-Arch Linux users) ===<br />
<br />
Problem: A session menu comes up talking about "chooseSessionListWidget." A window manager never loads.<br />
<br />
Fix :<br />
<br />
Double check to see if ~/.xinitrc is executable.<br />
<br />
ls -la ~/ | grep .xinitrc<br />
<br />
If the file is not executable, simply<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
Keep in mind this command should be executed along with pertinent instructions on this page about "Setting up non-KDE or Gnome desktop managers"<br />
<br />
<br />
=== Cannot connect because command sessreg not found ===<br />
<br />
If you get the following error while connecting<br />
<br />
/opt/NX/bin/nxserver: line 941: sessreg: command not found<br />
NX> 280 Exiting on signal: 15<br />
<br />
then you have to install the package xorg-server-utils.</div>Teekerthttps://wiki.archlinux.org/index.php?title=FreeNX&diff=127430FreeNX2011-01-09T10:01:57Z<p>Teekert: /* Server */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|FreeNX}}<br />
<br />
''NX is an exciting new technology for remote display. It provides <u>''near local speed''</u> application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by [http://www.nomachine.com/ NoMachine] under the GPL. '''FreeNX''' is a GPL implementation of the NX Server and NX Client Components.''<br />
<br />
: &mdash; [http://freenx.berlios.de/ FreeNX - the free NX]<br />
<br />
== Installation ==<br />
package is split up into 2 parts:<br />
* freenx (the server)<br />
* nxclient (the client)<br />
<br />
If you plan using freenx to connect to a headless PC, keep in mind that you'll also need an X server configured, so you should install any relevant [[xorg]] package.<br />
<br />
== Setup ==<br />
<br />
=== Server ===<br />
<br />
The free server is the 'freenx' package. The sshd daemon must be installed and running for it to function properly. Add 'sshd' to daemons array in /etc/rc.conf and ensure your hosts.deny/hosts.allow allows ssh services.<br />
<br />
The main configuration file is located at:<br />
/opt/NX/etc/node.conf<br />
<br />
''If you are running your SSH daemon on a port other than the default port 22, you'll need to uncomment and update:''<pre>SSHD_PORT=22</pre><br />
<br />
{{Note|As of OpenSSL 1.0.0, it is necessary to set proper md5sum command in {{Filename|/opt/NX/etc/node.conf}}: <pre>COMMAND_MD5SUM="md5sum"</pre>}}<br />
<br />
If you use KDE or Gnome desktop environments you do not need to edit this file, as the defaults with the modified MD5SUM command should work in this case. If you use another window manager such as Fluxbox/Openbox or Xfce, you may need to edit this file slightly (see below).<br />
<br />
After installing the freenx package, run <code>/opt/NX/bin/nxsetup --help</code> for an overview of the install and uninstall procedures.<br />
<br />
{{Note|You should also install "xdialog" on the server or you will not see the "suspend/terminate" dialog when you try to close the window or hit "ctrl-alt-T": <pre>pacman -S xdialog</pre><br />
See see https://bugs.archlinux.org/task/22051?project=1&string=dialog for more details for more details}}<br />
<br />
==== Keys ====<br />
Keys are used to authenticate the clients with the server. By default a new set of random keys are generated during the install, one for the server and one for the clients. You will need to copy this client key to each of your clients that want to connect (Windows and linux).<br />
<br />
The client key can be found here:<br />
/opt/NX/home/nx/.ssh/client.id_dsa.key<br />
<br />
Alternatively you can use the default key that is provided by NoMachine with all clients. In this case you do not need to copy a custom generated key to each client. To get the server to accept the default client keys run:<br />
/opt/NX/bin/nxsetup --install --setup-nomachine-key<br />
<br />
Recreation of random keys:<br />
<br />
/opt/NX/bin/nxsetup --install<br />
<br />
<br />
<br />
Transferring nx keys to another freenx server:<br />
* /opt/NX/home/nx/.ssh contains the key files<br />
-rw------- 1 nx root 697 9. Okt 12:55 authorized_keys<br />
-rw------- 1 nx root 668 9. Okt 11:48 client.id_dsa.key<br />
-rw------- 1 nx root 609 9. Okt 12:55 server.id_dsa.pub.key<br />
* Save those files.<br />
* Add those files to your new server, they need the same permissions, names, group and directory!<br />
# cp authorized_keys client.id_dsa.key server.id_dsa.pub.key /opt/NX/home/nx/.ssh/<br />
# chmod 600 /opt/NX/home/nx/.ssh/*<br />
# chown nx /opt/NX/home/nx/.ssh/*<br />
# chgrp root /opt/NX/home/nx/.ssh/*<br />
* Recreate known_hosts file:<br />
# echo -n 127.0.0.1 > /opt/NX/home/nx/.ssh/known_hosts<br />
# cat /etc/ssh/ssh_host_rsa_key.pub >> /opt/NX/home/nx/.ssh/known_hosts<br />
# chmod 633 /opt/NX/home/nx/.ssh/known_hosts<br />
# chown nx /opt/NX/home/nx/.ssh/known_hosts<br />
# chgrp root /opt/NX/home/nx/.ssh/known_hosts<br />
<br />
==== Starting the server ====<br />
<br />
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. 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.<br />
<br />
You can specify the local addresses sshd should listen for by editing /etc/ssh/sshd_config and adding them in the following format:<br />
<br />
ListenAddress host|IPv4_addr|IPv6_addr<br />
<br />
The original ListenAddress in sshd_config is 0.0.0.0. This listens to all addresses, however adding any address will take precedent to this and and accept connections from the new address only.<br />
<br />
Restart the sshd daemon to put any changes to its configuration into effect:<br />
<br />
sudo /etc/rc.d/sshd restart<br />
<br />
In actual fact, if you check the process list (<code>ps aux</code>) you may not see the nxserver running even though 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.<br />
<br />
=== Client ===<br />
<br />
==== Arch Linux ====<br />
<br />
Get the client from pacman:<br />
pacman -S nxclient<br />
<br />
==== Windows ====<br />
<br />
Get the client from nomachine's homepage: http://www.nomachine.com<br />
<br />
Tip: Nomachine tends to remove old clients from their homepage,<br />
If your setup works with a client save it at a safe place ;)<br />
<br />
==== Configuration ====<br />
<br />
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:<br />
* Windows: <code><yourinstalldironwindows>/share/keys/client.id_dsa.key</code><br />
* Arch Linux: <code>/opt/NX/share/keys/client.id_dsa.key</code><br />
<br />
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.<br />
<br />
<br />
== Running ==<br />
<br />
After installing nxclient on Arch Linux, executables are available in /opt/NX/bin. At the first run of /opt/NX/bin/nxclient, the user will be led through a wizard. <br />
<br />
=== Keyboard shortcuts ===<br />
<br />
<pre><br />
CTR+ALT+F Toggles full-screen mode. <br />
CTRL+ALT+T Shows the terminate, suspend dialog.<br />
CTRL+ALT+M Maximizes of minimizes the window <br />
CTRL+ALT+Mouse Drags the viewport, so you can view different portions <br />
of the desktop. <br />
CTRL+ALT+Arrows <br />
or Moves the viewport by an incremental amount of pixels. <br />
CTRL+ALT+Keypad <br />
CTRL+ALT+S It will activate "screen-scraping" mode, so all the GetImage<br />
originated by the clients will be forwarded to the real<br />
display. This should make happy those who love taking<br />
screenshots ;-). By pressing the sequence again, nxagent<br />
will revert to the usual "fast" mode.<br />
CTRL+ALT+E lazy image encoding<br />
CTRL+ALT+Shift+ESC Emergency-exit and kill-window<br />
</pre><br />
<br />
=== Leaving fullscreen ===<br />
<br />
There is a magic-pixel in the top right corner of nearly every nx-application<br />
in fullscreenmode. Right-click the pixel and application-window gets iconified.<br />
<br />
=== Tips on resume ===<br />
<br />
* 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 ;) .<br />
* Resuming between Linux and Windows sessions does not work. UPDATE: It appears that version 3.2.0-14 is able to resume Windows-suspended sessions.<br />
* 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.<br />
<br />
=== Fix DPI settings ===<br />
<br />
If you like to have the same font-sizes/dpi sizes on all your client session,<br />
set the X resource "Xft.dpi". For example putting the following line into a<br />
user's "~/.Xresources" makes her/his "desktop" a 100dpi.<br />
Xft.dpi: 100<br />
<br />
<br />
== Setting up non-KDE or Gnome desktop managers ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
If you do not want to do this, you can start X by [[Display Manager|installing a login manager like SLIM or XDM]]. I would recomend using SLiM because of it's small size.<br />
<br />
(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.)<br />
<br />
==== Alternative fix ====<br />
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'''.<br />
<br />
Simply edit the config file (as root):<br />
/opt/NX/etc/node.conf<br />
and change<br />
#USER_X_STARTUP_SCRIPT=.Xclients<br />
to<br />
USER_X_STARTUP_SCRIPT=.xinitrc<br />
Remember to remove the # symbol from the start of the line.<br />
<br />
Then in the client under configuration settings, choose '''Custom''' as the desktop, and click on settings:<br />
* In the first group select - '''<code>Run the default X client Script on server</code>'''<br />
* In the second group select - '''<code>New virtual desktop</code>'''<br />
<br />
<br />
== Problems ==<br />
<br />
<br />
=== Debug problems ===<br />
<br />
<br />
Edit the nxserver config file:<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
Change:<br />
<br />
#SESSION_LOG_CLEAN=1<br />
<br />
to <br />
<br />
SESSION_LOG_CLEAN=0<br />
<br />
Then you can look/debug the log files in:<br />
<br />
$HOME/.nx/T-C-<hostname>-<display>-<session-id><br />
For succesfull connections and:<br />
<br />
$HOME/.nx/F-C-<hostname>-<display>-<session-id><br />
For failed ones.<br />
<br />
<br />
=== Authentication OK, but connection fails ===<br />
<br />
If you are trying to startkde <br />
<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
<br />
<br />
And search for:<br />
<br />
COMMAND_START_KDE=startkde<br />
<br />
Replace for:<br />
<br />
<br />
COMMAND_START_KDE=/usr/bin/startkde<br />
<br />
=== Key changes ===<br />
Change the key in GUI setup to new generated key.<br />
<br />
=== Xorg 7 ===<br />
Be aware that you have to remove the /usr/X11R6 directory, else strange things<br />
can happen.<br />
<br />
=== Wrong password / No connection possible ===<br />
* If you have changed your ssh daemon to run on an alternate port, be sure to modify SSHD_PORT within /opt/NX/etc/node.conf.<br />
<br />
* 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.<br />
You must allow local access for sshd. Example /etc/hosts.deny file :<br />
# /etc/hosts.deny<br />
#<br />
sshd: localhost.localdomain: ALLOW<br />
ALL: ALL: DENY<br />
<br />
* 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.<br />
<br />
* If you get wrong password or login, put '''ENABLE_PASSDB_AUTHENTICATION="1"''' in /opt/NX/etc/node.conf and add a user by<br />
# /opt/NX/bin/nxserver --adduser [username]<br />
# /opt/NX/bin/nxserver --passwd [username]<br />
<br />
==== NX Crashes on session startup ====<br />
If your NX Client shows the NX logo then disappears with a Connection Problem dialog afterwards.<br />
<br />
Then it could be due to missing fonts. Mostly applies if you have installed Arch Linux base and then installed freenx after without the whole X11 set.<br />
<br />
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.<br />
<br />
Note: This does not apply to freenx 0.6.1-3 and above, fix has been incorporated in it and following versions.<br />
<br />
=== NX logo then blank screen ===<br />
<br />
If you see the NX logo (!M) then a blank screen.<br />
<br />
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.<br />
Follow these instructions to setup a login manager and load it at startup: [[Display Manager]]<br />
<br />
Blind: If this does not resolve your issues, be aware that freenx and bash_completion do not play well together. I only got things to work after removing bash_completion from the .bashrc.<br />
<br />
=== GDM/XDM Session Menu Error with non-KDE or Gnome Desktop Managers (more common with non-Arch Linux users) ===<br />
<br />
Problem: A session menu comes up talking about "chooseSessionListWidget." A window manager never loads.<br />
<br />
Fix :<br />
<br />
Double check to see if ~/.xinitrc is executable.<br />
<br />
ls -la ~/ | grep .xinitrc<br />
<br />
If the file is not executable, simply<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
Keep in mind this command should be executed along with pertinent instructions on this page about "Setting up non-KDE or Gnome desktop managers"<br />
<br />
<br />
=== Cannot connect because command sessreg not found ===<br />
<br />
If you get the following error while connecting<br />
<br />
/opt/NX/bin/nxserver: line 941: sessreg: command not found<br />
NX> 280 Exiting on signal: 15<br />
<br />
then you have to install the package xorg-server-utils.</div>Teekerthttps://wiki.archlinux.org/index.php?title=FreeNX&diff=127429FreeNX2011-01-09T10:00:46Z<p>Teekert: /* Server */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|FreeNX}}<br />
<br />
''NX is an exciting new technology for remote display. It provides <u>''near local speed''</u> application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by [http://www.nomachine.com/ NoMachine] under the GPL. '''FreeNX''' is a GPL implementation of the NX Server and NX Client Components.''<br />
<br />
: &mdash; [http://freenx.berlios.de/ FreeNX - the free NX]<br />
<br />
== Installation ==<br />
package is split up into 2 parts:<br />
* freenx (the server)<br />
* nxclient (the client)<br />
<br />
If you plan using freenx to connect to a headless PC, keep in mind that you'll also need an X server configured, so you should install any relevant [[xorg]] package.<br />
<br />
== Setup ==<br />
<br />
=== Server ===<br />
<br />
The free server is the 'freenx' package. The sshd daemon must be installed and running for it to function properly. Add 'sshd' to daemons array in /etc/rc.conf and ensure your hosts.deny/hosts.allow allows ssh services.<br />
<br />
The main configuration file is located at:<br />
/opt/NX/etc/node.conf<br />
<br />
''If you are running your SSH daemon on a port other than the default port 22, you'll need to uncomment and update:''<pre>SSHD_PORT=22</pre><br />
<br />
{{Note|As of OpenSSL 1.0.0, it is necessary to set proper md5sum command in {{Filename|/opt/NX/etc/node.conf}}: <pre>COMMAND_MD5SUM="md5sum"</pre>}}<br />
<br />
If you use KDE or Gnome desktop environments you do not need to edit this file, as the defaults with the modified MD5SUM command should work in this case. If you use another window manager such as Fluxbox/Openbox or Xfce, you may need to edit this file slightly (see below).<br />
<br />
After installing the freenx package, run <code>/opt/NX/bin/nxsetup --help</code> for an overview of the install and uninstall procedures.<br />
<br />
{{Note|You should also install "xdialog" on the server or you will not see the "suspend/terminate" dialog when you try to close the window or hit "ctrl-alt-T" (see https://bugs.archlinux.org/task/22051?project=1&string=dialog for more details): <pre>pacman -S xdialog</pre>}}<br />
<br />
==== Keys ====<br />
Keys are used to authenticate the clients with the server. By default a new set of random keys are generated during the install, one for the server and one for the clients. You will need to copy this client key to each of your clients that want to connect (Windows and linux).<br />
<br />
The client key can be found here:<br />
/opt/NX/home/nx/.ssh/client.id_dsa.key<br />
<br />
Alternatively you can use the default key that is provided by NoMachine with all clients. In this case you do not need to copy a custom generated key to each client. To get the server to accept the default client keys run:<br />
/opt/NX/bin/nxsetup --install --setup-nomachine-key<br />
<br />
Recreation of random keys:<br />
<br />
/opt/NX/bin/nxsetup --install<br />
<br />
<br />
<br />
Transferring nx keys to another freenx server:<br />
* /opt/NX/home/nx/.ssh contains the key files<br />
-rw------- 1 nx root 697 9. Okt 12:55 authorized_keys<br />
-rw------- 1 nx root 668 9. Okt 11:48 client.id_dsa.key<br />
-rw------- 1 nx root 609 9. Okt 12:55 server.id_dsa.pub.key<br />
* Save those files.<br />
* Add those files to your new server, they need the same permissions, names, group and directory!<br />
# cp authorized_keys client.id_dsa.key server.id_dsa.pub.key /opt/NX/home/nx/.ssh/<br />
# chmod 600 /opt/NX/home/nx/.ssh/*<br />
# chown nx /opt/NX/home/nx/.ssh/*<br />
# chgrp root /opt/NX/home/nx/.ssh/*<br />
* Recreate known_hosts file:<br />
# echo -n 127.0.0.1 > /opt/NX/home/nx/.ssh/known_hosts<br />
# cat /etc/ssh/ssh_host_rsa_key.pub >> /opt/NX/home/nx/.ssh/known_hosts<br />
# chmod 633 /opt/NX/home/nx/.ssh/known_hosts<br />
# chown nx /opt/NX/home/nx/.ssh/known_hosts<br />
# chgrp root /opt/NX/home/nx/.ssh/known_hosts<br />
<br />
==== Starting the server ====<br />
<br />
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. 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.<br />
<br />
You can specify the local addresses sshd should listen for by editing /etc/ssh/sshd_config and adding them in the following format:<br />
<br />
ListenAddress host|IPv4_addr|IPv6_addr<br />
<br />
The original ListenAddress in sshd_config is 0.0.0.0. This listens to all addresses, however adding any address will take precedent to this and and accept connections from the new address only.<br />
<br />
Restart the sshd daemon to put any changes to its configuration into effect:<br />
<br />
sudo /etc/rc.d/sshd restart<br />
<br />
In actual fact, if you check the process list (<code>ps aux</code>) you may not see the nxserver running even though 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.<br />
<br />
=== Client ===<br />
<br />
==== Arch Linux ====<br />
<br />
Get the client from pacman:<br />
pacman -S nxclient<br />
<br />
==== Windows ====<br />
<br />
Get the client from nomachine's homepage: http://www.nomachine.com<br />
<br />
Tip: Nomachine tends to remove old clients from their homepage,<br />
If your setup works with a client save it at a safe place ;)<br />
<br />
==== Configuration ====<br />
<br />
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:<br />
* Windows: <code><yourinstalldironwindows>/share/keys/client.id_dsa.key</code><br />
* Arch Linux: <code>/opt/NX/share/keys/client.id_dsa.key</code><br />
<br />
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.<br />
<br />
<br />
== Running ==<br />
<br />
After installing nxclient on Arch Linux, executables are available in /opt/NX/bin. At the first run of /opt/NX/bin/nxclient, the user will be led through a wizard. <br />
<br />
=== Keyboard shortcuts ===<br />
<br />
<pre><br />
CTR+ALT+F Toggles full-screen mode. <br />
CTRL+ALT+T Shows the terminate, suspend dialog.<br />
CTRL+ALT+M Maximizes of minimizes the window <br />
CTRL+ALT+Mouse Drags the viewport, so you can view different portions <br />
of the desktop. <br />
CTRL+ALT+Arrows <br />
or Moves the viewport by an incremental amount of pixels. <br />
CTRL+ALT+Keypad <br />
CTRL+ALT+S It will activate "screen-scraping" mode, so all the GetImage<br />
originated by the clients will be forwarded to the real<br />
display. This should make happy those who love taking<br />
screenshots ;-). By pressing the sequence again, nxagent<br />
will revert to the usual "fast" mode.<br />
CTRL+ALT+E lazy image encoding<br />
CTRL+ALT+Shift+ESC Emergency-exit and kill-window<br />
</pre><br />
<br />
=== Leaving fullscreen ===<br />
<br />
There is a magic-pixel in the top right corner of nearly every nx-application<br />
in fullscreenmode. Right-click the pixel and application-window gets iconified.<br />
<br />
=== Tips on resume ===<br />
<br />
* 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 ;) .<br />
* Resuming between Linux and Windows sessions does not work. UPDATE: It appears that version 3.2.0-14 is able to resume Windows-suspended sessions.<br />
* 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.<br />
<br />
=== Fix DPI settings ===<br />
<br />
If you like to have the same font-sizes/dpi sizes on all your client session,<br />
set the X resource "Xft.dpi". For example putting the following line into a<br />
user's "~/.Xresources" makes her/his "desktop" a 100dpi.<br />
Xft.dpi: 100<br />
<br />
<br />
== Setting up non-KDE or Gnome desktop managers ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
If you do not want to do this, you can start X by [[Display Manager|installing a login manager like SLIM or XDM]]. I would recomend using SLiM because of it's small size.<br />
<br />
(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.)<br />
<br />
==== Alternative fix ====<br />
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'''.<br />
<br />
Simply edit the config file (as root):<br />
/opt/NX/etc/node.conf<br />
and change<br />
#USER_X_STARTUP_SCRIPT=.Xclients<br />
to<br />
USER_X_STARTUP_SCRIPT=.xinitrc<br />
Remember to remove the # symbol from the start of the line.<br />
<br />
Then in the client under configuration settings, choose '''Custom''' as the desktop, and click on settings:<br />
* In the first group select - '''<code>Run the default X client Script on server</code>'''<br />
* In the second group select - '''<code>New virtual desktop</code>'''<br />
<br />
<br />
== Problems ==<br />
<br />
<br />
=== Debug problems ===<br />
<br />
<br />
Edit the nxserver config file:<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
Change:<br />
<br />
#SESSION_LOG_CLEAN=1<br />
<br />
to <br />
<br />
SESSION_LOG_CLEAN=0<br />
<br />
Then you can look/debug the log files in:<br />
<br />
$HOME/.nx/T-C-<hostname>-<display>-<session-id><br />
For succesfull connections and:<br />
<br />
$HOME/.nx/F-C-<hostname>-<display>-<session-id><br />
For failed ones.<br />
<br />
<br />
=== Authentication OK, but connection fails ===<br />
<br />
If you are trying to startkde <br />
<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
<br />
<br />
And search for:<br />
<br />
COMMAND_START_KDE=startkde<br />
<br />
Replace for:<br />
<br />
<br />
COMMAND_START_KDE=/usr/bin/startkde<br />
<br />
=== Key changes ===<br />
Change the key in GUI setup to new generated key.<br />
<br />
=== Xorg 7 ===<br />
Be aware that you have to remove the /usr/X11R6 directory, else strange things<br />
can happen.<br />
<br />
=== Wrong password / No connection possible ===<br />
* If you have changed your ssh daemon to run on an alternate port, be sure to modify SSHD_PORT within /opt/NX/etc/node.conf.<br />
<br />
* 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.<br />
You must allow local access for sshd. Example /etc/hosts.deny file :<br />
# /etc/hosts.deny<br />
#<br />
sshd: localhost.localdomain: ALLOW<br />
ALL: ALL: DENY<br />
<br />
* 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.<br />
<br />
* If you get wrong password or login, put '''ENABLE_PASSDB_AUTHENTICATION="1"''' in /opt/NX/etc/node.conf and add a user by<br />
# /opt/NX/bin/nxserver --adduser [username]<br />
# /opt/NX/bin/nxserver --passwd [username]<br />
<br />
==== NX Crashes on session startup ====<br />
If your NX Client shows the NX logo then disappears with a Connection Problem dialog afterwards.<br />
<br />
Then it could be due to missing fonts. Mostly applies if you have installed Arch Linux base and then installed freenx after without the whole X11 set.<br />
<br />
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.<br />
<br />
Note: This does not apply to freenx 0.6.1-3 and above, fix has been incorporated in it and following versions.<br />
<br />
=== NX logo then blank screen ===<br />
<br />
If you see the NX logo (!M) then a blank screen.<br />
<br />
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.<br />
Follow these instructions to setup a login manager and load it at startup: [[Display Manager]]<br />
<br />
Blind: If this does not resolve your issues, be aware that freenx and bash_completion do not play well together. I only got things to work after removing bash_completion from the .bashrc.<br />
<br />
=== GDM/XDM Session Menu Error with non-KDE or Gnome Desktop Managers (more common with non-Arch Linux users) ===<br />
<br />
Problem: A session menu comes up talking about "chooseSessionListWidget." A window manager never loads.<br />
<br />
Fix :<br />
<br />
Double check to see if ~/.xinitrc is executable.<br />
<br />
ls -la ~/ | grep .xinitrc<br />
<br />
If the file is not executable, simply<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
Keep in mind this command should be executed along with pertinent instructions on this page about "Setting up non-KDE or Gnome desktop managers"<br />
<br />
<br />
=== Cannot connect because command sessreg not found ===<br />
<br />
If you get the following error while connecting<br />
<br />
/opt/NX/bin/nxserver: line 941: sessreg: command not found<br />
NX> 280 Exiting on signal: 15<br />
<br />
then you have to install the package xorg-server-utils.</div>Teekerthttps://wiki.archlinux.org/index.php?title=FreeNX&diff=127428FreeNX2011-01-09T09:58:21Z<p>Teekert: /* Server */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|FreeNX}}<br />
<br />
''NX is an exciting new technology for remote display. It provides <u>''near local speed''</u> application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by [http://www.nomachine.com/ NoMachine] under the GPL. '''FreeNX''' is a GPL implementation of the NX Server and NX Client Components.''<br />
<br />
: &mdash; [http://freenx.berlios.de/ FreeNX - the free NX]<br />
<br />
== Installation ==<br />
package is split up into 2 parts:<br />
* freenx (the server)<br />
* nxclient (the client)<br />
<br />
If you plan using freenx to connect to a headless PC, keep in mind that you'll also need an X server configured, so you should install any relevant [[xorg]] package.<br />
<br />
== Setup ==<br />
<br />
=== Server ===<br />
<br />
The free server is the 'freenx' package. The sshd daemon must be installed and running for it to function properly. Add 'sshd' to daemons array in /etc/rc.conf and ensure your hosts.deny/hosts.allow allows ssh services.<br />
<br />
The main configuration file is located at:<br />
/opt/NX/etc/node.conf<br />
<br />
''If you are running your SSH daemon on a port other than the default port 22, you'll need to uncomment and update:''<pre>SSHD_PORT=22</pre><br />
<br />
{{Note|As of OpenSSL 1.0.0, it is necessary to set proper md5sum command in {{Filename|/opt/NX/etc/node.conf}}: <pre>COMMAND_MD5SUM="md5sum"</pre>}}<br />
<br />
If you use KDE or Gnome desktop environments you do not need to edit this file, as the defaults with the modified MD5SUM command should work in this case. If you use another window manager such as Fluxbox/Openbox or Xfce, you may need to edit this file slightly (see below).<br />
<br />
After installing the freenx package, run <code>/opt/NX/bin/nxsetup --help</code> for an overview of the install and uninstall procedures.<br />
<br />
{{Note|You should also install "xdialog" on the server or you will not see the "suspend/terminate" dialog when you try to close the window or hit "ctrl-alt-T": <pre>pacman -S xdialog</pre>}}<br />
<br />
==== Keys ====<br />
Keys are used to authenticate the clients with the server. By default a new set of random keys are generated during the install, one for the server and one for the clients. You will need to copy this client key to each of your clients that want to connect (Windows and linux).<br />
<br />
The client key can be found here:<br />
/opt/NX/home/nx/.ssh/client.id_dsa.key<br />
<br />
Alternatively you can use the default key that is provided by NoMachine with all clients. In this case you do not need to copy a custom generated key to each client. To get the server to accept the default client keys run:<br />
/opt/NX/bin/nxsetup --install --setup-nomachine-key<br />
<br />
Recreation of random keys:<br />
<br />
/opt/NX/bin/nxsetup --install<br />
<br />
<br />
<br />
Transferring nx keys to another freenx server:<br />
* /opt/NX/home/nx/.ssh contains the key files<br />
-rw------- 1 nx root 697 9. Okt 12:55 authorized_keys<br />
-rw------- 1 nx root 668 9. Okt 11:48 client.id_dsa.key<br />
-rw------- 1 nx root 609 9. Okt 12:55 server.id_dsa.pub.key<br />
* Save those files.<br />
* Add those files to your new server, they need the same permissions, names, group and directory!<br />
# cp authorized_keys client.id_dsa.key server.id_dsa.pub.key /opt/NX/home/nx/.ssh/<br />
# chmod 600 /opt/NX/home/nx/.ssh/*<br />
# chown nx /opt/NX/home/nx/.ssh/*<br />
# chgrp root /opt/NX/home/nx/.ssh/*<br />
* Recreate known_hosts file:<br />
# echo -n 127.0.0.1 > /opt/NX/home/nx/.ssh/known_hosts<br />
# cat /etc/ssh/ssh_host_rsa_key.pub >> /opt/NX/home/nx/.ssh/known_hosts<br />
# chmod 633 /opt/NX/home/nx/.ssh/known_hosts<br />
# chown nx /opt/NX/home/nx/.ssh/known_hosts<br />
# chgrp root /opt/NX/home/nx/.ssh/known_hosts<br />
<br />
==== Starting the server ====<br />
<br />
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. 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.<br />
<br />
You can specify the local addresses sshd should listen for by editing /etc/ssh/sshd_config and adding them in the following format:<br />
<br />
ListenAddress host|IPv4_addr|IPv6_addr<br />
<br />
The original ListenAddress in sshd_config is 0.0.0.0. This listens to all addresses, however adding any address will take precedent to this and and accept connections from the new address only.<br />
<br />
Restart the sshd daemon to put any changes to its configuration into effect:<br />
<br />
sudo /etc/rc.d/sshd restart<br />
<br />
In actual fact, if you check the process list (<code>ps aux</code>) you may not see the nxserver running even though 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.<br />
<br />
=== Client ===<br />
<br />
==== Arch Linux ====<br />
<br />
Get the client from pacman:<br />
pacman -S nxclient<br />
<br />
==== Windows ====<br />
<br />
Get the client from nomachine's homepage: http://www.nomachine.com<br />
<br />
Tip: Nomachine tends to remove old clients from their homepage,<br />
If your setup works with a client save it at a safe place ;)<br />
<br />
==== Configuration ====<br />
<br />
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:<br />
* Windows: <code><yourinstalldironwindows>/share/keys/client.id_dsa.key</code><br />
* Arch Linux: <code>/opt/NX/share/keys/client.id_dsa.key</code><br />
<br />
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.<br />
<br />
<br />
== Running ==<br />
<br />
After installing nxclient on Arch Linux, executables are available in /opt/NX/bin. At the first run of /opt/NX/bin/nxclient, the user will be led through a wizard. <br />
<br />
=== Keyboard shortcuts ===<br />
<br />
<pre><br />
CTR+ALT+F Toggles full-screen mode. <br />
CTRL+ALT+T Shows the terminate, suspend dialog.<br />
CTRL+ALT+M Maximizes of minimizes the window <br />
CTRL+ALT+Mouse Drags the viewport, so you can view different portions <br />
of the desktop. <br />
CTRL+ALT+Arrows <br />
or Moves the viewport by an incremental amount of pixels. <br />
CTRL+ALT+Keypad <br />
CTRL+ALT+S It will activate "screen-scraping" mode, so all the GetImage<br />
originated by the clients will be forwarded to the real<br />
display. This should make happy those who love taking<br />
screenshots ;-). By pressing the sequence again, nxagent<br />
will revert to the usual "fast" mode.<br />
CTRL+ALT+E lazy image encoding<br />
CTRL+ALT+Shift+ESC Emergency-exit and kill-window<br />
</pre><br />
<br />
=== Leaving fullscreen ===<br />
<br />
There is a magic-pixel in the top right corner of nearly every nx-application<br />
in fullscreenmode. Right-click the pixel and application-window gets iconified.<br />
<br />
=== Tips on resume ===<br />
<br />
* 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 ;) .<br />
* Resuming between Linux and Windows sessions does not work. UPDATE: It appears that version 3.2.0-14 is able to resume Windows-suspended sessions.<br />
* 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.<br />
<br />
=== Fix DPI settings ===<br />
<br />
If you like to have the same font-sizes/dpi sizes on all your client session,<br />
set the X resource "Xft.dpi". For example putting the following line into a<br />
user's "~/.Xresources" makes her/his "desktop" a 100dpi.<br />
Xft.dpi: 100<br />
<br />
<br />
== Setting up non-KDE or Gnome desktop managers ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
If you do not want to do this, you can start X by [[Display Manager|installing a login manager like SLIM or XDM]]. I would recomend using SLiM because of it's small size.<br />
<br />
(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.)<br />
<br />
==== Alternative fix ====<br />
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'''.<br />
<br />
Simply edit the config file (as root):<br />
/opt/NX/etc/node.conf<br />
and change<br />
#USER_X_STARTUP_SCRIPT=.Xclients<br />
to<br />
USER_X_STARTUP_SCRIPT=.xinitrc<br />
Remember to remove the # symbol from the start of the line.<br />
<br />
Then in the client under configuration settings, choose '''Custom''' as the desktop, and click on settings:<br />
* In the first group select - '''<code>Run the default X client Script on server</code>'''<br />
* In the second group select - '''<code>New virtual desktop</code>'''<br />
<br />
<br />
== Problems ==<br />
<br />
<br />
=== Debug problems ===<br />
<br />
<br />
Edit the nxserver config file:<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
Change:<br />
<br />
#SESSION_LOG_CLEAN=1<br />
<br />
to <br />
<br />
SESSION_LOG_CLEAN=0<br />
<br />
Then you can look/debug the log files in:<br />
<br />
$HOME/.nx/T-C-<hostname>-<display>-<session-id><br />
For succesfull connections and:<br />
<br />
$HOME/.nx/F-C-<hostname>-<display>-<session-id><br />
For failed ones.<br />
<br />
<br />
=== Authentication OK, but connection fails ===<br />
<br />
If you are trying to startkde <br />
<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
<br />
<br />
And search for:<br />
<br />
COMMAND_START_KDE=startkde<br />
<br />
Replace for:<br />
<br />
<br />
COMMAND_START_KDE=/usr/bin/startkde<br />
<br />
=== Key changes ===<br />
Change the key in GUI setup to new generated key.<br />
<br />
=== Xorg 7 ===<br />
Be aware that you have to remove the /usr/X11R6 directory, else strange things<br />
can happen.<br />
<br />
=== Wrong password / No connection possible ===<br />
* If you have changed your ssh daemon to run on an alternate port, be sure to modify SSHD_PORT within /opt/NX/etc/node.conf.<br />
<br />
* 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.<br />
You must allow local access for sshd. Example /etc/hosts.deny file :<br />
# /etc/hosts.deny<br />
#<br />
sshd: localhost.localdomain: ALLOW<br />
ALL: ALL: DENY<br />
<br />
* 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.<br />
<br />
* If you get wrong password or login, put '''ENABLE_PASSDB_AUTHENTICATION="1"''' in /opt/NX/etc/node.conf and add a user by<br />
# /opt/NX/bin/nxserver --adduser [username]<br />
# /opt/NX/bin/nxserver --passwd [username]<br />
<br />
==== NX Crashes on session startup ====<br />
If your NX Client shows the NX logo then disappears with a Connection Problem dialog afterwards.<br />
<br />
Then it could be due to missing fonts. Mostly applies if you have installed Arch Linux base and then installed freenx after without the whole X11 set.<br />
<br />
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.<br />
<br />
Note: This does not apply to freenx 0.6.1-3 and above, fix has been incorporated in it and following versions.<br />
<br />
=== NX logo then blank screen ===<br />
<br />
If you see the NX logo (!M) then a blank screen.<br />
<br />
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.<br />
Follow these instructions to setup a login manager and load it at startup: [[Display Manager]]<br />
<br />
Blind: If this does not resolve your issues, be aware that freenx and bash_completion do not play well together. I only got things to work after removing bash_completion from the .bashrc.<br />
<br />
=== GDM/XDM Session Menu Error with non-KDE or Gnome Desktop Managers (more common with non-Arch Linux users) ===<br />
<br />
Problem: A session menu comes up talking about "chooseSessionListWidget." A window manager never loads.<br />
<br />
Fix :<br />
<br />
Double check to see if ~/.xinitrc is executable.<br />
<br />
ls -la ~/ | grep .xinitrc<br />
<br />
If the file is not executable, simply<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
Keep in mind this command should be executed along with pertinent instructions on this page about "Setting up non-KDE or Gnome desktop managers"<br />
<br />
<br />
=== Cannot connect because command sessreg not found ===<br />
<br />
If you get the following error while connecting<br />
<br />
/opt/NX/bin/nxserver: line 941: sessreg: command not found<br />
NX> 280 Exiting on signal: 15<br />
<br />
then you have to install the package xorg-server-utils.</div>Teekerthttps://wiki.archlinux.org/index.php?title=FreeNX&diff=127427FreeNX2011-01-09T09:57:53Z<p>Teekert: /* Server */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|FreeNX}}<br />
<br />
''NX is an exciting new technology for remote display. It provides <u>''near local speed''</u> application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by [http://www.nomachine.com/ NoMachine] under the GPL. '''FreeNX''' is a GPL implementation of the NX Server and NX Client Components.''<br />
<br />
: &mdash; [http://freenx.berlios.de/ FreeNX - the free NX]<br />
<br />
== Installation ==<br />
package is split up into 2 parts:<br />
* freenx (the server)<br />
* nxclient (the client)<br />
<br />
If you plan using freenx to connect to a headless PC, keep in mind that you'll also need an X server configured, so you should install any relevant [[xorg]] package.<br />
<br />
== Setup ==<br />
<br />
=== Server ===<br />
<br />
The free server is the 'freenx' package. The sshd daemon must be installed and running for it to function properly. Add 'sshd' to daemons array in /etc/rc.conf and ensure your hosts.deny/hosts.allow allows ssh services.<br />
<br />
The main configuration file is located at:<br />
/opt/NX/etc/node.conf<br />
<br />
''If you are running your SSH daemon on a port other than the default port 22, you'll need to uncomment and update:''<pre>SSHD_PORT=22</pre><br />
<br />
{{Note|As of OpenSSL 1.0.0, it is necessary to set proper md5sum command in {{Filename|/opt/NX/etc/node.conf}}: <pre>COMMAND_MD5SUM="md5sum"</pre>}}<br />
<br />
If you use KDE or Gnome desktop environments you do not need to edit this file, as the defaults with the modified MD5SUM command should work in this case. If you use another window manager such as Fluxbox/Openbox or Xfce, you may need to edit this file slightly (see below).<br />
<br />
After installing the freenx package, run <code>/opt/NX/bin/nxsetup --help</code> for an overview of the install and uninstall procedures.<br />
<br />
{{Note|you should also install "xdialog" on the server or you will not see the "suspend/terminate" dialog when you try to close the window or hit "ctrl-alt-T": <pre>pacman -S xdialog</pre>}}<br />
<br />
==== Keys ====<br />
Keys are used to authenticate the clients with the server. By default a new set of random keys are generated during the install, one for the server and one for the clients. You will need to copy this client key to each of your clients that want to connect (Windows and linux).<br />
<br />
The client key can be found here:<br />
/opt/NX/home/nx/.ssh/client.id_dsa.key<br />
<br />
Alternatively you can use the default key that is provided by NoMachine with all clients. In this case you do not need to copy a custom generated key to each client. To get the server to accept the default client keys run:<br />
/opt/NX/bin/nxsetup --install --setup-nomachine-key<br />
<br />
Recreation of random keys:<br />
<br />
/opt/NX/bin/nxsetup --install<br />
<br />
<br />
<br />
Transferring nx keys to another freenx server:<br />
* /opt/NX/home/nx/.ssh contains the key files<br />
-rw------- 1 nx root 697 9. Okt 12:55 authorized_keys<br />
-rw------- 1 nx root 668 9. Okt 11:48 client.id_dsa.key<br />
-rw------- 1 nx root 609 9. Okt 12:55 server.id_dsa.pub.key<br />
* Save those files.<br />
* Add those files to your new server, they need the same permissions, names, group and directory!<br />
# cp authorized_keys client.id_dsa.key server.id_dsa.pub.key /opt/NX/home/nx/.ssh/<br />
# chmod 600 /opt/NX/home/nx/.ssh/*<br />
# chown nx /opt/NX/home/nx/.ssh/*<br />
# chgrp root /opt/NX/home/nx/.ssh/*<br />
* Recreate known_hosts file:<br />
# echo -n 127.0.0.1 > /opt/NX/home/nx/.ssh/known_hosts<br />
# cat /etc/ssh/ssh_host_rsa_key.pub >> /opt/NX/home/nx/.ssh/known_hosts<br />
# chmod 633 /opt/NX/home/nx/.ssh/known_hosts<br />
# chown nx /opt/NX/home/nx/.ssh/known_hosts<br />
# chgrp root /opt/NX/home/nx/.ssh/known_hosts<br />
<br />
==== Starting the server ====<br />
<br />
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. 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.<br />
<br />
You can specify the local addresses sshd should listen for by editing /etc/ssh/sshd_config and adding them in the following format:<br />
<br />
ListenAddress host|IPv4_addr|IPv6_addr<br />
<br />
The original ListenAddress in sshd_config is 0.0.0.0. This listens to all addresses, however adding any address will take precedent to this and and accept connections from the new address only.<br />
<br />
Restart the sshd daemon to put any changes to its configuration into effect:<br />
<br />
sudo /etc/rc.d/sshd restart<br />
<br />
In actual fact, if you check the process list (<code>ps aux</code>) you may not see the nxserver running even though 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.<br />
<br />
=== Client ===<br />
<br />
==== Arch Linux ====<br />
<br />
Get the client from pacman:<br />
pacman -S nxclient<br />
<br />
==== Windows ====<br />
<br />
Get the client from nomachine's homepage: http://www.nomachine.com<br />
<br />
Tip: Nomachine tends to remove old clients from their homepage,<br />
If your setup works with a client save it at a safe place ;)<br />
<br />
==== Configuration ====<br />
<br />
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:<br />
* Windows: <code><yourinstalldironwindows>/share/keys/client.id_dsa.key</code><br />
* Arch Linux: <code>/opt/NX/share/keys/client.id_dsa.key</code><br />
<br />
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.<br />
<br />
<br />
== Running ==<br />
<br />
After installing nxclient on Arch Linux, executables are available in /opt/NX/bin. At the first run of /opt/NX/bin/nxclient, the user will be led through a wizard. <br />
<br />
=== Keyboard shortcuts ===<br />
<br />
<pre><br />
CTR+ALT+F Toggles full-screen mode. <br />
CTRL+ALT+T Shows the terminate, suspend dialog.<br />
CTRL+ALT+M Maximizes of minimizes the window <br />
CTRL+ALT+Mouse Drags the viewport, so you can view different portions <br />
of the desktop. <br />
CTRL+ALT+Arrows <br />
or Moves the viewport by an incremental amount of pixels. <br />
CTRL+ALT+Keypad <br />
CTRL+ALT+S It will activate "screen-scraping" mode, so all the GetImage<br />
originated by the clients will be forwarded to the real<br />
display. This should make happy those who love taking<br />
screenshots ;-). By pressing the sequence again, nxagent<br />
will revert to the usual "fast" mode.<br />
CTRL+ALT+E lazy image encoding<br />
CTRL+ALT+Shift+ESC Emergency-exit and kill-window<br />
</pre><br />
<br />
=== Leaving fullscreen ===<br />
<br />
There is a magic-pixel in the top right corner of nearly every nx-application<br />
in fullscreenmode. Right-click the pixel and application-window gets iconified.<br />
<br />
=== Tips on resume ===<br />
<br />
* 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 ;) .<br />
* Resuming between Linux and Windows sessions does not work. UPDATE: It appears that version 3.2.0-14 is able to resume Windows-suspended sessions.<br />
* 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.<br />
<br />
=== Fix DPI settings ===<br />
<br />
If you like to have the same font-sizes/dpi sizes on all your client session,<br />
set the X resource "Xft.dpi". For example putting the following line into a<br />
user's "~/.Xresources" makes her/his "desktop" a 100dpi.<br />
Xft.dpi: 100<br />
<br />
<br />
== Setting up non-KDE or Gnome desktop managers ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
If you do not want to do this, you can start X by [[Display Manager|installing a login manager like SLIM or XDM]]. I would recomend using SLiM because of it's small size.<br />
<br />
(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.)<br />
<br />
==== Alternative fix ====<br />
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'''.<br />
<br />
Simply edit the config file (as root):<br />
/opt/NX/etc/node.conf<br />
and change<br />
#USER_X_STARTUP_SCRIPT=.Xclients<br />
to<br />
USER_X_STARTUP_SCRIPT=.xinitrc<br />
Remember to remove the # symbol from the start of the line.<br />
<br />
Then in the client under configuration settings, choose '''Custom''' as the desktop, and click on settings:<br />
* In the first group select - '''<code>Run the default X client Script on server</code>'''<br />
* In the second group select - '''<code>New virtual desktop</code>'''<br />
<br />
<br />
== Problems ==<br />
<br />
<br />
=== Debug problems ===<br />
<br />
<br />
Edit the nxserver config file:<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
Change:<br />
<br />
#SESSION_LOG_CLEAN=1<br />
<br />
to <br />
<br />
SESSION_LOG_CLEAN=0<br />
<br />
Then you can look/debug the log files in:<br />
<br />
$HOME/.nx/T-C-<hostname>-<display>-<session-id><br />
For succesfull connections and:<br />
<br />
$HOME/.nx/F-C-<hostname>-<display>-<session-id><br />
For failed ones.<br />
<br />
<br />
=== Authentication OK, but connection fails ===<br />
<br />
If you are trying to startkde <br />
<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
<br />
<br />
And search for:<br />
<br />
COMMAND_START_KDE=startkde<br />
<br />
Replace for:<br />
<br />
<br />
COMMAND_START_KDE=/usr/bin/startkde<br />
<br />
=== Key changes ===<br />
Change the key in GUI setup to new generated key.<br />
<br />
=== Xorg 7 ===<br />
Be aware that you have to remove the /usr/X11R6 directory, else strange things<br />
can happen.<br />
<br />
=== Wrong password / No connection possible ===<br />
* If you have changed your ssh daemon to run on an alternate port, be sure to modify SSHD_PORT within /opt/NX/etc/node.conf.<br />
<br />
* 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.<br />
You must allow local access for sshd. Example /etc/hosts.deny file :<br />
# /etc/hosts.deny<br />
#<br />
sshd: localhost.localdomain: ALLOW<br />
ALL: ALL: DENY<br />
<br />
* 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.<br />
<br />
* If you get wrong password or login, put '''ENABLE_PASSDB_AUTHENTICATION="1"''' in /opt/NX/etc/node.conf and add a user by<br />
# /opt/NX/bin/nxserver --adduser [username]<br />
# /opt/NX/bin/nxserver --passwd [username]<br />
<br />
==== NX Crashes on session startup ====<br />
If your NX Client shows the NX logo then disappears with a Connection Problem dialog afterwards.<br />
<br />
Then it could be due to missing fonts. Mostly applies if you have installed Arch Linux base and then installed freenx after without the whole X11 set.<br />
<br />
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.<br />
<br />
Note: This does not apply to freenx 0.6.1-3 and above, fix has been incorporated in it and following versions.<br />
<br />
=== NX logo then blank screen ===<br />
<br />
If you see the NX logo (!M) then a blank screen.<br />
<br />
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.<br />
Follow these instructions to setup a login manager and load it at startup: [[Display Manager]]<br />
<br />
Blind: If this does not resolve your issues, be aware that freenx and bash_completion do not play well together. I only got things to work after removing bash_completion from the .bashrc.<br />
<br />
=== GDM/XDM Session Menu Error with non-KDE or Gnome Desktop Managers (more common with non-Arch Linux users) ===<br />
<br />
Problem: A session menu comes up talking about "chooseSessionListWidget." A window manager never loads.<br />
<br />
Fix :<br />
<br />
Double check to see if ~/.xinitrc is executable.<br />
<br />
ls -la ~/ | grep .xinitrc<br />
<br />
If the file is not executable, simply<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
Keep in mind this command should be executed along with pertinent instructions on this page about "Setting up non-KDE or Gnome desktop managers"<br />
<br />
<br />
=== Cannot connect because command sessreg not found ===<br />
<br />
If you get the following error while connecting<br />
<br />
/opt/NX/bin/nxserver: line 941: sessreg: command not found<br />
NX> 280 Exiting on signal: 15<br />
<br />
then you have to install the package xorg-server-utils.</div>Teekerthttps://wiki.archlinux.org/index.php?title=FreeNX&diff=127426FreeNX2011-01-09T09:55:37Z<p>Teekert: /* Server */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|FreeNX}}<br />
<br />
''NX is an exciting new technology for remote display. It provides <u>''near local speed''</u> application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by [http://www.nomachine.com/ NoMachine] under the GPL. '''FreeNX''' is a GPL implementation of the NX Server and NX Client Components.''<br />
<br />
: &mdash; [http://freenx.berlios.de/ FreeNX - the free NX]<br />
<br />
== Installation ==<br />
package is split up into 2 parts:<br />
* freenx (the server)<br />
* nxclient (the client)<br />
<br />
If you plan using freenx to connect to a headless PC, keep in mind that you'll also need an X server configured, so you should install any relevant [[xorg]] package.<br />
<br />
== Setup ==<br />
<br />
=== Server ===<br />
<br />
The free server is the 'freenx' package. The sshd daemon must be installed and running for it to function properly. Add 'sshd' to daemons array in /etc/rc.conf and ensure your hosts.deny/hosts.allow allows ssh services.<br />
<br />
The main configuration file is located at:<br />
/opt/NX/etc/node.conf<br />
<br />
''If you are running your SSH daemon on a port other than the default port 22, you'll need to uncomment and update:''<pre>SSHD_PORT=22</pre><br />
<br />
{{Note|As of OpenSSL 1.0.0, it is necessary to set proper md5sum command in {{Filename|/opt/NX/etc/node.conf}}: <pre>COMMAND_MD5SUM="md5sum"</pre>}}<br />
<br />
If you use KDE or Gnome desktop environments you do not need to edit this file, as the defaults with the modified MD5SUM command should work in this case. If you use another window manager such as Fluxbox/Openbox or Xfce, you may need to edit this file slightly (see below).<br />
<br />
After installing the freenx package, run <code>/opt/NX/bin/nxsetup --help</code> for an overview of the install and uninstall procedures.<br />
<br />
Note that you should also install "xdialog" on the server or you will not see the "suspend/terminate" dialog when you try to close the window or hit "ctrl-alt-T".<br />
<br />
==== Keys ====<br />
Keys are used to authenticate the clients with the server. By default a new set of random keys are generated during the install, one for the server and one for the clients. You will need to copy this client key to each of your clients that want to connect (Windows and linux).<br />
<br />
The client key can be found here:<br />
/opt/NX/home/nx/.ssh/client.id_dsa.key<br />
<br />
Alternatively you can use the default key that is provided by NoMachine with all clients. In this case you do not need to copy a custom generated key to each client. To get the server to accept the default client keys run:<br />
/opt/NX/bin/nxsetup --install --setup-nomachine-key<br />
<br />
Recreation of random keys:<br />
<br />
/opt/NX/bin/nxsetup --install<br />
<br />
<br />
<br />
Transferring nx keys to another freenx server:<br />
* /opt/NX/home/nx/.ssh contains the key files<br />
-rw------- 1 nx root 697 9. Okt 12:55 authorized_keys<br />
-rw------- 1 nx root 668 9. Okt 11:48 client.id_dsa.key<br />
-rw------- 1 nx root 609 9. Okt 12:55 server.id_dsa.pub.key<br />
* Save those files.<br />
* Add those files to your new server, they need the same permissions, names, group and directory!<br />
# cp authorized_keys client.id_dsa.key server.id_dsa.pub.key /opt/NX/home/nx/.ssh/<br />
# chmod 600 /opt/NX/home/nx/.ssh/*<br />
# chown nx /opt/NX/home/nx/.ssh/*<br />
# chgrp root /opt/NX/home/nx/.ssh/*<br />
* Recreate known_hosts file:<br />
# echo -n 127.0.0.1 > /opt/NX/home/nx/.ssh/known_hosts<br />
# cat /etc/ssh/ssh_host_rsa_key.pub >> /opt/NX/home/nx/.ssh/known_hosts<br />
# chmod 633 /opt/NX/home/nx/.ssh/known_hosts<br />
# chown nx /opt/NX/home/nx/.ssh/known_hosts<br />
# chgrp root /opt/NX/home/nx/.ssh/known_hosts<br />
<br />
==== Starting the server ====<br />
<br />
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. 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.<br />
<br />
You can specify the local addresses sshd should listen for by editing /etc/ssh/sshd_config and adding them in the following format:<br />
<br />
ListenAddress host|IPv4_addr|IPv6_addr<br />
<br />
The original ListenAddress in sshd_config is 0.0.0.0. This listens to all addresses, however adding any address will take precedent to this and and accept connections from the new address only.<br />
<br />
Restart the sshd daemon to put any changes to its configuration into effect:<br />
<br />
sudo /etc/rc.d/sshd restart<br />
<br />
In actual fact, if you check the process list (<code>ps aux</code>) you may not see the nxserver running even though 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.<br />
<br />
=== Client ===<br />
<br />
==== Arch Linux ====<br />
<br />
Get the client from pacman:<br />
pacman -S nxclient<br />
<br />
==== Windows ====<br />
<br />
Get the client from nomachine's homepage: http://www.nomachine.com<br />
<br />
Tip: Nomachine tends to remove old clients from their homepage,<br />
If your setup works with a client save it at a safe place ;)<br />
<br />
==== Configuration ====<br />
<br />
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:<br />
* Windows: <code><yourinstalldironwindows>/share/keys/client.id_dsa.key</code><br />
* Arch Linux: <code>/opt/NX/share/keys/client.id_dsa.key</code><br />
<br />
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.<br />
<br />
<br />
== Running ==<br />
<br />
After installing nxclient on Arch Linux, executables are available in /opt/NX/bin. At the first run of /opt/NX/bin/nxclient, the user will be led through a wizard. <br />
<br />
=== Keyboard shortcuts ===<br />
<br />
<pre><br />
CTR+ALT+F Toggles full-screen mode. <br />
CTRL+ALT+T Shows the terminate, suspend dialog.<br />
CTRL+ALT+M Maximizes of minimizes the window <br />
CTRL+ALT+Mouse Drags the viewport, so you can view different portions <br />
of the desktop. <br />
CTRL+ALT+Arrows <br />
or Moves the viewport by an incremental amount of pixels. <br />
CTRL+ALT+Keypad <br />
CTRL+ALT+S It will activate "screen-scraping" mode, so all the GetImage<br />
originated by the clients will be forwarded to the real<br />
display. This should make happy those who love taking<br />
screenshots ;-). By pressing the sequence again, nxagent<br />
will revert to the usual "fast" mode.<br />
CTRL+ALT+E lazy image encoding<br />
CTRL+ALT+Shift+ESC Emergency-exit and kill-window<br />
</pre><br />
<br />
=== Leaving fullscreen ===<br />
<br />
There is a magic-pixel in the top right corner of nearly every nx-application<br />
in fullscreenmode. Right-click the pixel and application-window gets iconified.<br />
<br />
=== Tips on resume ===<br />
<br />
* 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 ;) .<br />
* Resuming between Linux and Windows sessions does not work. UPDATE: It appears that version 3.2.0-14 is able to resume Windows-suspended sessions.<br />
* 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.<br />
<br />
=== Fix DPI settings ===<br />
<br />
If you like to have the same font-sizes/dpi sizes on all your client session,<br />
set the X resource "Xft.dpi". For example putting the following line into a<br />
user's "~/.Xresources" makes her/his "desktop" a 100dpi.<br />
Xft.dpi: 100<br />
<br />
<br />
== Setting up non-KDE or Gnome desktop managers ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
If you do not want to do this, you can start X by [[Display Manager|installing a login manager like SLIM or XDM]]. I would recomend using SLiM because of it's small size.<br />
<br />
(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.)<br />
<br />
==== Alternative fix ====<br />
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'''.<br />
<br />
Simply edit the config file (as root):<br />
/opt/NX/etc/node.conf<br />
and change<br />
#USER_X_STARTUP_SCRIPT=.Xclients<br />
to<br />
USER_X_STARTUP_SCRIPT=.xinitrc<br />
Remember to remove the # symbol from the start of the line.<br />
<br />
Then in the client under configuration settings, choose '''Custom''' as the desktop, and click on settings:<br />
* In the first group select - '''<code>Run the default X client Script on server</code>'''<br />
* In the second group select - '''<code>New virtual desktop</code>'''<br />
<br />
<br />
== Problems ==<br />
<br />
<br />
=== Debug problems ===<br />
<br />
<br />
Edit the nxserver config file:<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
Change:<br />
<br />
#SESSION_LOG_CLEAN=1<br />
<br />
to <br />
<br />
SESSION_LOG_CLEAN=0<br />
<br />
Then you can look/debug the log files in:<br />
<br />
$HOME/.nx/T-C-<hostname>-<display>-<session-id><br />
For succesfull connections and:<br />
<br />
$HOME/.nx/F-C-<hostname>-<display>-<session-id><br />
For failed ones.<br />
<br />
<br />
=== Authentication OK, but connection fails ===<br />
<br />
If you are trying to startkde <br />
<br />
<br />
vi /opt/NX/etc/node.conf<br />
<br />
<br />
<br />
And search for:<br />
<br />
COMMAND_START_KDE=startkde<br />
<br />
Replace for:<br />
<br />
<br />
COMMAND_START_KDE=/usr/bin/startkde<br />
<br />
=== Key changes ===<br />
Change the key in GUI setup to new generated key.<br />
<br />
=== Xorg 7 ===<br />
Be aware that you have to remove the /usr/X11R6 directory, else strange things<br />
can happen.<br />
<br />
=== Wrong password / No connection possible ===<br />
* If you have changed your ssh daemon to run on an alternate port, be sure to modify SSHD_PORT within /opt/NX/etc/node.conf.<br />
<br />
* 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.<br />
You must allow local access for sshd. Example /etc/hosts.deny file :<br />
# /etc/hosts.deny<br />
#<br />
sshd: localhost.localdomain: ALLOW<br />
ALL: ALL: DENY<br />
<br />
* 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.<br />
<br />
* If you get wrong password or login, put '''ENABLE_PASSDB_AUTHENTICATION="1"''' in /opt/NX/etc/node.conf and add a user by<br />
# /opt/NX/bin/nxserver --adduser [username]<br />
# /opt/NX/bin/nxserver --passwd [username]<br />
<br />
==== NX Crashes on session startup ====<br />
If your NX Client shows the NX logo then disappears with a Connection Problem dialog afterwards.<br />
<br />
Then it could be due to missing fonts. Mostly applies if you have installed Arch Linux base and then installed freenx after without the whole X11 set.<br />
<br />
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.<br />
<br />
Note: This does not apply to freenx 0.6.1-3 and above, fix has been incorporated in it and following versions.<br />
<br />
=== NX logo then blank screen ===<br />
<br />
If you see the NX logo (!M) then a blank screen.<br />
<br />
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.<br />
Follow these instructions to setup a login manager and load it at startup: [[Display Manager]]<br />
<br />
Blind: If this does not resolve your issues, be aware that freenx and bash_completion do not play well together. I only got things to work after removing bash_completion from the .bashrc.<br />
<br />
=== GDM/XDM Session Menu Error with non-KDE or Gnome Desktop Managers (more common with non-Arch Linux users) ===<br />
<br />
Problem: A session menu comes up talking about "chooseSessionListWidget." A window manager never loads.<br />
<br />
Fix :<br />
<br />
Double check to see if ~/.xinitrc is executable.<br />
<br />
ls -la ~/ | grep .xinitrc<br />
<br />
If the file is not executable, simply<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
Keep in mind this command should be executed along with pertinent instructions on this page about "Setting up non-KDE or Gnome desktop managers"<br />
<br />
<br />
=== Cannot connect because command sessreg not found ===<br />
<br />
If you get the following error while connecting<br />
<br />
/opt/NX/bin/nxserver: line 941: sessreg: command not found<br />
NX> 280 Exiting on signal: 15<br />
<br />
then you have to install the package xorg-server-utils.</div>Teekerthttps://wiki.archlinux.org/index.php?title=Talk:FreeNX&diff=127425Talk:FreeNX2011-01-09T09:53:32Z<p>Teekert: </p>
<hr />
<div>On my server I was unable to get the suspend/terminate dialog when trying to close a the nxclient window until I installed xdialog. That should be a dependency (serverside).<br />
<br />
<br />
---<br />
<br />
I vote that we remove tpowa's note since he hasn't edited the page since 2007. --[[User:Bostonvaulter|Bostonvaulter]] 20:05, 4 September 2009 (EDT)<br />
<br />
----<br />
<br />
This page needs some explanatory information.--[[User:Misfit138|Misfit138]] 22:31, 9 April 2008 (EDT)<br />
<br />
---<br />
<br />
I second this comment, especially since a crucial part in the setup of the server (adduser) is compeltely missing.--[[User:Factory|Factory]] Sat Jul 26 01:21:47 EDT 2008<br />
<br />
---<br />
<br />
This page seems dreadfully inadequate. It assumes way too much prior knowledge by the end user.<br />
<br />
----<br />
This page doesn't mention the package in extra/nxserver, only freenx [[User:Bostonvaulter|Bostonvaulter]] 20:17, 19 November 2008 (EST)<br />
<br />
---<br />
<br />
I'd like to edit this wiki 'cos as it stands it may have some good complementary info in it but is quite useless otherwise. Who to email and ask for permission? Is it being at all maintained (see first comment above from ten months ago...)? [[User:toad|toad]] 30 January 2009<br />
<br />
---<br />
<br />
Sometimes, when the client starts and stops right away without explanation, it helps to delete the .Xauthority file in /home (on the server). Don't know why though. --[[User:Rataxes|Rataxes]] 13:48, 16 August 2009 (EDT)<br />
<br />
---<br />
<br />
== Infromation about Edit /etc/ssh/sshd_config wrong. ==<br />
<br />
ref. problem [http://bbs.archlinux.org/viewtopic.php?id=71302]<br />
<br />
ref. wiki [[http://wiki.archlinux.org/index.php/FreeNX#Starting_the_server]]<br />
<br />
<br />
==== Corrections ====<br />
<br />
Corrected the custom keys generation and the service startup.<br />
--[[User:PeGa!|PeGa!]] 01:27, 16 January 2010 (EST)</div>Teekert