From Wiki

Jump to: navigation, search

The following will allow vnc to start a X desktop. This VM is run on KVM.


Install VNCServer and XFCE

apt-get install vnc4server
apt-get install xfce4
//do a reboot if you like. No x should be started on reboot.
//check services with sysv-rc-conf

Config for xfce to start with vncserver

mkdir /etc/vnc
vi /etc/vnc/xstartup
//add in the following:

Control VNC session

Start VNC Session


The first time a user goes "vncserver" from the cli, they will be asked for a password. This will be saved in ~/.vnc/passwd There will also be other log files in ~/.vnc/ Note, you can edit on a per user basis xstartup, however in the Config above, I added startxfce4 to the global file.

Kill VNC session

vncserver -kill :1


Web Browser Issue - Failed

After doing a new install and starting up a vnc session, clicking on the "Web Browser" returned the error: "failed to execute default web browser" with an IO error.

The solution was:

apt-get install iceweasel

Refs: http://lostsux.com/projects/thelostsuxproject/wiki/Debian_6_(Upgraded_from_Debian_5_OpenVZ)_with_X_plus_VNC

P.S. KDE did not work great with vncserver on debian squeeze. There was issues with the graphics and rendering. Changing resolution and color depth did not resolve it. There is a current bug open. Until its fixed, xfce will do. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608195

Personal tools