Linux.com

Feature

Faster remote desktop connections with FreeNX

By Marc Abramowitz on May 18, 2006 (8:00:00 AM)

Share    Print    Comments   

Virtual Network Computing (VNC) is a useful tool for accessing and controlling remote machines, but its responsiveness leaves much to be desired -- especially when you're accessing remote machines via a slow network connection. FreeNX also allows remote administration, but is much more responsive and works over a secure connection, and is free software to boot. FreeNX is also easy to set up, and I'll show you how.

FreeNX is based on the Italian company NoMachine's NX technology, which is designed to be fast enough to be usable over even the slowest of network connections. The NX protocol is general enough that you can use it to efficiently tunnel and accelerate Windows Remote Desktop Protocol (RDP) and VNC sessions. NX uses a variety of techniques, including compression and caching, to minimize the amount of data sent over the wire and increase responsiveness. NX uses Secure Shell (SSH) as a transport protocol, which provides authentication and encryption in a standard way.

NoMachine offers commercial NX server products and free client software for Windows, Linux, Mac OS X, and Solaris. It provides the core NX technology and software libraries under the GNU General Public License (GPL), which makes it possible for others to develop their own NX servers. FreeNX is a GPLed implementation of an NX server, built on top of the NX core libraries.

FreeNX might not have all the features of NoMachine's commercial products, but it's good enough to provide the performance benefits of NX technology. You can upgrade to one of NoMachine's commercial servers later, if you decide that you need features that are available only in the commercial products, such as multiple sessions, sound, and Samba/SMB support.

Installing FreeNX

The easiest way to install FreeNX is to use a package tailored for your distribution. My machine runs Ubuntu Linux, so I installed FreeNX using the following steps:

  1. Add the "seveas" repository, which contains the FreeNX packages, by editing /etc/apt/sources.list and adding the line:
    deb free.linux.hp.com/~brett/seveas/freenx/ breezy-seveas freenx
    
  2. Add the GNU Privacy Guard (GnuPG) key for the "seveas" repository to your GnuPG keyring:
    gpg --keyserver subkeys.pgp.net --recv-keys 1135D466
    gpg --export --armor 1135D466 | sudo apt-key add -
    
  3. Retrieve the list of packages from the newly added "seveas" repository:
    sudo apt-get update
    
  4. Install the required packages:
    sudo apt-get install freenx nxviewer
    

For more information on FreeNX with Ubuntu, see the FreeNX page on the Ubuntu wiki.

If you're using FreeBSD, you can use the FreeBSD port for FreeNX. Others have written instructions for using FreeNX under Fedora Core, SUSE Linux 10, and Gentoo Linux.

Typically, you install FreeNX from a RPM or a Debian package, and the package takes care of setting up FreeNX for you. If you run into problems getting FreeNX to work, you may want to verify that the installation script took care of the items below.

  1. Verify that you have a new user called "nx" whose login shell is set to /usr/X11R6/NX/bin/nxserver. When troubleshooting, it is sometimes helpful to test the "nx" user account by running su nx as the root user.
  2. You may or may not need to do something like the following:
    nxsetup --install --setup-nomachine-key
    nxserver --adduser marc    # change to your desired user name
    nxserver --passwd marc     # change to your desired user name
    

The --setup-nomachine-key option installs for the "nx" user an SSH Digital Signature Algorithm (DSA) public key from NoMachine that corresponds to a private key that is set up to be the default in the NX client software. You can find this public key in ~nx/.ssh/authorized_keys2.

Figure 1. NX client main screen
Figure 1. NX client main screen

You can also use your own SSH keys for additional security. To do this, add your public key to ~nx/.ssh/authorized_keys2. When I talk about the NX client later, I'll tell you where you configure your private key. Note that the user added with the nxserver command, unlike the previously mentioned "nx" user, is specific to FreeNX and thus doesn't appear in your system user/password database, such as the /etc/passwd file, or the Network Information Service (NIS).

