So my steps followed are:
- Install Ubuntu Server 14.04.5 from a bootable pen drive
- Set my username to user with a password
- Enabled automatic updates
- Install OpenSSH server in the tasksel at the end
- Reboot
- Log or SSH into the system (latter from another system is preferred since you can copy and paste instructions from this web page)
- Install some packages:
- sudo apt install –no-install-recommends chromium-browser
- sudo apt install –no-install-recommends xorg openbox pulseaudio
- sudo usermod -a -G audio $USER
- Edit the kiosk.sh file:
- sudo nano /opt/kiosk.sh
- Enter the following lines:
#!/bin/bashxset -dpms
xset s off
openbox-session &
start-pulseaudio-x11while true; do
rm -rf ~/.{config,cache}/chromium/
chromium-browser –incognito –disable-background-mode –disable-sync –start-maximized –no-first-run ‘http://www.example.com
done - Ctrl-O to write the file then Ctrl-X to exit
- sudo chmod +x /opt/kiosk.sh to make the script executable
- Edit the kiosk.conf file:
- sudo nano /etc/init/kiosk.conf
- Enter the following lines:
start on (filesystem and stopped udevtrigger)
stop on runlevel [06]
console output
emits starting-x
respawn
exec sudo -u user startx /etc/X11/Xsession /opt/kiosk.sh -- -
Ctrl-O to write the file then Ctrl-X to exit
- sudo dpkg-reconfigure x11-common and select “Anybody” can start the X server
- try sudo start kiosk for testing and away it should go (or reboot)
- Change grub configuration to hide startup messages:
- sudo nano /etc/default/grub
- Find GRUB_CMDLINE_LINUX_DEFAULT and put quiet splash inside the quotes.
- Ctrl-O to write the file then Ctrl-X to quit
- Run the command sudo update-grub
- Reboot to test
I am still looking at whether to clone the disk to copy it to another computer. It looks complex to do this, because we really want to be copying a whole disk (two partitions) instead of just a partition at a time.
Chromium policies are also a possible scenario as referred to in the previous post.
There is some OpenBox stuff we want to change, particularly the number of virtual desktops offered and the right click menu that we don’t want. Only one virtual desktop and disable the popup etc.
To do this copy /etc/xdg/openbox/rc.xml to /home/user/.config/openbox and then use nano to edit the latter. Look for the <desktops> section to set the number of desktops to 0, look for <keybind>s that relate to switching desktops, and look for a <mousebind> for a right mouse click that relates to the root menu to get rid of the right click menu.