Skip to main content

Kiosk Machine

This is a work in progress i.e. I am starting with a locked-down account and working towards a final kiosk deployment.

Two scripts will be created in the process and can be stored in /usr/local/bin.

I am trying to achieve this using PoPOS! with Firefox as the default browser, using duckduckgo as the start-up page and default search engine. The duckduckgo Firefox extension is also installed.

Create a script to run Firefox in full screen mode, opening duckduckgo's homepage in private mode.

I also set the Firefox settings so that no passwords are saved and everything is cleared on exit. 

#!/bin/bash
firefox -private-window  "https://www.duckduckgo.com" &
while ! xdotool search --onlyvisible --class "firefox"; do
    sleep 1
done
xdotool key F11 #xdotool needs to ne installed for this to work

To run the script at login, login as the default user, press Alt + F2 and run gnome-session-properties.
Click on “Add”, name browse to the script and save.

Have the laptop reboot every 10min

#!/bin/bash

# Wait for keyboard or mouse activity - I still need to try this
inotifywait -e modify /dev/input/event* & #install inotify-tools

# Idle time in milliseconds (10 minutes)
IDLE_TIME=$((10 * 60 * 1000))

while true; do
    idle=$(xprintidle)
    if [ "$idle" -ge "$IDLE_TIME" ]; then
        shutdown -r
    fi
    sleep 60
done

Also make this script to run at login using gnome-session-properties.

Both the above scripts need to be made executable.

chmod +x filename.sh

Using OverlayRoot  any changes will be lost when the system reboots.

sudo apt-get install overlayroot

then

sudo nano /etc/overlayroot.conf

and add

overlayroot="tmpfs"

Now reboot.

To disable overlayroot, comment out the above line

#overlayroot="tmpfs"

and then run

sudo update-initramfs -u

Now reboot