← Back to the notebook

KioskMode

KioskMode is what happens when a dashboard display needs to behave like equipment instead of a browser someone happens to leave open. A Pi, a monitor, Chromium, a login page, and a fullscreen button sound easy. Then the display negotiates 4K, the page logs out, the cursor shows up, the URL drifts, or the fullscreen button moves.

The useful parts are the small defensive choices. Force 1920x1080 so the display does not surprise the Pi. Use a persistent Chromium profile so credentials are not re-entered constantly. Detect the fullscreen button by SVG aria-label instead of hard-coded coordinates. Hide the cursor. Keep Chrome remote debugging open for diagnostics.

The monitor checks the live tab URL through Chrome DevTools instead of guessing based on time. If the URL is wrong, it tries gentle corrections first. After repeated failures it captures a screenshot and restarts the kiosk service. That is the right progression: observe, nudge, collect evidence, then restart.

The deployment story matters too. The installer creates the scripts, config, screenshots directory, systemd services, and remote management hooks. Updates can come through GitHub, with backup and rollback. The Pi should not require a person standing in front of it with a keyboard every time a script changes.

The constraint is secrets and remote access. Credentials live on the device, GitHub tokens are needed for private updates, and remote debugging has to be network-scoped carefully. A kiosk is simple only until it becomes a small unmanaged computer sitting in a plant.

Notes for next time: browser automation gets brittle when it assumes pixels. Use browser state when you can. Make recovery progressive. Take screenshots before destructive restarts. Treat every kiosk like a tiny production node that needs install, update, rollback, and status commands.

← Back to the notebook