Ensure that your network configuration allows connections to the FreeNX server via SSH. One advantage of the NX protocol is that it is carried through SSH, so if you've already opened TCP port 22 for SSH you don't need to open additional ports for NX access. If you're running sshd on a port other than 22, you need to configure FreeNX for that by editing the file /etc/nxserver/node.conf.

NX client software

Now you need an NX client program. The NX client software is included in some distributions; check to see if you already have it or if it is available via your favorite package management software. If not, you can download and install a free NX client from NoMachine for your platform of choice.

Launch the client and you should see a screen like Figure 1:

Click the "Configure..." button to set up a connection to your FreeNX server. You should see a screen that looks something like Figure 2:

Figure 2. NX client session configuration screen
Figure 2. NX client session configuration screen

You can change the display size, the server and port to connect to, and the amount of compression applied. You can also choose whether to use the GNOME or KDE desktop environment. You could even create two separate sessions -- one configured for GNOME and one for KDE. Typically, most of the default options work well for a generic setup.

By default, the dropdown in the "Desktop" section is set to "Unix." This is the right option for most cases, but you can change it to "VNC" to use the FreeNX server as a proxy to a VNC server, or to "Windows" to use the FreeNX server as a proxy to a Windows RDP server. The VNC and Windows options are interesting because they let you connect to existing VNC and Remote Desktop servers, and also because FreeNX is able to accelerate these types of connections somewhat, although a native NX protocol connection will always be faster.

You can also replace the NoMachine SSH DSA private key with your own key if you wish, by clicking the "Key..." button. For this to work, you must configure the corresponding public key on the server, as described above. I recommend not trying to change the SSH keys until you've gotten FreeNX working.

NX to a GNOME session
Figure 3. NX to a GNOME session - click to enlarge

Once you have your session configured, it's easy to connect from the NX client by choosing a session from the dropdown and typing in the correct password. NX displays a progress dialog that shows what it's doing, and if something goes wrong, it shows the error. If the "Details..." button is not grayed out, then clicking it will give you more information about the error that could be useful for pinpointing the problem.

If all goes well and you connect successfully, the NX client will display the desktop of the remote machine. If you try interacting with the machine, you will probably be pleasantly surprised by how responsive it is, compared to VNC.

Figure 3 shows me connected to a GNOME desktop on my Ubuntu Linux machine from my Mac OS X PowerBook.

The NX Session Administrator application, which comes with the NX client software, in theory allows you to suspend and resume sessions, although I haven't had any luck getting this feature to work.

NX offers much improved responsiveness and security compared to older protocols such as VNC. You may not want to bother with VNC after you see the increased responsiveness of NX. With fast access to your remote desktops, you can do just about anything from home that you can do at the office.

Share    Print    Comments   

Comments

on Faster remote desktop connections with FreeNX

Note: Comments are owned by the poster. We are not responsible for their content.

Your apt source line is wrong

Posted by: Anonymous Coward on May 19, 2006 02:49 AM
You need to prepend <a href="http:///" title="http">http:///</a http> to the URL in the deb source line like so:

deb <a href="http://free.linux.hp.com/~brett/seveas/freenx/" title="hp.com">http://free.linux.hp.com/~brett/seveas/freenx/</a hp.com> breezy-seveas freenx

Also, it doesn't appear that this repo has a 64-bit version.

-Srcfoo

#

Suspend/resume

Posted by: Anonymous Coward on May 19, 2006 04:23 AM
you can suspend a session and resume it later easily with the key-combo CTRL+ALT+T - works great!

#

Thin client devices

Posted by: Anonymous Coward on May 19, 2006 07:33 AM
Anybody know of a thin client device which has a built in FreeNX client? There's a couple of devices mentioned on the nomachine website such as thinlinx. I emailed them and one other company and haven't received a reply after over a week.

Its something for myself. Not buying a huge quantity (probably 1 or 2) and I don't want to spend a huge amount of money.

#

Re:Thin client devices

