2

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?

1
  • I'm also seeing this issue... May 13, 2012 at 21:36

2 Answers 2

5

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.

1

My previous answer worked on the EC2 instance I was using, but when I tried it on another machine later, I had issues. (I'm still not sure what the difference was)

Anyway, I used the following instead. The different line is in .vnc/xstartup:

gnome-session --session=ubuntu-2d &

Instead of

gnome-session &

Here we go:

sudo apt-get install ubuntu-desktop tightvncserver

Edit ~/.vnc/xstartup to read:

#!/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 --session=ubuntu-2d&
        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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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