Setup raspi kiosk
nguyennamdsn | March 19, 2026, 3:44 p.m.
Setting up a Chromium kiosk on a Raspberry Pi | Luca Scalzotto
kiosk.sh
#!/usr/bin/env bash
# Disable xset blanking, let xscreensaver handle that.
xset s noblank
xset s off
# Start xscreensaver.
xscreensaver &
# Hide the mouse cursor.
unclutter -idle 1 -root &
# Let Chromium think it always exited cleanly.
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' '~/.config/chromium/Default/Preferences'
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' '~/.config/chromium/Default/Preferences'
# Start Chromium.
chromium --kiosk --noerrdialogs --disable-infobars 'https://translate.google.com/?sl=ja&tl=vi&op=translate' &
kiosk.timer
[Unit]
Description=Chạy Chromium 1 phút sau khi boot
[Timer]
OnBootSec=1min
Unit=kiosk_service.service
[Install]
WantedBy=timers.target
kiosk_service.service
[Unit]
Description=Chromium Kiosk Service
After=graphical.target
[Service]
User=pi
Group=pi
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/pi/.Xauthority
Type=simple
ExecStart=/usr/bin/chromium --kiosk --touch-events --noerrdialogs --disable-infobars --start-fullscreen https://www.youtube.com/watch?v=EB1LtIzPpt0
Restart=on-abort
[Install]
WantedBy=graphical.target
sudo systemctl enable kiosk.timer
----------- upgrade buster to bullseye
https://sgyzetrov.github.io/Raspbian_upgrade_from_buster_to_bullseye.html
----------- upgrade bullseye to bookworm
https://dev.blues.io/blog/easiest-upgrade-raspberry-pi-bullseye-bookworm/
----------- change boot image
sudo cp splash.png /usr/share/plymouth/themes/pix/splash.png
sudo plymouth-set-default-theme -R pix
--------------- hide all boot log
sudo nano /boot/config.txt
disable_splash=1
sudo nano /boot/cmdline.txt
- Replace
console=tty1toconsole=tty3to redirect boot messages to the third console. - Add
loglevel=3to disable non-critical kernel log messages. - Add
logo.nologoto the end of the line to remove the Raspberry PI logos from displaying