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:


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


Linux console resolution

Note that on some systems (Ubuntu for example) you will need to enable frame buffer

Do this by editing /etc/modules and add the following rules:


Then in: /boot/grub/menu.lst add:

vga=769 splash="silent"

to the end of a ‘kernel’ option here change ‘769’ to the settings you wish to run at (see below) These are the value’s to choose from:

    | 640x480  800x600  1024x768 1280x1024
256 |  0x301    0x303    0x305    0x307
32k |  0x310    0x313    0x316    0x319
64k |  0x311    0x314    0x317    0x31A
16M |  0x312    0x315    0x318    0x31B

Or in decimal:

    | 640x480 | 800x600 | 1024x768 | 1280x1024
256 |   769       771        773        775
32K |   784       787        790        793
64K |   785       788        791        794
16M |   786       789        792        795

* Note that this is only for vesafb

Page 9 of 9 «...56789