VNC for Ubuntu

root@dlp:~#

aptitude -y install vnc4server

root@dlp:~#

su – narwhal
# switch to a user who set VNC

narwhal@dlp:~$

# set VNC password

Password:

# any password you like to set

Verify:
narwhal@dlp:~$

vncserver :1
# start

xauth: file /home/narwhal/.Xauthority does not exist

New ‘dlp:1 (narwhal)’ desktop is dlp:1

Creating default startup script /home/narwhal/.vnc/xstartup
Starting applications specified in /home/narwhal/.vnc/xstartup
Log file is /home/narwhal/.vnc/dlp:1.log

narwhal@dlp:~$

vncserver -kill :1
# stop

Killing Xvnc4 process ID 10540
narwhal@dlp:~$

vi .vnc/xstartup
# add follows
exec gnome-session &
# start with diplay number ‘1’, screen resolution ‘800×600′, color depth ’24’

narwhal@dlp:~$

vncserver :1 -geometry 800×600 -depth 24

New ‘dlp:1 (narwhal)’ desktop is dlp:1

Starting applications specified in /home/narwhal/.vnc/xstartup
Log file is /home/narwhal/.vnc/dlp:1.log