- Icône discrète coin bas-gauche, visible seulement si photostation installée - Popup PIN (4 chiffres) avant lancement - Backend : /api/photostation/disponible + /api/photostation/lancer - kiosk-session.sh : Chromium attend le flag /tmp/photostation_running avant redémarrage - Script install-photostation.sh pour déploiement sur la Surface Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.4 KiB
Bash
48 lines
1.4 KiB
Bash
#!/bin/bash
|
|
xset s off
|
|
xset -dpms
|
|
xset s noblank
|
|
|
|
# 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 &
|
|
|
|
# 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
|
|
# Attend si la photostation est en cours d'exécution
|
|
while true; do
|
|
while [ -f /tmp/photostation_running ]; do sleep 1; done
|
|
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
|