-
Notifications
You must be signed in to change notification settings - Fork 0
Set up the exhibit
Every exhibit repo should have two scripts at its root: setup.sh (run once) and run.sh (launched on every boot).
- Copy kiosk-repo-generic-setup.sh into your repo as
setup.sh - Edit the
Name=line in the autostart block to match your exhibit - Write a
run.shthat launches your app (see examples below) - Make sure you have a
requirements.txtif your project uses Python (otherwise app might not run bc of missing dependencies).
The generic script (kiosk-repo-generic-setup.sh) does three things:
-
Creates a Python venv and installs
requirements.txtinto it - Makes
run.shexecutable -
Registers
run.shas an autostart app via a.desktopfile in~/.config/autostart/(this is the standard XDG autostart used by Mint's Cinnamon desktop)
Copy it into your repo and rename it to setup.sh. The only thing you should change is the Name= field in the autostart .desktop entry — set it to your exhibit's name so it's identifiable.
Note: This assumes Kiosk Base Setup was already run on the machine. That script installs Python, git, Chromium, etc.
This is where your exhibit actually launches. It gets called automatically on login. A few common patterns:
Use the venv's python and run the main file.
#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
"$SCRIPT_DIR/.venv/bin/python" "$SCRIPT_DIR/main.py"#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Start the server in the background
"$SCRIPT_DIR/.venv/bin/python" "$SCRIPT_DIR/app.py" &
# Wait for it to come up, then open Chromium in kiosk mode
sleep 3
# Detect which chromium binary is available
CHROMIUM_CMD=""
if command -v chromium-browser &>/dev/null; then
CHROMIUM_CMD="chromium-browser"
elif command -v chromium &>/dev/null; then
CHROMIUM_CMD="chromium"
else
echo "ERROR: Chromium not found!"
exit 1
fi
$CHROMIUM_CMD \
--kiosk \
--password-store=basic \
--no-sandbox \
--disable-pinch \
--disable-dev-shm-usage \
--disable-gpu-sandbox \
--disable-background-timer-throttling \
http://localhost:5000 &After cloning your repo on the kiosk machine:
cd <your-repo>
chmod +x setup.sh
./setup.sh
sudo rebootThe exhibit should launch automatically after reboot.
Kiosk Setup — Linux Mint
Kiosk Setup — Raspberry Pi
Development
Exhibits
Reference