This is my Gnome/Zentyal solution:
I needed to use Gnome, not XFCE, plus I wanted to be able to add Zentyal to existing servers so my setup is Zentyal on a clean Ubuntu Server 10.04 LTS x64 build (
>sudo apt-get install zentyal); with a minimal Gnome desktop (
>sudo aptitude install --no-install-recommends ubuntu-desktop); and the needed remaining packages (
>sudo apt-get install openssh-server vnc4server).
Then I configure vnc access for each user account that needs it. If you share an administrative account, you only have to do the following configuration once on that account.
Configuration: 1. Connect via ssh.
2. Secure your VNC session by running:
>vnc4passwd
3. Generate xstartup file (~/.vnc/xstartup) by running:
>vnc4server -geometry 1024x768 -depth 24
4. Open xstartup file for editing:
nano ~/.vnc/xstartup
5. Comment the line that reads
x-terminal-emulator -geometry 80×24+10+10....; and just below that add the folowing line:
gnome-session
The file ~/.vnc/xstartup should now look like this-ish when done:
#!/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" &
gnome-session
x-window-manager &
6. I like to reboot after this, but you can also just kill all open sessions, eg:
vnc4server -kill :0 & vnc4server -kill :1 & vnc4server -kill :2 & vnc4server -kill :3
Notes:- From the "outside", I tunnel vnc over ssh so I don't have to worry about firewall issues and vnc ports. This solution works with or without tunneling but obviously, tunneling over ssh is more secure.
- You need to launch a vnc4server session via ssh (>vnc4server) before you can connect using your vnc viewer. This is important. After your machine reboots, or if your sessions are ended/killed, you will not be able to connect via vnc until you (A) connect via ssh; and (B) start a vnc4server session (>vnc4server).
- I like this from a resource usage standpoint as there aren't unecessary sessions open, but I still have quick access to my headless server and its Gnome environment when/if needed (which is hardly ever given that I use a combination of Zentyal, Webmin, and ISPConfig3 to administer my services).
- I use Zentyal as a NAS, UTM, Infrastructure, VPN, LDAP server; ISPConfig to administer my web and database servers; and Webmin where Zentyal or ISPConfig are lacking.