HowtoForge - Linux Howtos in English English|HowtoForge.de - Linux-Howtos auf Deutsch Deutsch

How To Configure Remote Access To Your Ubuntu Desktop

Submitted by falko (Contact Author) (Forums) on Mon, 2008-02-11 17:25. :: Ubuntu | Desktop

How To Configure Remote Access To Your Ubuntu Desktop

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 01/23/2008

This guide explains how you can enable a remote desktop on an Ubuntu desktop so that you can access and control it remotely. This makes sense for example if you have customers that are not very tech-savvy. If they have a problem, you can log in to their desktops without the need to drive to their location. I will also show how to access the remote Ubuntu desktop from a Windows XP client and an Ubuntu client.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

I have tested this on an Ubuntu 7.10 (Gutsy Gibbon) desktop.

 

2 Enabling The Remote Desktop

We don't have to install anything to enable the remote desktop on Ubuntu. All we have to do is go to System > Preferences > Remote Desktop:

In the Remote Desktop Preferences window, you can configure the remote desktop connection. If you want others to just see your desktop, but not be able to make changes, enable Allow other users to view your desktop only. If they should be able to change settings (e.g. repair your system if there are problems), enable Allow other users to control your desktop as well. Then you should write down the command that you can use on other Linux clients to connect to your desktop; in my case it's:

vncviewer falko-desktop:0

Then there are the security settings. If someone connects to your desktop and you want to be able to block or allow that connection, enable Ask you for confirmation. This makes sense only if someone is actually sitting in front of the system. If you want to connect to your office desktop or any other sysem that only you have access to, then don't enable this option.

But what you should do is set a password for your remote desktop (without a password anyone who happens to find out your system's address - e.g. by scanning the network - can access your desktop):

That's it - the remote desktop can now be used!

You've noticed that the command to connect to the desktop contains the computer name and not the IP address (vncviewer falko-desktop:0). To avoid problems when the computer name (falko-desktop) cannot be resolved in the network, it's a good idea to find out the system's IP address and use that one instead in the vncviewer command. Right-click on the network icon (the two monitors) in the upper right corner and select Connection Information:

A window with details about your current network configuration opens. In it you can find your IP address (192.168.0.217 in my case) - write it down somewhere:

Instead of

vncviewer falko-desktop:0

we can now use

vncviewer 192.168.0.217:0

as well to connect to the remote desktop.

If you want to connect to your desktop from outside your network, you must use your router's public IP address (or get yourself a free hostname from dyndns.org pointing to your router's public IP address). Port 5900 (which is used by the remote desktop) must be open in the firewall, and your router must forward port 5900 to the Ubuntu desktop.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Please do not use the comment function to ask for help! If you need help, please use our forum: http://www.howtoforge.com/forums
Comments will be published after administrator approval.
Submitted by volksman (Contact Author) (Forums) on Tue, 2008-02-12 16:27.

If you are looking for something that responds as fast as RDP for Windows does you may want to look into Nomachines NX product.  Very responsive.  However if you want to attach to the console it is only marginally faster than VNC.

Download the Client, Node and Server packages from http://www.nomachine.com/select-package.php?os=linux&id=1

Then simply run:

sudo dpkg -i nxclient.<version>

sudo dpkg -i nxnode.<version>

sudo dpkg -i nxserver.<version>

You will also need to make sure that SSH is installed and running on the machine:

sudo apt-get install ssh

Then download and install the client on a remote machine (windows, linux whatever) and point the client to your server's IP on port 22.  It should connect and startup a new X desktop for you.  Keep in mind this is a NEW desktop.  If you want to see the existing (console) desktop then you will need to change the  "Desktop" config to "Shadow" however as I mention this is only marginally faster than VNC.  Nomachine has been working on that feature to improve it.

Any questions please ask in the forum. 

Submitted by magnet2wealth (Contact Author) (Forums) on Tue, 2008-02-12 04:09.

This simple HowTo is great. It is pretty straight forward and works super fast, the built in tools with (LinuxMint)Ubuntu are excellent. I check out your new post daily, HowtoForge is part of my iGoogle home page, so I see the headlines every day. Keep up the good work Falko!

Based on your solid detailed tutorials I have set up an Apache LAMP server, where I test web pages, JavaScript, Ajax, PHP stuff and now I have remote desktop that I can access from a Windows client. I am all set, but keep the tips coming....

Thanks,

Sam

www.magnet2wealth.com