Friday, June 6, 2008

The best remote access system for Ubuntu 8.04 (hardy)

What is the fastest VNC server? What is the most responsive VNC client? Can I just forward X directly? Which is the most secure? - These are the questions I needed to get answers to quickly as migrated my development environment from XP to Linux.

The first obvious thing to try, of course, was directly forwarding X. That was just too slow. Next was VNC. I tried tightvnc, realvnc, vino, etc. The only usable setting I found was 8-bit colour and using Hextile encodig. However, it wasn't very enjoyable.

Then I discovered FreeNX. It's fast, secure, stable, user-friendly, and very pleasing to the eye. Here's how to set it up on Ubuntu 8.04.

Server Setup:

Step1: Update your current installation
prompt%> sudo apt-get update && sudo apt-get upgrade

Step2: Add the repository for th NX packages & get them
prompt%> sudo vi /etc/apt/sources.list

Add the following lines:
deb hardy main
deb-src hardy main

prompt%> sudo apt-get install expect openssh-server nxlibs nxagent nxproxy freenx-server

Step3: Add your account
prompt%> sudo /usr/bin/nxserver --useradd < username > --system --administrator

Step4: Startup the NX server
prompt%> sudo /usr/bin/nxserver --start or --stop or --restart

Client setup

Step1: Download the client
prompt%> wget

Step2: Install it
prompt%> sudo dpkg -i nxclient_3.2.0-9_i386.deb

If you are using a windows machine, you can get a client from here:

Step3: Run the client
prompt%> /usr/NX/bin/nxclient


Update 2008-06-26:

For AMD64, its just about the same:

1) Get SSHD:
prmpt%> sudo apt-get install openssh-server
2) Get 3 packages from here.
3) Install:
prompt%> sudo dpkg -i nxclient_3.2.0-9_x86_64.deb
prompt%> sudo dpkg -i nxnode_3.2.0-11_x86_64.deb
prompt%> sudo dpkg -i nxserver_3.2.0-13_x86_64.deb
4) Start server
/usr/NX/bin/nxserver --status|--start|--stop|--restart




Anonymous said...

I have tried these steps several times (Free NX), including other steps (NX server from nomachine) but I always get:
"The NX service is not available or the NX access was disabled on host"
Other have reported this issue and I never saw a solution that works.

Marky said...

I believe the problem is in ssh. You have to make sure sshd is running on the server machine. Also, if your ssh is running on a non-standard port (i.e. not 22), make sure to make your nx client use that port.

For ssh setup, try this:

Let me know if this works. Good luck!

Rico Trevisan said...

Shouldn't step 1 be repeated after you add those repositories?

Marky said...

Not necessarily. You should only need nx components from the new repositories. But there's no harm if you updated again after step 1.

Good luck!

Anonymous said...

Awesome. Thanks. Works like a charm with a Mac client connecting to a server running on Hardy. Previously I was using Hardy builtin desktop sharing solution. But I was experiencing some serious lagging. The freenx solution is much more efficient. Thanks a lot.

Anonymous said...

I actually had to add a bunch more repositories than you listed:

deb hardy main
deb-src hardy main
deb hardy main
deb-src hardy main
deb hardy main
deb-src hardy main

Upon closer inspection, the marceloshima repo seems to be abandoned... not sure if that one is even still needed.

Also, step 3 of the server setup is not needed anymore (actually throws an error).

Still, nice guide :) Worked like a charm after adding the additional repos.

Anonymous said...

How do you uninstall this program?

ttoomm said...

OK, first I need to confess I am real new to Ubuntu.

That said, I had tried about three of the packages that are mentioned plus Xming which the Ubuntu site recommends. This was the oly one I was able to get to work. BUT ...

He missed four statements that need to be added to etc/apt/sources.list and then he forgets to tell you to update.

So read this post also:

Anonymous said...

I seem to have a problem with it disconnecting immediately. It seems to connect, authenticate, etc, however disconnects immediately. Tried from both Win/Lin computers & the server shows the session info -- ie, connected, authenticated, etc.

Any help is greatly appreciated.

Mike said...

Worked an absolute charm, thanks! I use third party remote access for my PC/Mac - PC/Mac connections, but until now I had no solution for Ubuntu. Thanks again!