The scripts in this gist will start an Xvnc server with a basic window manager (IceWM). This is intended to use in a virtual machine, where we can need to start a browser to run a test suite.
All commands have to be run as root
apt-get install icewm vnc4server
wget -O /etc/init.d/xvnc https://raw.github.com/gist/3129293/5342e9e1705041939aa3e3e417de09c3d16131b1/xvnc.sh
wget -O /etc/init.d/icewm https://raw.github.com/gist/3129293/b6ab30fb47dfdd5d4eccd64c540f1424db13b8d7/icewm.sh
chmod +x /etc/init.d/xvnc /etc/init.d/icewm
update-rc.d xvnc defaults
update-rc.d icewm defaults
Then, in your user, type
echo 'export DISPLAY=:0' >> ~/.bashrc
Thanks for the comment!
It was working without the
export
. Maybe it will fail if it starts more processes behind the IceWM. I've added it to the gist. =)We are using Linux Containers for our development. These scripts are used to be able to run Selenium with Firefox.