特殊:Badtitle/NS100:FreeNX:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的7个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/FreeNX}} | {{From|https://help.ubuntu.com/community/FreeNX}} | ||
{{Languages|UbuntuHelp:FreeNX}} | {{Languages|UbuntuHelp:FreeNX}} | ||
[http://freenx.berlios.de FreeNX] is a system that allows you to access your desktop from another machine over the | == What is FreeNX == | ||
'''Note:''' | [http://freenx.berlios.de FreeNX] is a system that allows you to access your desktop from another machine over the Internet. You can use this to login graphically to your desktop from a remote location. One example of its use would be to have a FreeNX server set up on your home computer, and graphically logging in to the home computer from your work computer, using a FreeNX client. | ||
It's Open Source, secure (SSH based), fast and versatile! | |||
'''Note:''' Running FreeNX as server on Ubuntu with the free "NX Client for Windows" from [http://www.nomachine.com/select-package-client.php NoMachine] on a Windows workstation is working fine. | |||
=== Terminology === | === Terminology === | ||
The ''Server'' is the computer you want to connect to. This is the computer where the | The ''Server'' is the computer you want to connect to. This is the computer where the FreeNX server will need to be installed. The name of the Ubuntu package providing the server is "freenx". For the example used here, the home computer is the server. | ||
The ''Client'' is the computer from which you want to be able to access the ''Server''. The name of the Ubuntu package providing the client is "nxclient". For the example used here, the work computer is the client. | The ''Client'' is the computer from which you want to be able to access the ''Server''. The name of the Ubuntu package providing the client is "nxclient". For the example used here, the work computer is the client. | ||
=== | == Installation == | ||
We will be installing the | Before installing FreeNX server make sure you have SSH set up and is working. You can find the SSH Howto here: [[UbuntuHelp:SSHHowto]] | ||
<pre><nowiki> | We will be installing the FreeNX server on the ''Server'' machine, i.e., the machine that you want to access remotely. In the stated example, this is your computer that is at home. | ||
FreeNX is not included in Ubuntu, so we'll add it from the [https://launchpad.net/~freenx-team/+archive/ FreeNX Team PPA]. | |||
''For the paranoid: there is an added security risk involved in using the default keys. If you keep the default keys then everybody will be able to connect to your SSH server as the NX user which is added to your system during the installation. This opens an additional (and unnecessary) opportunity to attack your computer. You could avoid it by using custom SSH keys, as explained later. '' | |||
=== Installing the FreeNX server on Ubuntu Lucid (10.04) === | |||
Ubuntu Lucid now uses [http://code.google.com/p/neatx/ Neatx], the Open Source NX server from Google. | |||
Installation is simple enough, and similar to the Ubuntu Karmic method. | |||
<ol><li>Open your terminal <pre><nowiki> | |||
Applications->Accessories->Terminal | |||
</nowiki></pre> and type in this command <pre><nowiki> | |||
sudo add-apt-repository ppa:freenx-team | |||
</nowiki></pre> | |||
</li><li>Then Update Apt <pre><nowiki> | |||
sudo apt-get update | |||
</nowiki></pre> | |||
</li><li>At this point, the repository is added and apt is updated, then install the <code><nowiki>neatx-server</nowiki></code> package (using Aptitude to install extra needed packages). <pre><nowiki> | |||
sudo apt-get install neatx-server | |||
</nowiki></pre></li></ol> | |||
=== Installing the FreeNX server on Ubuntu Karmic (9.10) === | |||
Karmic introduces the '''add-apt-repository''' command that simplifies most of the work of adding a third party repository. | |||
<ol><li>Open your terminal <pre><nowiki> | |||
Applications->Accessories->Terminal | |||
</nowiki></pre> and type in this command <pre><nowiki> | |||
sudo add-apt-repository ppa:freenx-team | |||
</nowiki></pre></li></ol> | |||
NOTE: If you do not have add-apt-repository installed add the following <pre><nowiki> | |||
sudo apt-get install python-software-properties | |||
</nowiki></pre> | |||
<ol><li>Then Update Apt <pre><nowiki> | |||
sudo apt-get update | |||
</nowiki></pre> | |||
</li><li>At this point, the repository is added and apt is updated, then install the <code><nowiki>freenx</nowiki></code> package (using Aptitude to install extra needed packages). <pre><nowiki> | |||
sudo aptitude install freenx | |||
</nowiki></pre> | |||
</li><li>Now use nxsetup to install necessary files and create the special user "nx" <pre><nowiki> | |||
sudo /usr/lib/nx/nxsetup --install </nowiki></pre></li></ol> | |||
=== Installing the FreeNX server on older Ubuntu Versions === | |||
This Instructions are for older Ubuntu versions. FreeNX is not included in Ubuntu, so we'll add it from the [https://launchpad.net/~freenx-team/+archive/ FreeNX Team PPA]. | |||
Add this repository using the [[UbuntuHelp:Repositories/Ubuntu#Third-Party Software Tab|Third-Party Sources Tab]] in Software Sources. When it asks, Reload the information about available software. Now you can see and install the `freenx` package in [[UbuntuHelp:SynapticHowto|Synaptic Package Manager]]. | |||
You must edit the configuration files and install by hand: | |||
<ol><li>Open your apt sources list <pre><nowiki> | |||
gksudo gedit /etc/apt/sources.list | gksudo gedit /etc/apt/sources.list | ||
</nowiki></pre> and append the two lines for the repository <pre><nowiki> | |||
deb http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main | |||
deb-src http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main | |||
</nowiki></pre> where VERSION can be: dapper, hardy, intrepid or jaunty. More information can be found at [https://launchpad.net/~freenx-team/+archive/ FreeNX Team PPA]. | |||
</li><li>Save and then close.</li></ol> | |||
To add the public key of FreeNX PPA run: <pre><nowiki> | |||
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2a8e3034d018a4ce | |||
</nowiki></pre> | </nowiki></pre> | ||
<ol><li>Then Update Apt <pre><nowiki> | |||
<pre><nowiki> | sudo apt-get update | ||
</nowiki></pre> | </nowiki></pre> | ||
</li><li>After you add the repository, then install the <code><nowiki>freenx</nowiki></code> package (using Aptitude to install extra needed packages). <pre><nowiki> | |||
< | sudo aptitude install freenx | ||
</nowiki></pre> | </nowiki></pre> | ||
</li><li>Now use nxsetup to install necessary files and create the special user "nx" <pre><nowiki> | |||
sudo /usr/lib/nx/nxsetup --install </nowiki></pre></li></ol> | |||
=== Installing the NX Client === | |||
The official NX client is not in the Ubuntu repositories. | |||
You should be able to access your Ubuntu box from any Windows or Linux box using the free client from [http://www.nomachine.com/select-package-client.php NoMachine's website]. You can also embed your NX Server in a webpage by installing the Nomachine Web Companion and the Apache webserver. | |||
Now you can execute the installed client using the following command: | |||
<pre><nowiki> | <pre><nowiki> | ||
/usr/NX/bin/nxclient &</nowiki></pre> | |||
</nowiki></pre> | Or by looking it up in the menu | ||
This will start the NX client in a GUI, and step you through getting connected to the FreeNX server, and you will be on your way! | |||
[Note: If you are behind a firewall you may need to enable SSL encryption under the Advanced configuration tab - JeremySchroeder] | |||
=== Installing QTNX (Opensource client) === | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get | sudo apt-get install qtnx</nowiki></pre> | ||
</nowiki></pre> | == Miscellany == | ||
=== NX Server Free Edition === | |||
NX Server Free Edition provided by NoMachine is not related to FreeNX. | |||
NXSFE has a limit of 2 sessions per server. FreeNX doesn't have this limit. | |||
=== FreeNX on PowerPC === | |||
There are no precompiled binaries of FreeNX on this platform (Launchpad PPA doesn't provide support), so FreeNX have to be compiled from source. Sources can be found at the FreeNX Team PPA. | |||
These steps will build FreeNX from source (you need to add the deb-src repository): | |||
<ol><li>Create a directory to hold the FreeNX source, and cd into it. <pre><nowiki> | |||
mkdir freenxSource; cd freenxSource</nowiki></pre> | |||
</li><li>Build the freenx packages and install related packages. <pre><nowiki> | |||
sudo apt-get build-dep nx freenx | |||
apt-get -b source nx freenx</nowiki></pre> This will download the source tarballs and build the freenx packages (*.deb) in the current directory. | |||
</li><li>Install the FreeNX packages. <pre><nowiki> | |||
sudo dpkg -i *.deb</nowiki></pre> | |||
</li><li>If dpkg complains about missing packages, let apt fix it <pre><nowiki> | |||
sudo apt-get -f install | |||
sudo dpkg -i *.deb</nowiki></pre></li></ol> | |||
=== How to start/stop FreeNX === | |||
The FreeNX server is not a service but uses ssh. The following command will stop the FreeNX program from accepting connections. | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo | sudo /etc/init.d/freenx-server stop | ||
</nowiki></pre> | </nowiki></pre> | ||
( | (Replace stop by start for starting it again) | ||
=== Configuring SSH port === | |||
By default, nxserver uses port 22 for communicating over SSH. On some machines or networks, port 22 may be blocked; some Internet providers block port 22, for instance. Port 22 is also a common target of people trying to crack into a network. To make the SSH server listen on port 8888, you can do the following: | By default, nxserver uses port 22 for communicating over SSH. On some machines or networks, port 22 may be blocked; some Internet providers block port 22, for instance. Port 22 is also a common target of people trying to crack into a network. To make the SSH server listen on port 8888, you can do the following: | ||
Edit the file /etc/ssh/sshd_config | Edit the file /etc/ssh/sshd_config | ||
第57行: | 第121行: | ||
Try <pre><nowiki> | Try <pre><nowiki> | ||
/etc/init.d/ssh restart</nowiki></pre> | /etc/init.d/ssh restart</nowiki></pre> | ||
FreeNX should detect the SSHD port, but otherwise: | |||
Edit the file /etc/nxserver/node.conf | Edit the file /etc/nxserver/node.conf | ||
<pre><nowiki> | <pre><nowiki> | ||
第71行: | 第136行: | ||
</nowiki></pre> | </nowiki></pre> | ||
That is, change the port number to the one that sshd is listening to, and uncomment the line. | That is, change the port number to the one that sshd is listening to, and uncomment the line. | ||
=== | === Using custom SSH keys === | ||
After installation, FreeNX will use a set of default ssh keys for authentication. This is a security risk, especially on any internet-facing machines, and the default keys should be replaced with your own custom keys. | |||
To change the default keys to your own custom keys - on the machine hosting the freenx-server, run the command: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo | sudo dpkg-reconfigure freenx-server | ||
</nowiki></pre> | </nowiki></pre> | ||
This will launch a dialogue that will guide you through the generation of custom keys. | |||
On the first page hit 'OK' | |||
Now | and on the second page select 'Create new custom keys' | ||
a key file called ''client.id_dsa.key'' will be created in: | |||
''/var/lib/nxserver/home/custom_keys/'' | |||
Now, we need to transfer the key to the client machine so that it can be imported in the FreeNX client application. | |||
First copy the key to your home directory on the server machine: | |||
<pre><nowiki> | <pre><nowiki> | ||
/ | sudo cp /var/lib/nxserver/home/custom_keys/client.id_dsa.key ~/ | ||
</nowiki></pre> | |||
Next, copy ''client.id_dsa.key'' to your client machine. Ideally you should copy the file securely, for example by running the following command from the client computer: | |||
<pre><nowiki> | <pre><nowiki> | ||
scp user@freenx-server:~/client.id_dsa.key ~/ | |||
</nowiki></pre> | </nowiki></pre> | ||
which will securely copy the client.id_dsa.key file from the freenx-server computer to your home directory on the client. | |||
If your client is a Windows machine, just copy the key with your preferred method. | |||
In the nx client software you can now import this key. | |||
After you have tested that authentication is working using your custom keys you should then remove the client.id_dsa.key file from your home directories on both the server and client machines. | |||
== Troubleshooting == | |||
</ | * '''''Problem''''': Everything is installed as described above, but I still get errors at installing nxsetup --install | ||
* '''Solution''': Check that this line exists in '''/etc/ssh/sshd_config''' "''AllowUsers nx''" and this line also exists and is set to '''authorized_keys2''' "''AuthorizedKeysFile %h/.ssh/authorized_keys2''", if commented, just uncomment them. after that run this command in a terminal <code><nowiki>sudo /etc/init.d/ssh restart</nowiki></code> .This issue is due custom SSH server configuration. | |||
</ | * '''''Problem''''': At the client, the !M logo window appears, but after a few seconds that window just closes, even without showing any error message. | ||
* '''Solution''': In the server, access your home directory and run this command, <code><nowiki>sudo rm .Xauthority*</nowiki></code> followed by <code><nowiki>touch .Xauthority</nowiki></code> and finally <code><nowiki>chmod 600 .Xauthority</nowiki></code> . This issue is due custom VNC configuration. | |||
* '''Problem''''': What can I do if I get the error 'Could not yet establish the connection to the remote proxy' ? | |||
* [http://en.wikipedia.org/wiki/ | * '''Solution''': This commonly happens when the Advanced tab configuration option "Disable encryption of all traffic" has been selected, but the appropriate firewall ports have not been opened. Open the necessary firewall ports, or uncheck the option to re-enable encryption over SSH. [http://www.nomachine.com/ar/view.php?ar_id=AR10B00040 NoMachine knowledge base article] | ||
* [http:// | * '''Problem''': NX Client connects and displays the desktop but the screen does not refresh. | ||
* '''Solution''': Set <code><nowiki>Disable Direct Draw for screen rendering</nowiki></code> in the client's advanced configuration tab. | |||
== References == | |||
* [http://en.wikipedia.org/wiki/FreeNX FreeNX on Wikipedia] | |||
* [http://freenx.berlios.de/ FreeNX project page on BerliOS] | |||
* [https://launchpad.net/~freenx-team/+archive/ FreeNX Team PPA] An up-to-date repository from the FreeNX Team, for Ubuntu 8.04 (Hardy), 8.10 (Intrepid) or 9.04 (Jaunty) | |||
* [http://mirror.ubuntulinux.nl/ Seveas' Packages] FreeNX old repository | |||
* [http://ubuntuforums.org/showthread.php?t=467219 Ubuntu Forums HowTo FreeNx] ''How to remote desktop using SSH and FreeNX - OpenGL Seveas Repositories'' | * [http://ubuntuforums.org/showthread.php?t=467219 Ubuntu Forums HowTo FreeNx] ''How to remote desktop using SSH and FreeNX - OpenGL Seveas Repositories'' | ||
=== Related docs === | |||
You can also have a look at the article about installing the [[UbuntuHelp:NomachineNX||NX packages provided by NoMachine company]] | |||
=== Desktop integration wanted === | |||
For those who want to have freenx supported in krfb, krdc, log into bugs.kde.org, and add a comment and vote for the following bugs (wishlist) : | |||
* [https://bugs.kde.org/show_bug.cgi?id=187310 187310] : nxserver support in krfb | |||
* [https://bugs.kde.org/show_bug.cgi?id=149482 149482] :nx support in krdc (client), it seems that work is already in progress, and there only a few problems left. | |||
The same should be done on gnome side, for vino and vinagre. | |||
*[http://www.bani.com.br/lang/en/2008/06/vinagre-and-other-newsvinagre-e-outras-noticias/#comment-77547 comment-77547] : vinagre has a plan to support nx | |||
*[http://www.gnome.org/~markmc/remote-desktop-2.html vino goals/to-do v2] : no mention of nx; only rdp and vnc | |||
NXLaunch is another solution and could possibly be integrated in other Remote Desktop clients. | |||
* [http://mail.gnome.org/archives/desktop-devel-list/2007-September/msg00330.html msg00330, 2007-Sept] : committed source | |||
* [http://mail.gnome.org/archives/desktop-devel-list/2007-September/msg00404.html msg00404, 2007-Sept] : integration | |||
---- | ---- | ||
[[category: | [[category:CategoryInternet]] [[category:CategoryNetworking]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月19日 (三) 22:26的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/FreeNX }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/af | • {{#if: UbuntuHelp:FreeNX|Afrikaans| [[::FreeNX/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ar | • {{#if: UbuntuHelp:FreeNX|العربية| [[::FreeNX/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/az | • {{#if: UbuntuHelp:FreeNX|azərbaycanca| [[::FreeNX/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/bcc | • {{#if: UbuntuHelp:FreeNX|جهلسری بلوچی| [[::FreeNX/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/bg | • {{#if: UbuntuHelp:FreeNX|български| [[::FreeNX/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/br | • {{#if: UbuntuHelp:FreeNX|brezhoneg| [[::FreeNX/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ca | • {{#if: UbuntuHelp:FreeNX|català| [[::FreeNX/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/cs | • {{#if: UbuntuHelp:FreeNX|čeština| [[::FreeNX/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/de | • {{#if: UbuntuHelp:FreeNX|Deutsch| [[::FreeNX/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/el | • {{#if: UbuntuHelp:FreeNX|Ελληνικά| [[::FreeNX/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/es | • {{#if: UbuntuHelp:FreeNX|español| [[::FreeNX/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/fa | • {{#if: UbuntuHelp:FreeNX|فارسی| [[::FreeNX/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/fi | • {{#if: UbuntuHelp:FreeNX|suomi| [[::FreeNX/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/fr | • {{#if: UbuntuHelp:FreeNX|français| [[::FreeNX/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/gu | • {{#if: UbuntuHelp:FreeNX|ગુજરાતી| [[::FreeNX/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/he | • {{#if: UbuntuHelp:FreeNX|עברית| [[::FreeNX/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/hu | • {{#if: UbuntuHelp:FreeNX|magyar| [[::FreeNX/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/id | • {{#if: UbuntuHelp:FreeNX|Bahasa Indonesia| [[::FreeNX/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/it | • {{#if: UbuntuHelp:FreeNX|italiano| [[::FreeNX/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ja | • {{#if: UbuntuHelp:FreeNX|日本語| [[::FreeNX/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ko | • {{#if: UbuntuHelp:FreeNX|한국어| [[::FreeNX/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ksh | • {{#if: UbuntuHelp:FreeNX|Ripoarisch| [[::FreeNX/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/mr | • {{#if: UbuntuHelp:FreeNX|मराठी| [[::FreeNX/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ms | • {{#if: UbuntuHelp:FreeNX|Bahasa Melayu| [[::FreeNX/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/nl | • {{#if: UbuntuHelp:FreeNX|Nederlands| [[::FreeNX/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/no | • {{#if: UbuntuHelp:FreeNX|norsk| [[::FreeNX/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/oc | • {{#if: UbuntuHelp:FreeNX|occitan| [[::FreeNX/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/pl | • {{#if: UbuntuHelp:FreeNX|polski| [[::FreeNX/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/pt | • {{#if: UbuntuHelp:FreeNX|português| [[::FreeNX/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ro | • {{#if: UbuntuHelp:FreeNX|română| [[::FreeNX/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/ru | • {{#if: UbuntuHelp:FreeNX|русский| [[::FreeNX/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/si | • {{#if: UbuntuHelp:FreeNX|සිංහල| [[::FreeNX/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/sq | • {{#if: UbuntuHelp:FreeNX|shqip| [[::FreeNX/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/sr | • {{#if: UbuntuHelp:FreeNX|српски / srpski| [[::FreeNX/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/sv | • {{#if: UbuntuHelp:FreeNX|svenska| [[::FreeNX/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/th | • {{#if: UbuntuHelp:FreeNX|ไทย| [[::FreeNX/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/tr | • {{#if: UbuntuHelp:FreeNX|Türkçe| [[::FreeNX/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/vi | • {{#if: UbuntuHelp:FreeNX|Tiếng Việt| [[::FreeNX/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/yue | • {{#if: UbuntuHelp:FreeNX|粵語| [[::FreeNX/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/zh | • {{#if: UbuntuHelp:FreeNX|中文| [[::FreeNX/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/zh-hans | • {{#if: UbuntuHelp:FreeNX|中文(简体)| [[::FreeNX/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:FreeNX | UbuntuHelp:FreeNX | {{#if: | :}}FreeNX}}/zh-hant | • {{#if: UbuntuHelp:FreeNX|中文(繁體)| [[::FreeNX/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:FreeNX|:FreeNX|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :FreeNX/zh | | {{#ifexist: FreeNX/zh | | {{#ifeq: {{#titleparts:FreeNX|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:FreeNX|1|-1|}} | zh | | }}
What is FreeNX
FreeNX is a system that allows you to access your desktop from another machine over the Internet. You can use this to login graphically to your desktop from a remote location. One example of its use would be to have a FreeNX server set up on your home computer, and graphically logging in to the home computer from your work computer, using a FreeNX client. It's Open Source, secure (SSH based), fast and versatile! Note: Running FreeNX as server on Ubuntu with the free "NX Client for Windows" from NoMachine on a Windows workstation is working fine.
Terminology
The Server is the computer you want to connect to. This is the computer where the FreeNX server will need to be installed. The name of the Ubuntu package providing the server is "freenx". For the example used here, the home computer is the server. The Client is the computer from which you want to be able to access the Server. The name of the Ubuntu package providing the client is "nxclient". For the example used here, the work computer is the client.
Installation
Before installing FreeNX server make sure you have SSH set up and is working. You can find the SSH Howto here: UbuntuHelp:SSHHowto We will be installing the FreeNX server on the Server machine, i.e., the machine that you want to access remotely. In the stated example, this is your computer that is at home. FreeNX is not included in Ubuntu, so we'll add it from the FreeNX Team PPA. For the paranoid: there is an added security risk involved in using the default keys. If you keep the default keys then everybody will be able to connect to your SSH server as the NX user which is added to your system during the installation. This opens an additional (and unnecessary) opportunity to attack your computer. You could avoid it by using custom SSH keys, as explained later.
Installing the FreeNX server on Ubuntu Lucid (10.04)
Ubuntu Lucid now uses Neatx, the Open Source NX server from Google. Installation is simple enough, and similar to the Ubuntu Karmic method.
- Open your terminal
Applications->Accessories->Terminal
and type in this commandsudo add-apt-repository ppa:freenx-team
- Then Update Apt
sudo apt-get update
- At this point, the repository is added and apt is updated, then install the
neatx-server
package (using Aptitude to install extra needed packages).sudo apt-get install neatx-server
Installing the FreeNX server on Ubuntu Karmic (9.10)
Karmic introduces the add-apt-repository command that simplifies most of the work of adding a third party repository.
- Open your terminal
Applications->Accessories->Terminal
and type in this commandsudo add-apt-repository ppa:freenx-team
NOTE: If you do not have add-apt-repository installed add the following
sudo apt-get install python-software-properties
- Then Update Apt
sudo apt-get update
- At this point, the repository is added and apt is updated, then install the
freenx
package (using Aptitude to install extra needed packages).sudo aptitude install freenx
- Now use nxsetup to install necessary files and create the special user "nx"
sudo /usr/lib/nx/nxsetup --install
Installing the FreeNX server on older Ubuntu Versions
This Instructions are for older Ubuntu versions. FreeNX is not included in Ubuntu, so we'll add it from the FreeNX Team PPA. Add this repository using the Third-Party Sources Tab in Software Sources. When it asks, Reload the information about available software. Now you can see and install the `freenx` package in Synaptic Package Manager. You must edit the configuration files and install by hand:
- Open your apt sources list
gksudo gedit /etc/apt/sources.list
and append the two lines for the repositorydeb http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main deb-src http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main
- Save and then close.
To add the public key of FreeNX PPA run:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2a8e3034d018a4ce
- Then Update Apt
sudo apt-get update
- After you add the repository, then install the
freenx
package (using Aptitude to install extra needed packages).sudo aptitude install freenx
- Now use nxsetup to install necessary files and create the special user "nx"
sudo /usr/lib/nx/nxsetup --install
Installing the NX Client
The official NX client is not in the Ubuntu repositories. You should be able to access your Ubuntu box from any Windows or Linux box using the free client from NoMachine's website. You can also embed your NX Server in a webpage by installing the Nomachine Web Companion and the Apache webserver. Now you can execute the installed client using the following command:
/usr/NX/bin/nxclient &
Or by looking it up in the menu This will start the NX client in a GUI, and step you through getting connected to the FreeNX server, and you will be on your way! [Note: If you are behind a firewall you may need to enable SSL encryption under the Advanced configuration tab - JeremySchroeder]
Installing QTNX (Opensource client)
sudo apt-get install qtnx
Miscellany
NX Server Free Edition
NX Server Free Edition provided by NoMachine is not related to FreeNX. NXSFE has a limit of 2 sessions per server. FreeNX doesn't have this limit.
FreeNX on PowerPC
There are no precompiled binaries of FreeNX on this platform (Launchpad PPA doesn't provide support), so FreeNX have to be compiled from source. Sources can be found at the FreeNX Team PPA. These steps will build FreeNX from source (you need to add the deb-src repository):
- Create a directory to hold the FreeNX source, and cd into it.
mkdir freenxSource; cd freenxSource
- Build the freenx packages and install related packages.
sudo apt-get build-dep nx freenx apt-get -b source nx freenx
This will download the source tarballs and build the freenx packages (*.deb) in the current directory. - Install the FreeNX packages.
sudo dpkg -i *.deb
- If dpkg complains about missing packages, let apt fix it
sudo apt-get -f install sudo dpkg -i *.deb
How to start/stop FreeNX
The FreeNX server is not a service but uses ssh. The following command will stop the FreeNX program from accepting connections.
sudo /etc/init.d/freenx-server stop
(Replace stop by start for starting it again)
Configuring SSH port
By default, nxserver uses port 22 for communicating over SSH. On some machines or networks, port 22 may be blocked; some Internet providers block port 22, for instance. Port 22 is also a common target of people trying to crack into a network. To make the SSH server listen on port 8888, you can do the following: Edit the file /etc/ssh/sshd_config
gksudo gedit /etc/ssh/sshd_config
Find
Port 22
and change it to
Port 8888
You then need to restart SSHD.
Try
/etc/init.d/ssh restart
FreeNX should detect the SSHD port, but otherwise: Edit the file /etc/nxserver/node.conf
gksudo gedit /etc/nxserver/node.conf
Find
# The port number where local 'sshd' is listening. #SSHD_PORT=22
and change it to:
# The port number where local 'sshd' is listening. SSHD_PORT=8888
That is, change the port number to the one that sshd is listening to, and uncomment the line.
Using custom SSH keys
After installation, FreeNX will use a set of default ssh keys for authentication. This is a security risk, especially on any internet-facing machines, and the default keys should be replaced with your own custom keys. To change the default keys to your own custom keys - on the machine hosting the freenx-server, run the command:
sudo dpkg-reconfigure freenx-server
This will launch a dialogue that will guide you through the generation of custom keys. On the first page hit 'OK' and on the second page select 'Create new custom keys' a key file called client.id_dsa.key will be created in: /var/lib/nxserver/home/custom_keys/ Now, we need to transfer the key to the client machine so that it can be imported in the FreeNX client application. First copy the key to your home directory on the server machine:
sudo cp /var/lib/nxserver/home/custom_keys/client.id_dsa.key ~/
Next, copy client.id_dsa.key to your client machine. Ideally you should copy the file securely, for example by running the following command from the client computer:
scp user@freenx-server:~/client.id_dsa.key ~/
which will securely copy the client.id_dsa.key file from the freenx-server computer to your home directory on the client. If your client is a Windows machine, just copy the key with your preferred method. In the nx client software you can now import this key. After you have tested that authentication is working using your custom keys you should then remove the client.id_dsa.key file from your home directories on both the server and client machines.
Troubleshooting
- Problem: Everything is installed as described above, but I still get errors at installing nxsetup --install
- Solution: Check that this line exists in /etc/ssh/sshd_config "AllowUsers nx" and this line also exists and is set to authorized_keys2 "AuthorizedKeysFile %h/.ssh/authorized_keys2", if commented, just uncomment them. after that run this command in a terminal
sudo /etc/init.d/ssh restart
.This issue is due custom SSH server configuration. - Problem: At the client, the !M logo window appears, but after a few seconds that window just closes, even without showing any error message.
- Solution: In the server, access your home directory and run this command,
sudo rm .Xauthority*
followed bytouch .Xauthority
and finallychmod 600 .Xauthority
. This issue is due custom VNC configuration. - Problem: What can I do if I get the error 'Could not yet establish the connection to the remote proxy' ?
- Solution: This commonly happens when the Advanced tab configuration option "Disable encryption of all traffic" has been selected, but the appropriate firewall ports have not been opened. Open the necessary firewall ports, or uncheck the option to re-enable encryption over SSH. NoMachine knowledge base article
- Problem: NX Client connects and displays the desktop but the screen does not refresh.
- Solution: Set
Disable Direct Draw for screen rendering
in the client's advanced configuration tab.
References
- FreeNX on Wikipedia
- FreeNX project page on BerliOS
- FreeNX Team PPA An up-to-date repository from the FreeNX Team, for Ubuntu 8.04 (Hardy), 8.10 (Intrepid) or 9.04 (Jaunty)
- Seveas' Packages FreeNX old repository
- Ubuntu Forums HowTo FreeNx How to remote desktop using SSH and FreeNX - OpenGL Seveas Repositories
Related docs
You can also have a look at the article about installing the |NX packages provided by NoMachine company
Desktop integration wanted
For those who want to have freenx supported in krfb, krdc, log into bugs.kde.org, and add a comment and vote for the following bugs (wishlist) :
- 187310 : nxserver support in krfb
- 149482 :nx support in krdc (client), it seems that work is already in progress, and there only a few problems left.
The same should be done on gnome side, for vino and vinagre.
- comment-77547 : vinagre has a plan to support nx
- vino goals/to-do v2 : no mention of nx; only rdp and vnc
NXLaunch is another solution and could possibly be integrated in other Remote Desktop clients.
- msg00330, 2007-Sept : committed source
- msg00404, 2007-Sept : integration