41 lines
888 B
Desktop File
41 lines
888 B
Desktop File
[Unit]
|
|
Description=Raspberry Pi Video Player with IR Remote Control
|
|
Documentation=https://github.com/your-repo/ulivision-tv
|
|
After=network.target sound.target graphical-session.target
|
|
Wants=graphical-session.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=pi
|
|
Group=pi
|
|
WorkingDirectory=/home/pi/ulivision-tv
|
|
ExecStart=/usr/bin/python3 /home/pi/ulivision-tv/video_player.py
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
Restart=always
|
|
RestartSec=10
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=video-player
|
|
|
|
# Environment variables
|
|
Environment=DISPLAY=:0
|
|
Environment=XAUTHORITY=/home/pi/.Xauthority
|
|
Environment=PYTHONPATH=/home/pi/ulivision-tv
|
|
Environment=HOME=/home/pi
|
|
|
|
# Security settings
|
|
NoNewPrivileges=false
|
|
PrivateTmp=false
|
|
ProtectSystem=false
|
|
ProtectHome=false
|
|
|
|
# Resource limits
|
|
LimitNOFILE=65536
|
|
MemoryMax=512M
|
|
|
|
# GPIO access
|
|
SupplementaryGroups=gpio
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|