From 396f214eaefac80ef53844bb0dad448b4d064b79 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath <2+defunkt@users.noreply.github.com> Date: Thu, 5 Feb 2026 09:33:55 -0800 Subject: [PATCH] more rpi fixes --- scripts/install.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 25208bf..75cd6b8 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -91,13 +91,28 @@ quiet sudo systemctl enable "$SERVICE_NAME" echo ">> Starting (or restarting) $SERVICE_NAME" quiet sudo systemctl restart "$SERVICE_NAME" -echo ">> Enabling kiosk mode (Wayfire)" -mkdir -p ~/.config -cat >> ~/.config/wayfire.ini <<'EOF' +echo ">> Enabling kiosk mode" +# labwc (older RPi OS / manual installs) +mkdir -p ~/.config/labwc +cat > ~/.config/labwc/autostart <<'EOF' +chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost +EOF +# Wayfire (RPi OS Bookworm default) +WAYFIRE_CONFIG="$HOME/.config/wayfire.ini" +if [ -f "$WAYFIRE_CONFIG" ]; then + # Remove existing chromium autostart if present + sed -i '/^chromium = /d' "$WAYFIRE_CONFIG" + # Add to existing [autostart] section or create it + if grep -q '^\[autostart\]' "$WAYFIRE_CONFIG"; then + sed -i '/^\[autostart\]/a chromium = chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost' "$WAYFIRE_CONFIG" + else + cat >> "$WAYFIRE_CONFIG" <<'EOF' [autostart] chromium = chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost EOF + fi +fi echo ">> Done! Rebooting in 5 seconds..." quiet systemctl status "$SERVICE_NAME" --no-pager -l || true