Here's how I would do it:
1. Tell GDM not to start when automatically when the machine starts:
2. Install Fluxbox and tightvncserverCode:$ sudo update-rc.d -f gdm remove
3. Create a VNC password for your accountCode:$ sudo apt-get install fluxbox tightvncserver
4. Create the file ~/.vnc/xstartup with the following config:Code:$ vncpasswd Using password file /home/<username>/.vnc/passwd Password: Verify: Would you like to enter a view-only password (y/n)? n
5. Make ~/.vnc/xstartup executable:Code:#!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & fluxbox &
6. Use /etc/rc.local to start the VNC session whenever the machine boots. You can specify the display to use, I usually use something unusual like 20. Mine looks like this:Code:$ chmod +x ~/.vnc/xstartup
7. Reboot. After the machine comes up, you should be able to access the VNC session with:Code:#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. su myusername -c "tightvncserver :20" exit 0
8. To make it all happen via SSH, install SSH:Code:$ vncviewer your.machine.ip:20
Then connect to the VNC session via an SSH tunnel like this:Code:$ sudo apt-get install ssh
That should prompt you for your SSH password, then show you your VNC session, then ask for your VNC password. Your SSH port (default is 22) is the only port that would need to be accessible in this scenario.Code:vncviewer machine.ip.address:20 -via machine.ip.address




Bookmarks