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:
@@ -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
|
||||||
|
_backend_loop() {
|
||||||
|
while true; do
|
||||||
cd /home/jules/photobooth
|
cd /home/jules/photobooth
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
authbind --deep python -m backend.main &
|
authbind --deep python -m backend.main
|
||||||
|
echo "[kiosk] backend terminé, redémarrage dans 3s..."
|
||||||
sleep 3
|
sleep 3
|
||||||
|
done
|
||||||
|
}
|
||||||
|
_backend_loop &
|
||||||
|
|
||||||
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
|
# 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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user