mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-29 09:23:16 -06:00
Fix kiosk fullscreen: detect resolution at runtime, replace --start-fullscreen with --window-position/--window-size
This commit is contained in:
parent
852dccaec2
commit
f47b52f21e
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 \\
|
||||
|
|
|
|||
Loading…
Reference in a new issue