Posted by: Anonymous Coward on May 20, 2006 01:56 AM
We just bought a bunch of IGEL Compact 364 LX.
See <a href="http://www.igel.com/" title="igel.com">http://www.igel.com/</a igel.com> and it comes with the latest NX Client built-in (that was the main reason we chose them). We are very satisfied so far with them. You may want to contact the nice people at <a href="http://www.cpc-i.com/" title="cpc-i.com">http://www.cpc-i.com/</a cpc-i.com> they are authorized US distributors. I am in Canada and the service I got from them was amazing.

Stephen...

#

Re:Thin client devices

Posted by: Anonymous Coward on May 27, 2006 03:25 AM
The owners of ThinLinx are at LinuxWorld in Sao Paulo, Brazil this week. They're stopping in LA for a few days on their way back to Oz so it will take them at least another week to reach the point where they can begin to get back into the routine of answering Emails. This is the second major show they've done this month so they are stretched pretty thin. One of the things that separates the ThinLinx device from any other devices that can be used as X terminals is that the ThinLinx device provides access to net-driven applications, such as point of sale. If you're a ThinLinx customer you don't just buy a device, you can also subscribe to the applications and applicaiton support you need to put the device to very serious use in a vertical market context.

#

Re:Thin client devices

Posted by: Anonymous Coward on September 19, 2006 02:05 AM
I am looking to purchase thousands of thin clients and I would like to migrate to freenx. Wouold prefer a XP with freenx and ability to lock down all devices except printing. My company sells POS systems and this would be great for temp hire and sales clerks. Any suggestions would be appreciated.
Thanks! Email to reasley@teleflora.com

#

Re:Thin client devices

Posted by: Anonymous Coward on December 23, 2006 08:50 AM
Try the SmartFLeX Technology NETiON Series Thin Clients. Excellent products and outstanding service.

#

Re:Thin client devices

Posted by: Anonymous Coward on December 23, 2006 08:51 AM
The url of SmartFLeX Technology is:

www.smartflextech.com

#

vino

Posted by: Anonymous Coward on May 19, 2006 03:49 PM
does freenx work tougther with gnome's vino ?

#

Re:vino

Posted by: Anonymous Coward on May 19, 2006 11:35 PM
I don't think so. vino is a vnc client. FreeNX has nothing to do with VNC.

#

Re:vino

Posted by: Anonymous Coward on May 20, 2006 09:21 AM
The NX Client from NoMachine can also connect to a VNC server. The connection has to be proxied thru an NX or a FreeNX server to make it faster than native VNC, though....

#

Can FreeNX access machines behind a firewall?

Posted by: Anonymous Coward on May 19, 2006 10:36 PM
My linux pc at work is behind a firewall. So, from my home linux machine I ssh to a linux server and from there I ssh to my office linux box.
Can I use freenx with multiple ssh hops?

#

Re:Can FreeNX access machines behind a firewall?

Posted by: Anonymous Coward on May 19, 2006 11:05 PM
i don't know, maybe portforwarding via ssh is a solution ?

#

Re:Can FreeNX access machines behind a firewall?

Posted by: Anonymous Coward on May 19, 2006 11:23 PM
I simply routed some other port (XXXX) to the internal machine's ssh port, so doing ssh your-router -p XXXX will take you directly to the machine behind the router/firewall. Works fine with NX.

#

Connect to a running X session?

Posted by: Anonymous Coward on May 20, 2006 02:40 PM
For comparison, Windows XP handles this fairly well with its Remote Desktop (albeit with other limitations)...

Finish work, lock your work PC, go home, connect with a RDP client (rdesktop on Linux), and you now have your work desktop with all the applications open, ready to carry on working. The start menu no longer has 'Shut down' but 'Disconnect'.

Not saying Windows is perfect, but this particular brand of remote functionality would be welcome on Linux.

To my knowlege, FreeNX can't do that. If I leave my Linux desktop at home running and then connect via FreeNX from work, I'll get a new Linux desktop. I won't see all my applications running, and for certain programs (e.g. Kmail and probably other mail programs) it doesn't make sense for me to launch a second copy, or it can cause issues.

It would be great to have a choice - connect to running desktop or launch a new session.

#

