Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On 10.04 LTS I was able to run vnc4server on display :1 and get a new desktop. This was great as I could work from home without people seeing what was on my screen (:0 was in a "locked screen" state).

When replicating this on 12.04 LTS I just get a blank desktop and have not been able to find out what the difference is?

Anyone else experienced this, or has anybody else got a VNC setup where you can connect to a screen other than the one which is display :0?


share|improve this question

Had same problem. Couldn't find a solution online. Here is what worked for me. (assuming you already have Gnome installed)

My xstartup file:


# Uncomment the following two lines for normal desktop:
# exec /etc/X11/xinit/xinitrc
gnome-session –session=gnome-classic &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

I added:

gnome-session –session=gnome-classic &   

and uncommented:


Also modified $defaultXStartup section of /usr/bin/vncserver so that the default xstartup is the same as above:

    = ("#!/bin/sh\n\n".
       "# Uncomment the following two lines for normal desktop:\n".
       "unset SESSION_MANAGER\n".
       "# exec /etc/X11/xinit/xinitrc\n".
       "gnome-session –session=gnome-classic &\n".
       "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n".
       "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
       "xsetroot -solid grey\n".
       "vncconfig -iconic &\n".
       "x-terminal-emulator -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
       "x-window-manager &\n");

And that did the trick for me!

share|improve this answer
Finally, something that works! Thank you! – Dave Oct 27 '14 at 15:26
This the only answer in the entire internet that works for me! – Vasilis Jun 23 '15 at 21:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.