特殊:Badtitle/NS100:FreeNX:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/FreeNX}} {{Languages|UbuntuHelp:FreeNX}} [http://freenx.berlios.de FreeNX] is a system that allows you to access your desktop from another machine... |
小无编辑摘要 |
||
第62行: | 第62行: | ||
</nowiki></pre> | </nowiki></pre> | ||
Find<pre><nowiki> | Find | ||
<pre><nowiki> | |||
Port 22</nowiki></pre> | Port 22</nowiki></pre> | ||
and change it to<pre><nowiki> | and change it to | ||
<pre><nowiki> | |||
Port 8888</nowiki></pre> | Port 8888</nowiki></pre> | ||
You then need to restart SSHD. | You then need to restart SSHD. | ||
Try<pre><nowiki> | Try | ||
<pre><nowiki> | |||
/etc/init.d/ssh restart</nowiki></pre> | /etc/init.d/ssh restart</nowiki></pre> | ||
第77行: | 第80行: | ||
gksudo gedit /etc/nxserver/node.conf | gksudo gedit /etc/nxserver/node.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
Find<pre><nowiki> | Find | ||
<pre><nowiki> | |||
# The port number where local 'sshd' is listening. | # The port number where local 'sshd' is listening. | ||
#SSHD_PORT=22 | #SSHD_PORT=22 | ||
第117行: | 第121行: | ||
These steps will build FreeNX from source: | These steps will build FreeNX from source: | ||
* Create a directory to hold the FreeNX source, and cd into it<pre><nowiki> | * Create a directory to hold the FreeNX source, and cd into it. | ||
<pre><nowiki> | |||
mkdir freenxSource; cd freenxSource</nowiki></pre> | mkdir freenxSource; cd freenxSource</nowiki></pre> | ||
* Build the freenx pacakges and install related packages<pre><nowiki> | * Build the freenx pacakges and install related packages. | ||
<pre><nowiki> | |||
sudo apt-get build-dep nx freenx | sudo apt-get build-dep nx freenx | ||
apt-get -b source nx freenx</nowiki></pre> This will download the souce tarballs and build the freenx packages (*.deb) in the current directory. | apt-get -b source nx freenx</nowiki></pre> This will download the souce tarballs and build the freenx packages (*.deb) in the current directory. | ||
* Install the FreeNX packages<pre><nowiki> | * Install the FreeNX packages. | ||
<pre><nowiki> | |||
sudo dpkg -i *.deb</nowiki></pre> | sudo dpkg -i *.deb</nowiki></pre> | ||
* If dpkg complains about missing packages, let apt fix it<pre><nowiki> | * If dpkg complains about missing packages, let apt fix it | ||
<pre><nowiki> | |||
sudo apt-get -f install | sudo apt-get -f install | ||
sudo dpkg -i *.deb</nowiki></pre> | sudo dpkg -i *.deb</nowiki></pre> | ||
第144行: | 第152行: | ||
/!\ This is NOT supported by the FreeNX developers - only do this if you have no other option | /!\ This is NOT supported by the FreeNX developers - only do this if you have no other option | ||
* Generate the DSA private-public key pair<pre><nowiki> | * Generate the DSA private-public key pair. | ||
<pre><nowiki> | |||
ssh-keygen -t dsa</nowiki></pre> By default this key is places in ~/.ssh/id-dsa. You can leave the passphrase empty, this will not pose a security risk. | ssh-keygen -t dsa</nowiki></pre> By default this key is places in ~/.ssh/id-dsa. You can leave the passphrase empty, this will not pose a security risk. | ||
* Install the public key in the FreeNX serving machine. The key should be placed in the file authorized_keys2 in the .ssh dir of the user named nx<pre><nowiki> | * Install the public key in the FreeNX serving machine. The key should be placed in the file authorized_keys2 in the .ssh dir of the user named nx. | ||
<pre><nowiki> | |||
cat ~/.ssh/id_dsa.pub | sudo -u nx tee -a ~nx/.ssh/authorized_keys2</nowiki></pre> | cat ~/.ssh/id_dsa.pub | sudo -u nx tee -a ~nx/.ssh/authorized_keys2</nowiki></pre> | ||
* Install the private key in the NX client software. When creating a session, press the button labeled "Key" and select your new key in the window that pops up. | * Install the private key in the NX client software. When creating a session, press the button labeled "Key" and select your new key in the window that pops up. |
2007年5月24日 (四) 11:51的版本
文章出处: |
{{#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 | | }}
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.
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.
Installing the FreeNX server
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. For Ubuntu 5.10 and 6.06, they are:
gksudo gedit /etc/apt/sources.list
deb http://free.linux.hp.com/~brett/seveas/freenx dapper-seveas freenx deb-src http://free.linux.hp.com/~brett/seveas/freenx dapper-seveas freenx
Save and then close.
Add the GPG key:
wget http://free.linux.hp.com/~brett/seveas/freenx/1135D466.gpg -O- | sudo apt-key add -
Then Update Apt
sudo apt-get update
After you add the repository, then install the freenx
package.
sudo aptitude install freenx
(Using aptitude to install extra needed packages)
For Ubuntu 6.10 no new prebuilt packages have been released, but the FreeNX server included in the 6.06 package does work with 6.10.
During installation you will be given the option to select NoMachine keys, or custom keys. It is best to select NoMachine keys. For the paranoid: there is absolutely NO added security risk involved in using the default keys. Read an SSL primer if you want to know the details about why this is the case
On the server, add your user to nxserver
sudo nxserver --adduser <username> sudo nxserver --passwd <username> sudo nxserver --restart
[Note: I don't know if this is still needed, but it helps - JeremySchroeder]
Configuring SSH
By default, nxserver uses port 22 for communicating over SSH. On some machines or networks, port 22 may be blocked. For example, some providers block port 22. 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
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.
Installing the NX Client
sudo aptitude install nxclient
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.
(!) Note on nomachine web site there is new version off nxclient version 2.0 and it don't work with freenx so you should better use nxclient from Seveas' Packages!
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]
Useful Resource for installing client on 64-bit Ubuntu
Miscellany
FreeNX on PowerPC
There are no precompiled binaries of FreeNX on this platform, so FreeNX have to be compiled from source. Sources for breezy can be found at SeveasPackages
These steps will build FreeNX from source:
- Create a directory to hold the FreeNX source, and cd into it.
mkdir freenxSource; cd freenxSource
- Build the freenx pacakges and install related packages.
sudo apt-get build-dep nx freenx apt-get -b source nx freenx
This will download the souce 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
FreeNX on 64bit
FreeNX is not 64-bit safe, so you will have to build a 32-bit chroot.
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 nxserver --stop
(Replace --stop by --start for starting it again)
Using custom SSH keys
/!\ This is NOT supported by the FreeNX developers - only do this if you have no other option
- Generate the DSA private-public key pair.
ssh-keygen -t dsa
By default this key is places in ~/.ssh/id-dsa. You can leave the passphrase empty, this will not pose a security risk.
- Install the public key in the FreeNX serving machine. The key should be placed in the file authorized_keys2 in the .ssh dir of the user named nx.
cat ~/.ssh/id_dsa.pub | sudo -u nx tee -a ~nx/.ssh/authorized_keys2
- Install the private key in the NX client software. When creating a session, press the button labeled "Key" and select your new key in the window that pops up.
References
- FreeNX on Wikipedia
- Seveas' Packages FreeNX repository