35 lines
918 B
Bash
35 lines
918 B
Bash
#!/bin/bash
|
|
# Installe PyQt6 WebEngine et configure le service kiosk Qt
|
|
set -e
|
|
|
|
echo "=== Installation PyQt6 WebEngine ==="
|
|
pip3 install PyQt6 PyQt6-WebEngine --break-system-packages
|
|
|
|
echo "=== Creation service systemd ==="
|
|
cat > /etc/systemd/system/photobooth-kiosk-qt.service << EOF
|
|
[Unit]
|
|
Description=Photobooth Kiosk Qt
|
|
After=graphical-session.target photobooth.service
|
|
Wants=photobooth.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=$(logname)
|
|
Environment=DISPLAY=:0
|
|
Environment=XAUTHORITY=/home/$(logname)/.Xauthority
|
|
ExecStart=/usr/bin/python3 /home/$(logname)/photobooth/scripts/kiosk-qt.py
|
|
Restart=always
|
|
RestartSec=3
|
|
|
|
[Install]
|
|
WantedBy=graphical-session.target
|
|
EOF
|
|
|
|
systemctl daemon-reload
|
|
systemctl enable photobooth-kiosk-qt
|
|
|
|
echo "=== Pour basculer sur le kiosk Qt ==="
|
|
echo " sudo systemctl stop photobooth-kiosk"
|
|
echo " sudo systemctl disable photobooth-kiosk"
|
|
echo " sudo systemctl start photobooth-kiosk-qt"
|