From ba2b119e1f3b20401e9127e1de61a3adb0d32eba Mon Sep 17 00:00:00 2001 From: Jules Date: Wed, 3 Jun 2026 21:40:23 +0200 Subject: [PATCH] =?UTF-8?q?Kiosk=20:=20boucle=20infinie=20backend=20+=20Ch?= =?UTF-8?q?romium,=20plus=20d'=C3=A9cran=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Si Chromium ou le backend plantent, ils redémarrent automatiquement. La session LightDM ne se termine jamais → plus d'écran de login intempestif. Co-Authored-By: Claude Sonnet 4.6 --- scripts/kiosk-session.sh | 44 ++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/scripts/kiosk-session.sh b/scripts/kiosk-session.sh index caf5bb8..3de7372 100644 --- a/scripts/kiosk-session.sh +++ b/scripts/kiosk-session.sh @@ -3,11 +3,43 @@ xset s off xset -dpms xset s noblank -# Backend photobooth -cd /home/jules/photobooth -source .venv/bin/activate -authbind --deep python -m backend.main & +# Backend en boucle : redémarre automatiquement s'il plante +_backend_loop() { + while true; do + cd /home/jules/photobooth + source .venv/bin/activate + authbind --deep python -m backend.main + echo "[kiosk] backend terminé, redémarrage dans 3s..." + sleep 3 + done +} +_backend_loop & -sleep 3 +# Attendre que le backend soit prêt +for i in $(seq 1 15); do + curl -sf http://localhost/ > /dev/null 2>&1 && break + sleep 1 +done -exec chromium --kiosk --noerrdialogs --disable-infobars --disable-translate --disable-features=TranslateUI,Translate,LockProfileCookieDatabase --disable-session-crashed-bubble --disable-component-update --check-for-update-interval=31536000 --autoplay-policy=no-user-gesture-required --start-fullscreen --incognito --touch-events=enabled --enable-touch-drag-drop --force-device-scale-factor=3 --password-store=basic http://localhost +# Chromium en boucle : redémarre automatiquement s'il plante ou se ferme +while true; do + chromium \ + --kiosk \ + --noerrdialogs \ + --disable-infobars \ + --disable-translate \ + --disable-features=TranslateUI,Translate,LockProfileCookieDatabase \ + --disable-session-crashed-bubble \ + --disable-component-update \ + --check-for-update-interval=31536000 \ + --autoplay-policy=no-user-gesture-required \ + --start-fullscreen \ + --incognito \ + --touch-events=enabled \ + --enable-touch-drag-drop \ + --force-device-scale-factor=3 \ + --password-store=basic \ + http://localhost + echo "[kiosk] Chromium terminé, redémarrage dans 2s..." + sleep 2 +done