Monday, September 13, 2010

Remote Ubuntu Desktop Solution

I want to see the full Ubuntu/Gnome desktop from my laptop over VNC using my 24inch monitor.

1. Installed vnc4server using Synaptic Package Manager.

2. Run these commands, first time it will ask for password and setup ~/.vnc
%vncserver -geometry 1920x1200 :1
%vncserver -kill :1

3. edit ~/.vnc/xstartup to the following

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -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 &
gnome-session &

4. There is still some problem getting Gnome to start with this configuration. This solution worked form me : http://www.linuxquestions.org/questions/linux-newbie-8/vnc-connection-not-working-708806/

%unset DBUS_SESSION_BUS_ADDRESS
%vncserver -geometry 1920:1200 :1

5. Connect to machine using RealVNC view from windows laptop.

The display quality could be better. Also I still need to figure out how to make this secure.