TightVNC Server

Installation

Install:

# apt-get install tightvncserver
# echo 'update-alternatives: using /usr/bin/tightvncserver to provide /usr/bin/vncserver (vncserver) in auto mode'
# echo 'update-alternatives: using /usr/bin/Xtightvnc to provide /usr/bin/Xvnc (Xvnc) in auto mode'
# echo 'update-alternatives: using /usr/bin/tightvncpasswd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode'

Configure: Modify file ~/.vnc/xstartup as follows and restart the vnc server

$ vim ~/.vnc/xstartup
#!/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

Test:

$ tightvncserver -kill :1
$ tightvncserver -geometry 1024x768

Add a script to /etc/init.d/:

#!/bin/bash

case "$1" in
start)
/usr/bin/tightvncserver -geometry 1024x768 :1
/usr/bin/tightvncserver -geometry 1600x900 :2
;;

stop)
/usr/bin/vncserver -kill :1
/usr/bin/vncserver -kill :2
;;

restart)
$0 stop
$0 start
;;

esac
exit 0

Start 2 VNC instances to have the best resolution available on different devices, e.g. iPad and Computer