Tuesday, December 1, 2009

Running vnc on any linux system

Virtual Network Computing is used to connect to a remote host. It was invented at AT&T bell labs. It is a pretty useful thing to have if you want to connect from a remote computer. For example, you could log-in using vnc to manage your office files or your files on your college server. It is also very much hassle-free once you get the hang of things. In this post, I will only explain how to run the software successfully and how to connect from a remote host. I will assume that the required softwares have been installed on both the server to which you want to connect and also the client from which you will be connecting. In case, you haven't installed them or you have no clue as to what I am talking about, I request you to visit the tightvnc server and read up on how to install them. Incidentally, tightvnc is the software that is installed on my college server and the viewer that I use on my client is also the tightvnc client. Also, you need to have ssh installed on the server and client and you need to know a little about ssh (at least you must know how to log-in using ssh).

Now, the steps to connect to a remote server are summarized as follows:
  1. Ssh into the remote server.
  2. Start a process of the vncserver remotely
  3. Run vncviewer to connect to the vncserver instance.
1) Ssh into the remote server.
$ssh user-name@domainname
Enter the password and you will be connected via ssh into the remote server.

2) Start vncserver

The simplest way to start a vncserver process

$vncserver :1
The number after the colon refers to the display number.

3) Vncviewer
The following screen will pop up. You have to enter the domain name of the remote host to which you want to connect to and then followed by a colon and the display number to which you want to connect to.

Once the correct address has been entered, you will be prompted for the vnc password. In case you do not know the password, you can always change it by sshing into the remote server and running the vncpasswd program.

Finally, we get the screen of the remote desktop as given below

Of course, just like any other good linux program vnc also has plenty of options via which you may control the display parameters such as resolution for speedy transmission and other options. Here, is a sample of how I would get a low resolution display if i need speed over a (relatively) low bandwidth channel.

For further detail usage check the man pages and also the following links,
  1. http://www.vanemery.com/Linux/VNC/vnc-over-ssh.html.
  2. http://www.hep.phy.cam.ac.uk/vnc_docs/index.html.


Post a Comment