This is a rewrite of the VNC section in the Release Notes. Please don't get the idea that I know what I'm doing. The following has been minimally tested. Maybe we can dress this up a a bit and put it in the howto section.
___ VNC over SSH ___
# (Optional) Add authorization key:
ssh-add /path-to-key/id_rsa
# Start remote vnc server over ssh:
# If user is logged in on the remote host:
ssh -t -L 5900:localhost:5900 user@remote-host 'x11vnc -localhost -display :0'
# (Optional, wheezy) - add "-ncache 10" to the x11vnc command in the above lines.
# This may make the display smoother.
'x11vnc -ncache 10 -localhost -display :0'
# If user is not logged in on remote host, something like the following.
# Get the auth file from 'ps ax | grep auth'
ssh -t -L 5900:localhost:5900 root@remote-host 'x11vnc -auth /var/run/lightdm/root/:0 -localhost -display :0'
# Or use the vncserv script below. It will find the auth file and use it.
ssh -t -L 5900:localhost:5900 root@remote-host '/usr/local/bin/vncserv'
# In another terminal, connect to the remote desktop:
vncviewer localhost:0
# or maybe:
vncviewer -encodings "copyrect tight hextile" localhost:0
This script goes in /usr/local/bin.
--- CUT ---
#!/usr/bin/env bash
# vncserv
# gdm3 in squeeze
#authfile=$(ps ax |grep auth | awk '/gdm3/ { print $13 }')
# lightdm in wheezy
authfile=$(ps ax |grep auth | awk '/lightdm/ { print $8 }')
x11vnc -ncache 10 -auth $authfile -localhost -display :0
--- CUT ---
___ YET ANOTHER WAY TO DO VNC ___
(This way does not use ssh.)
On the server:
Main menu --> Internet --> X11VNC Server
Click OK (or change the port if you want)
Another window comes up, check the box next to "Accept Connections"
Optionally, you can create a password.
Click Apply or OK
On the client, issue the command:
vncviewer
A small window comes up; enter the name or IP number of the remote server.
OK
=================================