Skip to content

Set up the exhibit

Shumzi edited this page Mar 10, 2026 · 2 revisions

Every exhibit repo should have two scripts at its root: setup.sh (run once) and run.sh (launched on every boot).

TL;DR

  1. Copy kiosk-repo-generic-setup.sh into your repo as setup.sh
  2. Edit the Name= line in the autostart block to match your exhibit
  3. Write a run.sh that launches your app (see examples below)
  4. Make sure you have a requirements.txt if your project uses Python (otherwise app might not run bc of missing dependencies).

setup.sh

The generic script (kiosk-repo-generic-setup.sh) does three things:

  1. Creates a Python venv and installs requirements.txt into it
  2. Makes run.sh executable
  3. Registers run.sh as an autostart app via a .desktop file 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.

run.sh

This is where your exhibit actually launches. It gets called automatically on login. A few common patterns:

Python app (e.g. Pygame, Tkinter)

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"

Flask/web app in Chromium kiosk

#!/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 &

Putting it together

After cloning your repo on the kiosk machine:

cd <your-repo>
chmod +x setup.sh
./setup.sh
sudo reboot

The exhibit should launch automatically after reboot.

Clone this wiki locally