InstallX11VncOnLtspClients
This is the quick HowTo to get x11vnc running on thin clients so you can connect to them using a vncviewer or the thin client manager app. note that this doc doesnt take security into account, if you want a safe solution enable a password for x11vnc
Before installing in the ltsp environment, make sure that apt-get sources in ltsp are consistent with the base install:
sudo cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
Now, chroot into the ltsp client environment on the server.
sudo chroot /opt/ltsp/i386
Update the repositories that the ltsp environment uses for apt-get:
apt-get update
Install the x11vnc package (it's in the universe repository, possibly you must add it in /etc/apt/sources.list; in this case don't forget to apt-get update):
apt-get install x11vnc
Now edit the rc.local file to add x11vnc to the system startup (note: make sure this is all being done in the chroot environment and not the root of the server)
vi /etc/rc.local
You can use also nano for that, but first you have to install it on the chroot environment.
apt-get install nano
nano /etc/rc.local
Add the following line before the exit 0 statement in this file and save it:
x11vnc -display :6 -forever -loop -shared &
Now lets make sure rc.local gets actually executed:
cd /etc/rc2.d mv K99rc.local S99rc.local
Exit the chroot environment:
exit
Ubuntu/Edubuntu 7.10 and onwards - Make sure that the ltsp image gets updated:
sudo ltsp-update-image
If you are using an i386 image on an AMD64 build the command is:
sudo ltsp-update-image --arch i386
Reboot your thin clients and you should be able to connect to them via vnc now.
An alternative to editing rc.d is to run the following code snippet in the ltsp chroot to create an <code>/etc/init.d/x11vnc</code> init script:
# cat <<__END__ > /etc/init.d/x11vnc case "$1" in start) start-stop-daemon --start --oknodo \ --pidfile /var/run/x11vnc.pid --background \ --nicelevel 15 --make-pidfile --exec \ /usr/bin/x11vnc -- -display :6 -loop -passwdfile /etc/x11vncpassword -nossl ;; stop) start-stop-daemon --stop --oknodo --pidfile /var/run/x11vnc.pid ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 start|stop|restart" ;; esac __END__
Then make it executable and link it into <code>/etc/rc2.d</code>:
# chmod 755 /etc/init.d/x11vnc # cd /etc/rc2.d # ln -s ../init.d/x11vnc S99x11vnc
Finally, create the <code>/etc/x11vncpassword</code> file with the password you want to use to connect to your thin clients:
# echo "thepassword" > /etc/x11vncpassword
When you run <code>ltsp-update-image</code> outside the chroot you should have a working x11vnc setup WITHOUT hacking any core init scripts. This means that your changes won't be trodden on by future system upgrades.