Re:Connect to a running X session?

Posted by: Anonymous Coward on May 20, 2006 05:57 PM
x11vnc
<a href="http://www.karlrunge.com/x11vnc/" title="karlrunge.com">http://www.karlrunge.com/x11vnc/</a karlrunge.com>

#

Re:Connect to a running X session?

Posted by: Anonymous Coward on May 20, 2006 06:16 PM
VNC is painfully slow compared to NX and RDP.

Or is there a way of using x11vnc with a non-VNC protocol?

#

Re:Connect to a running X session?

Posted by: Anonymous Coward on May 21, 2006 07:33 AM
well, launch a freenx session and then the xvncviewer in it.

#

I know a solution ("Connect to running X?")

Posted by: Anonymous Coward on May 22, 2006 01:22 AM
* if you regularly need to access your running session from remote....



* if you want to do the same as you exampled with Windows XP -- finish work, lock PC, go home, connect to running session....

<nobr> <wbr></nobr>...then this trick is for you:



Do not run a fully featured X11 session directly on your hardware. Instead, start a minimal X session only; within that session, start NX Client, and connect to an NX or FreeNX KDE/Gnome session on localhost using the "fullscreen" display mode.



That way even your so called "local" session is an NX session (you won't notice any difference in speed compared to a traditional local session), and it is no problem to login from remote and take over this session....



NX Fan

(freenx-expert)

#

Great tip, thanks, some help debian sarge?

Posted by: Anonymous Coward on May 24, 2006 07:45 AM
Been trying to figure out how to do exactly what the other posters mentioned. I have a desktop that has been turned into a file server since I'm not in that room much anymore. It runs debian stable. From other rooms, I start lower powered desktops, running knoppix. From the knoppix desktop(s), I ssh into the debian stable box, and then start kmail, konqueror sessions, kwrite, and other apps, including OpenOffice.org 2.0 (backports) and others. This is over a 100Mbit lan. While I find it easy to shut down OpenOffice, I find it impossible to shut down the dozens and dozens of konqueror tabs I have open to web pages, the multiple kwrite or other editor sessions I have open, and many of the other things I have running. So I end up with the Sarge server running 24/7, plus the knoppix desktop running 24/7 since it is so much trouble to shut everything down (I have to make a note of every open url, remember where/what I was doing with the editors, etc.).



I tried figuring out what to do with screen once I was made aware of its capabilities, but what I really need is either suspend/resume like a laptop (which I am on the verge of buying), or something like the detach feature being talked about here. I tried VNC, figuring that over a 100Mbit lan it would work ok, but I found several problems, including the responsiveness (terrible), the problem of the server setup using a 19" monitor and my knoppix desktops using 14" and 15" monitors, etc. I tried the built in VNC/desktop sharing of KDE, but same problem with monitor size incompatibilities.



Do I have to wait for Etch to enter stable before I can use NX? I tried downloading the<nobr> <wbr></nobr>.debs for freenx from several third party sites for kanotix, but when trying to download the freenx debs, I get dependency errors. I solved a couple of them by downloading and installing what it was asking for, but the showstopper now is it is requesting openssh-server and openssh-client, and I have the ssh and sshd versions for Sarge installed, which appear to be different than what is being requested as a dependency. Additonal dependency problem for nxagent:



nxagent:

Depends: libc6 (>=2.3.6-6) but 2.3.2.ds1-22sarge3 is to be installed

Depends: libxcomp1 but it is not going to be installed

Depends: libxcompext1 but it is not going to be installed

Depends: nxlibs but it is not going to be installed


#

Re:I know a solution ("Connect to running X?")

Posted by: Anonymous Coward on May 31, 2006 11:33 AM
Can you post, or point me in the direction of, detailed instructions on how to accomplish this? Specifically, I'm using Fedora Core 5. I'm fairly new to Linux. This sounds like what I want to do.

When I was strictly using Windows, VNC worked great for me -- the speed was more than acceptable over a high-latency low-bandwidth line. In Linux, that is very much not the case, as even connecting through VNC across the LAN is unacceptable. I tried FreeNX, and it's speed is incredible, but I can't connect to an existing session. Your method sounds like the way to go.

#

Re:I know a solution ("Connect to running X?")

Posted by: Administrator on May 22, 2006 05:39 PM
I will give it a shot. Sounds like the way to go.

#

Re:Connect to a running X session?

Posted by: Anonymous Coward on June 06, 2006 06:21 AM
hmm.... FreeNX handles this just as WinXP does with RDP. (you need nxlibs 1.5). Just use CTRL-ALT-T and answer suspend, then when you reconnect you will either resume the session automatically or given a choice to create a new, or resume the existing one...

Take a look in node.conf for me details on how to customize this to your needs..

NX/FreeNX rocks!

#

Re:freenx fonts

Posted by: Anonymous Coward on October 26, 2006 07:35 AM
I am fighting the same issue - Did you get a response ?

#

Re:freenx fonts

Posted by: Anonymous Coward on April 07, 2007 09:04 AM
I got p4v to work for me by installing the Windows client side fonts from nomachine.com. I installed all the 4 font packages in<nobr> <wbr></nobr>.exe form so I don't know which of them is absoluted necessary

#

Re:freenx fonts

Posted by: Anonymous Coward on April 15, 2007 07:24 AM
I've had similar problems.

p4v works with VNC but not NX (I'm using NoMachine's NX, not freeNX).

All the menu text has squares where the characters should be.

However I noticed that the fonts dialogue box was able to show a sample of Courier text. So I loaded p4v in VNC, changed my font settings for the UI to Courier, then reused p4v with NX.

I presume my VNC setup has more fonts available compared to NX.

Perhaps digging around with "xset q" to list the font search path and "xlsfonts" may help diagnose the root cause, but I haven't tried that yet.

The p4v font selection was peculiar since it failed to complain about selection of fonts that weren't available, e.g. Helvetica. But I suppose that's the fault of perforce not NX.

Hope that helps.

#

freenx fonts

Posted by: Administrator on May 22, 2006 08:44 PM
Anyone get a remote font server working with free-nx?
I have some apps, like p4v, the perforce GUI that show garbled fonts under freenx.

#

Why not just use X over SSH?

Posted by: Anonymous [ip: 68.126.190.109] on September 04, 2007 08:38 AM
Is there something wrong about using X over SSH?

#

Re: Why not just use X over SSH?

Posted by: Anonymous [ip: 129.118.162.51] on September 14, 2007 10:44 PM
It is painfully slow, even on my DSL internet.
I find FreeNX is much better.

#

Can I use FreeNX to view the same session from multiple clients?

Posted by: Wolfram Arnold on October 12, 2007 09:48 AM
One of the features of VNC that I use frequently with my clients is the ability for multiple remote people to see the same screen. We use this a lot for pair programming. I would love to use FreeNX's speed for that, but I haven't figured out how I can have the nxclient connect to the _same_ FreeNX server session. In VNC mode it asks which screen to connect to. Can this be configured with the native NX mode as well? If so, how?

#

I can't see it being faster than VNC

Posted by: Anonymous [ip: 71.141.233.233] on February 08, 2008 06:14 PM
I use Electronic Design Automation tools from Cadence for IC design. These are highly graphics intensive as you can imagine. I cannot see the benefit of NX over VNC. In fact, VNC is really fast for me, both on LAN and through VPN/DSL. NX is at most on par, and actually looks uglier because of the jpeg encoding. I must say NX is way faster, over DSL, than other commercial stuff like Exceed.

How am I not testing this right? Do I really have to go to a really low bandwidth to see the benefit? My DSL is pretty decent at about 3Mbps.

Please advise.

#

RE: I can't see it being faster than VNC.

Posted by: Anonymous [ip: 208.251.204.174] on March 10, 2008 02:43 PM
When configuring your NX client, click the Settings button in the Display section. Change the JPEG compression quality or choose "Use plain X bitmaps" to eliminate the problem with "looks uglier because of the jpeg encoding."

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya