diff --git a/scripts/debian-13-setup.sh b/scripts/debian-13-setup.sh index 136f852..6532fc2 100755 --- a/scripts/debian-13-setup.sh +++ b/scripts/debian-13-setup.sh @@ -294,30 +294,40 @@ if echo "\$KIOSK_URL" | grep -q "localhost"; then done fi -exec ${CHROMIUM_BIN} \ - --kiosk \ - --noerrdialogs \ - --disable-infobars \ - --disable-session-crashed-bubble \ - --disable-features=TranslateUI \ - --disable-component-update \ - --check-for-update-interval=31536000 \ - --autoplay-policy=no-user-gesture-required \ - --no-first-run \ - --start-fullscreen \ - --disable-pinch \ - --overscroll-history-navigation=0 \ - --disable-translate \ - --disable-sync \ - --disable-background-networking \ - --disable-default-apps \ - --disable-extensions \ - --disable-hang-monitor \ - --disable-popup-blocking \ - --disable-prompt-on-repost \ - --metrics-recording-only \ - --safebrowsing-disable-auto-update \ - --ignore-certificate-errors \ +# Detect screen resolution so Chromium fills the display on minimal X11 (no WM) +SCREEN_RES=\$(xrandr 2>/dev/null | grep ' connected' | grep -oE '[0-9]+x[0-9]+' | head -1) +SCREEN_W=\${SCREEN_RES%%x*} +SCREEN_H=\${SCREEN_RES##*x} +if [ -z "\$SCREEN_W" ] || [ -z "\$SCREEN_H" ]; then + SCREEN_W=1920 + SCREEN_H=1080 +fi + +exec ${CHROMIUM_BIN} \\ + --kiosk \\ + --window-position=0,0 \\ + --window-size=\${SCREEN_W},\${SCREEN_H} \\ + --noerrdialogs \\ + --disable-infobars \\ + --disable-session-crashed-bubble \\ + --disable-features=TranslateUI \\ + --disable-component-update \\ + --check-for-update-interval=31536000 \\ + --autoplay-policy=no-user-gesture-required \\ + --no-first-run \\ + --disable-pinch \\ + --overscroll-history-navigation=0 \\ + --disable-translate \\ + --disable-sync \\ + --disable-background-networking \\ + --disable-default-apps \\ + --disable-extensions \\ + --disable-hang-monitor \\ + --disable-popup-blocking \\ + --disable-prompt-on-repost \\ + --metrics-recording-only \\ + --safebrowsing-disable-auto-update \\ + --ignore-certificate-errors \\ "\$KIOSK_URL" KIOSKEOF diff --git a/scripts/raspberry-pi-setup.sh b/scripts/raspberry-pi-setup.sh index 61a4a08..07fb234 100644 --- a/scripts/raspberry-pi-setup.sh +++ b/scripts/raspberry-pi-setup.sh @@ -288,8 +288,19 @@ if echo "\$KIOSK_URL" | grep -q "localhost"; then done fi +# Detect screen resolution so Chromium fills the display on minimal X11 (no WM) +SCREEN_RES=\$(xrandr 2>/dev/null | grep ' connected' | grep -oE '[0-9]+x[0-9]+' | head -1) +SCREEN_W=\${SCREEN_RES%%x*} +SCREEN_H=\${SCREEN_RES##*x} +if [ -z "\$SCREEN_W" ] || [ -z "\$SCREEN_H" ]; then + SCREEN_W=1920 + SCREEN_H=1080 +fi + exec ${CHROMIUM_BIN} \\ --kiosk \\ + --window-position=0,0 \\ + --window-size=\${SCREEN_W},\${SCREEN_H} \\ --noerrdialogs \\ --disable-infobars \\ --disable-session-crashed-bubble \\ @@ -298,7 +309,6 @@ exec ${CHROMIUM_BIN} \\ --check-for-update-interval=31536000 \\ --autoplay-policy=no-user-gesture-required \\ --no-first-run \\ - --start-fullscreen \\ --disable-pinch \\ --overscroll-history-navigation=0 \\ --disable-translate \\