Kiosk : boucle infinie backend + Chromium, plus d'écran login

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 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 21:40:23 +02:00
parent 6af9d7c073
commit ba2b119e1f

View File

@@ -3,11 +3,43 @@ xset s off
xset -dpms xset -dpms
xset s noblank xset s noblank
# Backend photobooth # Backend en boucle : redémarre automatiquement s'il plante
cd /home/jules/photobooth _backend_loop() {
source .venv/bin/activate while true; do
authbind --deep python -m backend.main & 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