37 lines
1.0 KiB
Desktop File
37 lines
1.0 KiB
Desktop File
[Unit]
|
||
Description=Analyzer Kiosk (Raspberry Pi OS)
|
||
After=network-online.target
|
||
After=analyzer-web.service
|
||
Wants=analyzer-web.service
|
||
|
||
[Service]
|
||
# Run as root to ensure we can control the VT and X server.
|
||
User=root
|
||
Group=root
|
||
Environment=HOME=/root
|
||
WorkingDirectory=/home/analyzer/Phoenix
|
||
|
||
# Allocate a dedicated virtual terminal for the X server. Without this,
|
||
# xinit will fail when launched from an SSH session because it cannot
|
||
# open /dev/tty0. tty1 is reserved for this service.
|
||
TTYPath=/dev/tty1
|
||
TTYReset=yes
|
||
TTYVHangup=yes
|
||
TTYVTDisallocate=yes
|
||
StandardInput=tty
|
||
StandardOutput=tty
|
||
StandardError=tty
|
||
|
||
# Start a minimal X server and run our kiosk session script. The web UI
|
||
# is served by analyzer-web.service; this unit only brings up X,
|
||
# Chromium and Phoenix. The `vt1` argument ensures the X server uses the
|
||
# dedicated virtual terminal configured above.
|
||
ExecStart=/bin/bash /home/analyzer/Phoenix/kiosk-start.sh
|
||
|
||
# Automatically restart the kiosk if it crashes or exits.
|
||
Restart=always
|
||
RestartSec=2
|
||
|
||
[Install]
|
||
WantedBy=multi-user.target
|