Linux VNC server

* Note that this is for debian based distro’s.

If you want to connect to your desktop or server that is running X you can install a vnc server to do so..
We will use gdm and xinetd to get it working so that if you boot up the computer it should all work at once.
To install a vnc server you need atleast the following packages installed:

trouble@sun:$ apt-get install vnc4server gdm xinetd

Then you will need to add a new service to the services list in /etc/services

trouble@sun:$ vi /etc/services

–here add at the end of the file:

vncserver 5900/tcp # vnc server

Then you need to change the gdm.conf file

trouble@sun:$ vi /etc/X11/gdm/gdm.conf

— Here find the line [xdmcp] and change the option Enable=false to:

Enable=true

Then add a file in /etc/xinetd.d/ called vncserver

trouble@sun:$ vi /etc/xinetd.d/vncserver

here add:

service vncserver
{
disable = no
socket-type = stream
protocol = tcp
group = tty
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp unix/:7100 -securitytypes=none
}

Restart xinetd and you should be done..

trouble@sun:$ /etc/init.d/xinetd restart

Try to connect to the box using a vnc viewer to :0

0