dune-weaver-touch.service 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. [Unit]
  2. Description=Dune Weaver Touch Interface
  3. After=multi-user.target
  4. After=network-online.target
  5. After=systemd-user-sessions.service
  6. Wants=network-online.target
  7. [Service]
  8. Type=simple
  9. User=pi
  10. Group=pi
  11. WorkingDirectory=/home/pi/dune-weaver-touch
  12. # TTY allocation for proper console/GPU access
  13. TTYPath=/dev/tty1
  14. StandardInput=tty
  15. StandardOutput=journal
  16. StandardError=journal
  17. # EGLFS platform - direct framebuffer, no X11/Wayland needed
  18. Environment=QT_QPA_PLATFORM=eglfs
  19. Environment=QT_QPA_EGLFS_WIDTH=800
  20. Environment=QT_QPA_EGLFS_HEIGHT=480
  21. Environment=QT_QPA_EGLFS_INTEGRATION=eglfs_kms
  22. Environment=QT_IM_MODULE=qtvirtualkeyboard
  23. # DRM/GPU access
  24. Environment=XDG_RUNTIME_DIR=/run/user/1000
  25. # Kiosk mode flag
  26. Environment=KIOSK_MODE=1
  27. # Wait for backend to be available before starting
  28. ExecStartPre=/bin/bash -c 'until curl -s http://localhost:8080/serial_status > /dev/null 2>&1; do sleep 2; done'
  29. ExecStart=/home/pi/dune-weaver-touch/venv/bin/python /home/pi/dune-weaver-touch/main.py
  30. # Restart policy
  31. Restart=always
  32. RestartSec=10
  33. StartLimitInterval=200
  34. StartLimitBurst=5
  35. [Install]
  36. WantedBy=multi-user.target