I have a 6.06 server up and running at home and wanted to be able to administer it while at work and/or where ever. VNC works great for this locally, but doesn't run at startup on default. A few simple changes can fix that and make it easy to login remotely from anywhere. I can later explain how I setup my Linksys router (WRT54GL updated with DD-WRT firmware) connect up to no-ip.com for dynamic/static IP purposes (I have a standard home cable setup) and use SSH to putty and work on my server from anywhere (if anyone is interested)
This is not my original idea nor did I write any of this code. I compiled this from a number of sources and made it easy to understand (I hope).
How to: Resumable VNC sessions locally or via SSH.
1. Install x11vnc & xinetd package (if you have not already)
Code:
sudo apt-get install x11vnc xinetd
2. Set the VNC passwd
Code:
sudo x11vnc -storepasswd yourpasswordhere /etc/x11vnc.pass
3. Add x11vnc service to xinetd:
Code:
sudo gedit /etc/xinetd.d/x11vnc
Enter this into the new file:
Code:
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
disable = no
}
4. Configure GDM to run x11vnc when at loading time:
Code:
sudo gedit /etc/X11/gdm/Init/Default
and this line to the file:
Code:
/usr/bin/x11vnc -rfbauth /etc/x11vnc.pass -o /tmp/x11vnc.log -forever -bg -rfbport 5900
(you can change the port and other parameters)
5. If you restart your PC at this stage you’ll only be able to login, then the GDM will kill your session. To avoid this we must change another file:
Code:
sudo gedit /etc/X11/gdm/gdm.conf
now search for this line :
#KillInitClients=true
And change it to this:
KillInitClients=false
6. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)
Code:
sudo /etc/init.d/xinetd stop
sudo killall x11vnc
sudo /etc/init.d/xinetd start
7. Install OpenSSH-Server for remote connections...using putty or whatever...
Code:
sudo apt-get install openssh-server
Restart your box, you will have resumable VNC sessions available on startup available via a secure shell.
Download Putty at your remote location to login remotely.
Thanks.
Moon.
Bookmarks