No desktop showing in Ubuntu 13.04 via VNC on a VPS [closed]

I have a VPS on which till now I've been using ubuntu 11.04 ... This OS is very outdated now, so I decided to give 13.04 a shot ...

So I've just installed Ubuntu 13.04 on my VPS ... After installation, I connected via putty as root, and ran the following commands exactly:

To update the repository:

apt-get update

To install the desktop version:

apt-get install ubuntu-desktop
apt-get install gnome-session-fallback

Setting up VNC server:

apt-get install tightvncserver
vncserver :1 -geometry 1280x960 -depth 16 -pixelformat rgb565
(then set the password when prompted)

Next I rebooted the VPS ..

After that, again via putty, I edited the xstartup file ...

vi ~/.vnc/xstartup

... and added this at the end ..

gnome-session &

... so that my xstartup file looks like this:

#!/bin/sh


xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
gnome-session &

Again I rebooted the VPS, initiated VNC server, and tried connecting via the VNC, and I get this:

enter image description here

I CAN create folders and stuff on the desktop, but there's not unity or gnome or anything like this ..

I then tried modifying my xstartup file to this (changed the last 2 lines):

#!/bin/sh


xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession --session=2d-gnome &

Again, I restarted, initiated VNC, and connected, and now I got this:

enter image description here

When I press Okay, it goes back to the state shown in the first screen ..

So how do I fix this .. ? How do I get a proper desktop ?? :(

I would prefer trying out Unity, but I can stick with GNOME as well if needed ..

For now, I just want to get to my desktop again .. :(


Solution 1:

or simple solution use xfce4 instead of gnome

# apt-get install gnome-core xfce4 firefox nano -y --force-yes

and use this xstartup file

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

xfce4 is way better and faster than gnome for vnc on ubuntu.

Solution 2:

This is what worked for me (For GNOME Fallback instead of Unity):

Update:

apt-get update
apt-get upgrade

Install Ubuntu Desktop & Gnome-fallback

apt-get install ubuntu-desktop
apt-get install gnome-session-fallback

Install and start GDM (I choose GDM instead of lightgdm when it gave me the choice)

apt-get install gdm

if you already installed GDM ,gnome before use

dpkg-reconfigure gdm

and choose GDM

service gdm start

Install TightVNCServer and set password

apt-get install tightvncserver
vncserver -geometry 1024x768 :1 //It will ask for a password
vncserver -kill :1

Edit ~/.vnc/xstartup (This is what worked for me):

nano ~/.vnc/xstartup

Paste this in:

#!/bin/sh

unset SESSION_MANAGER
/etc/X11/xinint/

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
#/etc/X11/Xsession

gnome-session --session=gnome-fallback &

Then start a new vnc connection:

vncserver -geometry 1024x768 :1

And login, you should see a screen with a menu bar at the top that looks a bit like this: http://i.imgur.com/xvsKOY3.png