Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Other projects • A Chromium Kiosk for Wayland/labwc

$
0
0
My community is putting more and more stuff on-line, to the detriment of the computer-ignorant and computer-hostile (the community has more 90+ residents than 75-). Since the information portal is web-visible, it occurred to me that a kiosk pointed at the information portal might be useful for those residents.

Hardware: Raspberry Pi 4 B, 2G of RAM, 64G SD card
OS: bookworm; the initial Imager run happened about 1-Mar-2025

The 2G of RAM is about the minimum needed for Chromium to run; I tried the kiosk on a 512M RPI Zero, and the performance was dreadful, due entirely to swapping. The 64G SD card is way overkill; the running system at this writing requires less than 10G of disk space. Thus if cost is an issue, a 32G SD card would be plenty of space.

STRATEGY: Have Chromium and an idle-screen detector run from ~/.config/labwc/autostart. The autostart file references two scripts in ~. These scripts use information from https://www.scalzotto.nl/posts/raspberry-pi-kiosk/ and https://github.com/thagrol/Guides, modified by me to work with wayland/labwc.

AUTOSTART FILE:

Code:

 Help from boot.pdf at https://github.com/thagrol/Guides is gratefully acknowledged# Note that unclutter doesn't work under wayland/labwc, so we# can't turn off an idle mouse cursor (easily). Oh well.../home/kiosk/runSwayidle.sh &/home/kiosk/runKiosk.sh 
RUNSWAYIDLE.SH: blank the screen after 600 seconds of idle time

Code:

#!/bin/bash/usr/bin/env > /home/kiosk/swayidle.out/usr/bin/echo Starting screen blanking >> /home/kiosk/swayidle.out# Blank the display after timeout seconds/usr/bin/swayidle -w timeout 600 'wlopm --off \*' resume 'wlopm --on \*' >> /home/kiosk/swayidle.out 2>&1/usr/bin/echo Swayidle terminated >> /home/kiosk/swayidle.out
RUNKIOSK.SH: run Chromium

Code:

!/bin/bash# Copied from https://www.scalzotto.nl/posts/raspberry-pi-kiosk/# Edited by RW Shore/usr/bin/env > /home/kiosk/browser.out# Start Chromium./usr/bin/echo Checking for Chromium crash >> /home/kiosk/browser.out# Let Chromium think it always exited cleanly./usr/bin/sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' '/home/kiosk/.config/chromium/Default/Preferences'/usr/bin/sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' '/home/kiosk/.config/chromium/Default/Preferences'/usr/bin/echo Starting browser >> /home/kiosk/browser.out#   /usr/bin/chromium-browser --kiosk --noerrdialogs --disable-infobars --no-memcheck 'https://www.residentapps.com/home/residentapps/mobile/#/home' /usr/bin/chromium-browser --kiosk --noerrdialogs --disable-infobars --no-memcheck 'https://www.residentapps.com/home/residentapps/mobile/#/module/ourchannel' >> /home/kiosk/browser.out 2>&1/usr/bin/echo Browser terminated >> /home/kiosk/browser.out
I also have install instructions, but they're too long to post here.

Statistics: Posted by shorero — Sat Aug 09, 2025 5:16 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles