I'll address the basic how to securely VNC into an X server session and will skip the much larger questions.
When I want to run a remote desktop I:
a) use an ssh tunnel BASH script like this:
Code:
#!/bin/sh
ssh -l <userid> -p 22 -L 127.0.0.1:5910:127.0.0.1:5901 <serverip>
b) run a VNC server with a BASH script like this:
Code:
#!/bin/sh
vncserver :01 -rfbport 5901 -geometry 1280x1024 -nevershared -securitytypes=none -localhost -depth 16
sleep 10
xhost + $HOSTNAME
c) make sure my ~/.vnc/xstartup is executable and looks like this:
Code:
#!/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 &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#fvwm &
gnome-session &
d) if you run Ubuntu 11.04 and like Unity you won't be able to run it but you can run Unity 2D which is in the repo:
Code:
sudo aptitude install unity-2d
Note that Canonical is making noise like they will make Wayland the default graphics server in 11.10 and X I think rides on top of that if you want which would increase your RAM requirements.