# Starts the display at the table after every boot and again after a crash of display.py. # display.py itself starts pair_device.py again when that ends with an error. # Copy to /etc/systemd/system/, then: sudo systemctl enable --now packeroo-device [Unit] Description=packeroo table device Wants=network-online.target # After the display manager, not graphical.target: that target wants this unit, so ordering # after it would make a cycle that systemd breaks by dropping a job at boot. After=network-online.target display-manager.service [Service] User=pi WorkingDirectory=/home/pi/packeroo Environment=PACKEROO_BASE_URL=https://api.qm.packeroo.com/api/v1 Environment=PACKEROO_TOKEN_FILE=/home/pi/.config/packeroo/device-token Environment=DISPLAY=:0 ExecStart=/usr/bin/python3 /home/pi/packeroo/display.py Restart=always RestartSec=5 [Install] WantedBy=graphical.target