Ubuntu – tightvncserver on ubuntu 12.04 server with ubuntu-desktop installed no unity

12.04serverunityvnc

The tight vnc server is running but unity does not get loaded. I changed the xstartup to:
unset SESSION_MANAGER
. /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
gnome-session &

But still no unity.
In wich log file can I look for the errors containing the starting of tightvncserver in combination with gnome and unity?

Can somone point me at documentation abou tthe loading/starting sequence of Xserver, windows manager etc.?

Is this a known issue?

Best Answer

Here's what worked for me (on an amazon EC2 instance)

sudo apt-get install ubuntu-desktop tightvncserver

Edit ~/.vnc/xstartup to read (modified from the one found in the ubuntu docs):

#!/bin/sh

# Change "GNOME" to "KDE" for a KDE desktop, or "" for a generic desktop
MODE="GNOME"

#Uncommment this line if using Gnome and your keyboard mappings are incorrect.
#export XKL_XMODMAP_DISABLE=1

# Load X resources (if any)
if [ -e "$HOME/.Xresources" ]
then
        xrdb "$HOME/.Xresources"
fi

# Try a GNOME session, or fall back to KDE
if [ "GNOME" = "$MODE" ]
then
        if which gnome-session >/dev/null
        then
                echo starting gnome
                gnome-session &
        else
                MODE="KDE"
        fi
fi

# Try a KDE session, or fall back to generic
if [ "KDE" = "$MODE" ]
then
        if which startkde >/dev/null
        then
                startkde &
        else
                MODE=""
        fi
fi

# Run a generic session
if [ -z "$MODE" ]
then
        xsetroot -solid "#DAB082"
        x-terminal-emulator -geometry "80x24+10+10" -ls -title "$VNCDESKTOP Desktop" &
        x-window-manager &
fi

Run:

tightvncserver -nolisten tcp -localhost -geometry 1024x786 :1

Like I said, it worked great for me, but your mileage may vary.