Remote Desktop on Xubuntu

, No Comments »

Unlike remote desktop in Ubuntu, Xubuntu doesn’t come with a default VNC server. To allow for remote desktop I installed x11vnc which allows remote access to an existing X server session. The advantage is that it allows you to view the phyical display remotely and also log-in to a new session using a remote VNC client.

Installing a VNC Server

Install the x11vnc package

$ sudo apt-get install x11vnc

Install the xinetd package

$ sudo apt-get install xinetd

Add the x11vnc service to xinetd

$ sudo nano /etc/xinetd.d/x11vnc

Add the following content in the file:

service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
disable = no
}

Restart the xinetd
$ sudo /etc/init.d/xinetd stop
$ sudo /etc/init.d/xinetd start

Creating a Password for the VNC Server

Install the vnc-common package
$ sudo apt-get install vnc-common

Create a password file
$ sudo vncpasswd /root/.vncpasswd

Add the -rfbauth /root/.vncpasswd option to server_args in the /etc/xinetd.d/x11vnc file. For example:

server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -rfbauth /root/.vncpasswd

Restart the xinetd

$ sudo /etc/init.d/xinetd stop
$ sudo /etc/init.d/xinetd start

Connecting with a VNC Client

To connect to your remote desktop any VNC viewer can be installed. For example RealVNC or TightVNC (requires VNC password to be implemented) provides a free edition client.

Remote Desktop on Ubuntu

, No Comments »

Ubuntu uses VNC (Virtual Network Computing) to allow remote desktop access. The default VNC server which Ubuntu uses is vino. Vino works differently from most VNC servers; once it is enabled, the GNOME session manager automatically starts it for you whenever you log in. It can therefore only export the display of a user that is currently logged in, unlike more standard VNC servers that typically display a system’s login screen and therefore support remote access to your system by random users.

Enable Remote Desktop

  1. Go to System -> Preferences -> Remote Desktop
  2. Under “Sharing” heading check both the “Allow other users to view your desktop” and “Allow others to control your desktop” checkbox
  3. Keep the “Ask you for confirmation” checkbox is uncheck
  4. Check the “Require the user to enter this password” checkbox and enter the password in the textbox below. Note that this is the VNC password and is not related to your users login password.
  5. Under the “Users can view your desktop using this command:” make a note of the port number indicated in the command. This will the be port assign to acess your desktop.

Remote Desktop
Connecting to Remote Desktop

To connect to your remote desktop any VNC viewer can be installed. A popular VNC viewer is TightVNC, the viewer can be downloaded at http://www.tightvnc.com/download.html. The viewer is just a single executable file, and can be installed on any portable drive. When you start the VNC viewer, enter your computer’s public IP address and port number indicated by the by the screen above (:0 indicates port 5900, :1 to port 5901 etc.), and click on the “Connect” button.

TightVNC Viewer
It is also possible to use VNC through SSH Tunneling refer to setting up a SSH server, and configuring Putty in the blog Remote Desktop with SSH Tunneling.

Remote Desktop with SSH Tunneling

, , , 1 Comment »

Remote Desktop enables you to connect to your computer across the Internet from a computer. Once connected, you can control your computer using the mouse and keyboard while showing you everything that’s happening on the screen. With this, you can access your files, applications, and e-mail while leaving your computer at home or in the office.

Remote Desktop is very convenient, it suffers from to flaws: Although the connection uses 128-bit encryption, it still has the man-in-the-middle vulnerability where the traffic can be decrypted along the way. The default port of Remote Desktop is also 3389 which in most circumstances is blocked by firewalls in the network.

A solution to these flaws is to use Remote Desktop through a SSH tunnel.

SSH Server

The first requirement is to have an SSH server existing on your network. If you already have a Linux server like Ubuntu then you can install OpenSSH. However, if you only have computers with Windows then you can install copSSH.

Port Forwarding for SSH

To access the SSH server from a remote location you need to do port forwarding on port 22 through any firewall and router.

Enabling Remote Desktop

To enable Remote Desktop on Windows XP, right click on “My Computer”, and select “Properties”. Under the “Remote” tab check the box “Allow users to connect remotely to this computer”. The Remote Desktop user will require a password associated with the account.

Connecting to the SSH Server

To connect to your SSH Server remotely requires knowledge of your public IP address. This can be checked easily using the website http://checkip.dyndns.org. If you are using an ISP that provides you with a dynamic IP address, then you can setup a free account with No-IP http://www.no-ip.com or DynDNS http://www.dyndns.com where they can provide you with a fully qualified domain name.

Install/Configuring PuTTY

To open a SSH tunnel from the remote computer to your SSH server, you need to install PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty on the remote client computer. Open the application after installation is completed.

  1. Expand “SSH” under “Connection”, and then go to “Tunnels”.
  2. Under “Add new forwarded port:” enter a port number beside “Source port” e.g. 3390
  3. Beside “Destination” enter your computer name or computer local IP address along with the port for Remote Desktop 3389 e.g. 192.168.1.10:3389, and click on the “Add” button.

PuTTY screenshot 1

Use a different Source port for each additional Remote Desktop host PC.

To improve traffic click on “SSH” under “Connection”. Check the box “Enable Compression”

PuTTY screenshot 2

Click on “Session” and under the “Host Name (or IP address)” enter the public IP address or a fully qualified domain name of the SSH server PC. Enter a unique name in the “Saved Sessions” window and click on “Save”. Click on “Open” and login to the SSH server with the appropriate user and password information.

PuTTY screenshot 3

SSH Tunneling the Remote Desktop session

Establishing a Remote Desktop connection through SSH tunnel is accomplished when PuTTY is started and the user has logged on to the SSH server. To Remote Desktop from the client computer, on the client computer go to “Start” > “All Programs” > “Accessories” > “Communications” and select “Remote Desktop Connection”. In the “Computer:” textbox enter “localhost:3390″, and click on the “Connect” button.

Remote Desktop Connection screenshot

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in