FreeNX

Differences between revisions 2 and 45 (spanning 43 versions)
Revision 2 as of 2005-08-04 14:00:50
Size: 1000
Editor: 205
Comment:
Revision 45 as of 2006-05-31 19:22:59
Size: 6911
Editor: rrcs-67-52-254-234
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
''This page will describe how to get FreeNX server working on ubuntu.'' [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. This page will describe how to set up a FreeNX server and a client on Ubuntu systems, for the above example usage. See FreeNxIntegration for how FreeNX can be incorporated into Ubuntu.
Line 3: Line 3:
Add these to {{{/etc/apt/sources.list}}} == 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.

Add these to {{{/etc/apt/sources.list}}} for hoary
Line 5: Line 15:
deb ftp://ftp2.caliu.info/backports/ hoary-backports main universe multiverse restricted
deb ftp://ftp2.caliu.info/backports/ hoary-extras main universe multiverse restricted
deb http://ubuntulinux.nl/ /}}}
''Note: Some people will tell you to add kanotix or backports as a source. Do not do this. It is deprecated''
## Backports really is deprecated - DO NOT USE!

or these for breezy
{{{
deb http://seveas.ubuntulinux.nl/ breezy-seveas freenx
Line 8: Line 23:
''Note: Some people will tell you to add kanotix as a source. Do not do this. It is depreciated'' A faster mirror, donated by Brett Johnson, is:
{{{
deb http://free.linux.hp.com/~brett/seveas/freenx/ breezy-seveas freenx
}}}
or these for Dapper
{{{
deb http://free.linux.hp.com/~brett/seveas/freenx/ dapper-seveas freenx
}}}
More mirror information on the SeveasPackages page
Line 10: Line 33:
Update your sourced {{{sudo apt-get update}}}
Install it{{{sudo apt-get install freenx}}}
''Note: The nxlibs in this version are compiled with g++4.0
from breezy and are thus not suitable for hoary.''
Line 13: Line 36:
''Unless you are overly concerned with security, you should choose the nomachine key during the install''

Add a user {{{nxserver --adduser <Username>
}}}
Set a password {{{nxserver --passwd <Username>
Update your sources {{{sudo apt-get update
Line 20: Line 39:
You should be able to access your ubuntu box from a Windows box using the free client from [http://nomachine.com NoMachine's website] If you get a GPG error, see http://seveas.ubuntulinux.nl Near the top of the page are instructions for adding the authentication key into the apt database.

Install it
{{{
sudo apt-get install freenx}}}

During installation you will be given the option to select NoMachine keys, or custom keys. It is easier to select NoMachine keys.
''There is absolutely NO added security risk involved in using the default keys. Read an [http://en.wikipedia.org/wiki/Secure_Sockets_Layer SSL] primer if you want to know the details about why this is the case''

## For defining custom keys; see below.

=== Defining a non-default ssh port ===
By default, the nxserver uses port 22 for communicating over SSH. On some machines or networks, port 22 may be blocked. For example, my evil ISP blocks port 22. So I have the sshd (daemon) listening on port 8888. If port 22 is blocked on the machine that acts as the freenx server, then you can change the default port by doing the following:

Edit the file /etc/ssh/sshd_config

Find {{{
Port 22}}}

and change it to {{{
Port 8888}}}

Edit the file /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
}}}

(Here, "8888" is the port that sshd is listening on)

That is, change the port number to the one that sshd is listening to, and uncomment the line.

== Installing the NX Client ==
You should be able to access your Ubuntu box from any Windows or Linux box using the free client from [http://nomachine.com NoMachine's website]. You can also embed your NX Server in a webpage by installing the Nomachine Web Companion and the Apache webserver.

This section covers installation of the NX client on a Ubuntu Linux machine. For the example covered in this article, the client is the work computer.

Add these to {{{/etc/apt/sources.list}}} for hoary{{{
deb http://ubuntulinux.nl/ /}}}
''Note: Some people will tell you to add kanotix or backports as a source. Do not do this. It is deprecated''

or these for breezy{{{
deb http://seveas.ubuntulinux.nl/ breezy-seveas freenx}}}

Install the NX client by doing the following on the client machine from where you wish to start an NX session:

{{{
$sudo apt-get install nxclient}}}

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!

== 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 in this repository:
{{{
deb-src http://seveas.ubuntulinux.nl/ breezy-seveas freenx}}}

These steps will build FreeNX from source:

 1. Create a directory to hold the FreeNX source, and cd into it. {{{
mkdir freenxSource; cd freenxSource}}}
 1. 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.
 1. Install the FreeNX packages. {{{
sudo dpkg -i *.deb}}}
 1. 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 nxserver --stop
}}}
(Replace --stop by --start for starting it again)
Line 23: Line 132:
=== Troubleshooting ===

 * If you encounter problems with icons when loggin multiple times with the same user in a gnome session, run gnome-settings-daemon. Let it run at every login (gnome->preferences->sessions).

=== Using custom SSH keys ===
/!\ This is NOT supported by the FreeNX developers - only do this if you have no other option

 1. 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.
 1. 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}}}
 1. 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.
Line 24: Line 146:
 * [http://www.ubuntuforums.org/showthread.php?t=1968 Ubuntu forum FreeNX howto]
 * http://gentoo-wiki.com/HOWTO_FreeNX_Server
 * [http://en.wikipedia.org/wiki/FreeNX FreeNX on Wikipedia]
 * [http://mirror.ubuntulinux.nl FreeNX repository]

----
CategoryDocumentation

[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. This page will describe how to set up a FreeNX server and a client on Ubuntu systems, for the above example usage. See FreeNxIntegration for how FreeNX can be incorporated into Ubuntu.

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.

Add these to /etc/apt/sources.list for hoary

deb http://ubuntulinux.nl/ /

Note: Some people will tell you to add kanotix or backports as a source. Do not do this. It is deprecated

or these for breezy

deb http://seveas.ubuntulinux.nl/ breezy-seveas freenx

A faster mirror, donated by Brett Johnson, is:

deb http://free.linux.hp.com/~brett/seveas/freenx/ breezy-seveas freenx

or these for Dapper

deb http://free.linux.hp.com/~brett/seveas/freenx/ dapper-seveas freenx

More mirror information on the SeveasPackages page

Note: The nxlibs in this version are compiled with g++4.0 from breezy and are thus not suitable for hoary.

Update your sources {{{sudo apt-get update }}}

If you get a GPG error, see http://seveas.ubuntulinux.nl Near the top of the page are instructions for adding the authentication key into the apt database.

Install it

sudo apt-get install freenx

During installation you will be given the option to select NoMachine keys, or custom keys. It is easier to select NoMachine keys. There is absolutely NO added security risk involved in using the default keys. Read an [http://en.wikipedia.org/wiki/Secure_Sockets_Layer SSL] primer if you want to know the details about why this is the case

Defining a non-default ssh port

By default, the nxserver uses port 22 for communicating over SSH. On some machines or networks, port 22 may be blocked. For example, my evil ISP blocks port 22. So I have the sshd (daemon) listening on port 8888. If port 22 is blocked on the machine that acts as the freenx server, then you can change the default port by doing the following:

Edit the file /etc/ssh/sshd_config

Find

Port 22

and change it to

Port 8888

Edit the file /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

(Here, "8888" is the port that sshd is listening on)

That is, change the port number to the one that sshd is listening to, and uncomment the line.

Installing the NX Client

You should be able to access your Ubuntu box from any Windows or Linux box using the free client from [http://nomachine.com NoMachine's website]. You can also embed your NX Server in a webpage by installing the Nomachine Web Companion and the Apache webserver.

This section covers installation of the NX client on a Ubuntu Linux machine. For the example covered in this article, the client is the work computer.

Add these to /etc/apt/sources.list for hoary

deb http://ubuntulinux.nl/ /

Note: Some people will tell you to add kanotix or backports as a source. Do not do this. It is deprecated

or these for breezy

deb http://seveas.ubuntulinux.nl/ breezy-seveas freenx

Install the NX client by doing the following on the client machine from where you wish to start an NX session:

$sudo apt-get install nxclient

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!

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 in this repository:

deb-src http://seveas.ubuntulinux.nl/ breezy-seveas freenx

These steps will build FreeNX from source:

  1. Create a directory to hold the FreeNX source, and cd into it.

    mkdir freenxSource; cd freenxSource
  2. 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.
  3. Install the FreeNX packages.

    sudo dpkg -i *.deb
  4. 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 nxserver --stop

(Replace --stop by --start for starting it again)

Troubleshooting

  • If you encounter problems with icons when loggin multiple times with the same user in a gnome session, run gnome-settings-daemon. Let it run at every login (gnome->preferences->sessions).

Using custom SSH keys

Warning /!\ This is NOT supported by the FreeNX developers - only do this if you have no other option

  1. 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.
  2. 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
  3. 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


CategoryDocumentation

FreeNX (last edited 2008-08-06 16:28:22 by localhost)