From db008abdfd5978c81cddfcaac13aff3bef257131 Mon Sep 17 00:00:00 2001 From: archipelago Date: Mon, 20 Jul 2026 16:57:46 -0400 Subject: [PATCH] fix(kiosk): force dark color-scheme so bundled AIUI renders its dark theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AIUI themes via @media (prefers-color-scheme) and falls back to its light variant (white panels) when the browser reports no preference — which the minimal kiosk X session does, so AIUI came up light instead of its designed dark. The main UI hardcodes dark and is unaffected. Push two independent dark signals on the kiosk Chromium: GTK_THEME=Adwaita:dark (version- independent, can never force light) and --blink-settings=preferredColorScheme=0 (0 = kDark in modern Chromium). Needs on-device kiosk verification. Co-Authored-By: Claude Fable 5 --- image-recipe/configs/archipelago-kiosk-launcher.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/image-recipe/configs/archipelago-kiosk-launcher.sh b/image-recipe/configs/archipelago-kiosk-launcher.sh index e39f502e..6cead151 100644 --- a/image-recipe/configs/archipelago-kiosk-launcher.sh +++ b/image-recipe/configs/archipelago-kiosk-launcher.sh @@ -116,8 +116,17 @@ while true; do # backend can't find PipeWire-Pulse's socket at /run/user//pulse/native, # falls back to raw ALSA "default", fails to connect, and produces no audio # at all with no visible error (--noerrdialogs suppresses it). - sudo -u archipelago env DISPLAY=:0 HOME=/home/archipelago XDG_RUNTIME_DIR=/run/user/$ARCHIPELAGO_UID chromium --kiosk \ + # Force a DARK color-scheme preference. The main UI hardcodes its dark + # theme, but the bundled AIUI app themes via `@media (prefers-color-scheme)` + # and defaults to its LIGHT variant (white panels) when the browser reports + # no preference — which a minimal kiosk X session does. Two independent dark + # signals so this survives a Chromium enum change: GTK_THEME is version- + # independent and can never force light (worst case: no effect), and the + # blink-settings flag (0 = kDark in modern Chromium) reinforces it. Neither + # can regress the always-dark main UI. + sudo -u archipelago env DISPLAY=:0 HOME=/home/archipelago GTK_THEME=Adwaita:dark XDG_RUNTIME_DIR=/run/user/$ARCHIPELAGO_UID chromium --kiosk \ --app=http://localhost/kiosk?safe_area_x=${KIOSK_SAFE_AREA_X_PX:-0}\&safe_area_y=${KIOSK_SAFE_AREA_Y_PX:-0} \ + --blink-settings=preferredColorScheme=0 \ --noerrdialogs \ --disable-infobars \ --disable-translate \