I installed VNC4Server just like I outlined in a previous tutorial titled: How to install SSH and VCC Server for remote desktop access in Debian-7 Wheezy; however, presently, my server is an Ubuntu 12.04.5 LTS, Release: 12.04; codename: Precise.

After connecting to the server via my vnc-client, all I can see is an open ubuntu terminal and the desktop, without a menu and toolbar. Hours of trials and errors and googling led me to the solution below, which I copied as is, coz it was the only one that worked in my situation.

ubuntu-terminal

=============================

Backup the original ~/.vnc/xstartup:
cp ~/.vnc/xstartup ~/.vnc/xstartup.bak

Edit the xstartup file:
vi ~/.vnc/xstartup

Change the contents to:
#!/bin/sh
# VNC Server (Virtual-Mode) start-up script compatible with Ubuntu 12.04
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#
if [ -f /usr/bin/gnome-session ]; then
# Some gnome session types won't work with Xvnc, try to pick a sensible
# default.

for SESSION in "ubuntu-2d" "2d-gnome"; do
if [ -f /usr/share/gnome-session/sessions/$SESSION.session ]; then
DESKTOP_SESSION=$SESSION; export DESKTOP_SESSION
GDMSESSION=$SESSION; export GDMSESSION
STARTUP="/usr/bin/gnome-session --session=$SESSION"; export STARTUP
fi
done
fi

if [ -x /etc/X11/Xsession ]; then /etc/X11/Xsession
elif [ -x /etc/X11/xdm/Xsession ]; then /etc/X11/xdm/Xsession
elif [ -x /etc/X11/xinit/Xsession ]; then /etc/X11/xinit/Xsession
elif [ -x /etc/gdm/Xsession ]; then /etc/gdm/Xsession gnome-session
elif [ -x /etc/kde/kdm/Xsession ]; then /etc/kde/kdm/Xsession
elif [ -x /usr/dt/bin/Xsession ]; then
XSTATION=1 DTXSERVERLOCATION=local /usr/dt/bin/Xsession
elif [ -x /usr/dt/bin/dtsession ]; then /usr/dt/bin/dtsession
else
if which twm > /dev/null 2>&1; then
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm
else
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"
fi
fi
vncserver -kill $DISPLAY

=============================

code source: http://confoundedtech.blogspot.com.ng/2012/12/fix-tightvncserver-not-showing-unity.html

Add comment


Security code
Refresh