Skip to content

Instantly share code, notes, and snippets.

@Tech500
Last active November 14, 2025 09:48
Show Gist options
  • Select an option

  • Save Tech500/08d3c09b497fbb6ef0053b2e8fc99fc6 to your computer and use it in GitHub Desktop.

Select an option

Save Tech500/08d3c09b497fbb6ef0053b2e8fc99fc6 to your computer and use it in GitHub Desktop.
Raspberry Pi Kiosk Mode --ChatGPT

Here’s a clear, detailed, step-by-step explanation of Raspberry Pi Kiosk Mode — what it is, how it works, and how to set it up for different use cases (browser kiosk, local app kiosk, fullscreen dashboard, etc.). --ChatGPT


🖥️ What Is Raspberry Pi Kiosk Mode?

Kiosk Mode makes a Raspberry Pi boot straight into a single application (usually a full-screen web browser) with:

  • No desktop
  • No taskbar
  • No window controls
  • No mouse pointer (optional)
  • Locked-down user access

This is commonly used for:

  • Digital signage
  • Dashboard displays (Grafana, Home Assistant, OctoPrint, etc.)
  • Public terminals
  • Wall-mounted monitors
  • Touchscreen interfaces

🛠️ Kiosk Mode Approaches

There are three common ways to run kiosk mode:


1. Chromium Browser Kiosk (Most Common)

Boots directly into a full-screen webpage.

Install Chromium

sudo apt update
sudo apt install chromium-browser x11-xserver-utils unclutter

Create Autostart File

mkdir -p ~/.config/lxsession/LXDE-pi
nano ~/.config/lxsession/LXDE-pi/autostart

Add These Lines

@xset s off
@xset -dpms
@xset s noblank
@unclutter -idle 0.1 -root     # hides mouse cursor after 0.1s
@chromium-browser --noerrdialogs --disable-infobars --kiosk https://your-page-here.com

Replace URL with your dashboard or local HTML.

Reboot

sudo reboot

🧰 2. Systemd Kiosk Mode (No Desktop / Best for Stability)

This method avoids the entire LXDE desktop → faster, cleaner, more secure.

Install essentials:

sudo apt install xserver-xorg x11-xserver-utils xinit openbox chromium-browser

Create an Openbox autostart:

mkdir -p ~/.config/openbox
nano ~/.config/openbox/autostart

Add:

xset s off
xset -dpms
xset s noblank
chromium-browser --kiosk --noerrdialogs --disable-infobars http://your-url

Create a systemd service:

sudo nano /etc/systemd/system/kiosk.service

Paste:

[Unit]
Description=Kiosk Mode
After=network-online.target

[Service]
User=pi
Environment=XAUTHORITY=/home/pi/.Xauthority
Environment=DISPLAY=:0
ExecStart=/usr/bin/startx /usr/bin/openbox-session

[Install]
WantedBy=multi-user.target

Enable it:

sudo systemctl enable kiosk.service
sudo reboot

This boots directly into the kiosk—no desktop UI ever loads.


🟦 3. Kiosk Running a Local App

You can launch Python Tkinter, PyQt, SDL, Electron, or any compiled GUI app.

Example systemd service to launch a Python UI:

sudo nano /etc/systemd/system/myapp.service
[Unit]
After=graphical.target

[Service]
User=pi
Environment=DISPLAY=:0
ExecStart=/usr/bin/python3 /home/pi/myapp/main.py
Restart=always

[Install]
WantedBy=graphical.target

⚙️ Useful Optional Tweaks

■ Auto-restart Chromium if webpage crashes

--enable-features=UseOzonePlatform
--ozone-platform=wayland
--restore-last-session

■ Disable screensaver completely

sudo apt install xscreensaver
sudo systemctl disable xscreensaver

■ Rotate display for vertical kiosk screens

Edit:

sudo nano /boot/config.txt

Add:

display_lcd_rotate=1
# or
display_hdmi_rotate=1

Values: 0 = normal 1 = 90° 2 = 180° 3 = 270°


🧹 Auto-clean Chromium Cache (for public kiosks)

rm -rf ~/.config/chromium/Default/{Cache,Cookies}

🛡️ Lock Down the Kiosk (Optional Security)

Disable Ctrl+Alt+F1 console switch

sudo systemctl mask [email protected]

Disable right-click and keyboard shortcuts

Add Chromium flags:

--test-type
--disable-pinch
--overscroll-history-navigation=0
--disable-notifications

🧪 Troubleshooting

Problem Fix
Black screen after boot xset -dpms & remove screensaver
Chromium won’t start Check autostart path; usernames differ
Mouse cursor still showing Install & run unclutter
Webpage not loading Add After=network-online.target in systemd service
Kiosk doesn’t run on boot Make sure you enabled service: systemctl enable kiosk.service

🎯 Want Me to Create a Complete Kiosk Script?

If you'd like, I can give you a paste-and-run script that automatically:

  • Installs all packages
  • Creates autostart
  • Adds URL
  • Optimizes performance
  • Locks down system
  • Reboots into kiosk

Just tell me:

  • Browser kiosk or local app kiosk?
  • The URL or app path you want to run.

I can also tailor it for:

  • Pi 3 / 4 / 5
  • 7-inch touchscreen
  • Vertical monitor
  • Read-only SD card mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment