Closed blackfuel closed 4 years ago
I managed to get it working by running as root. Here's my systemd service for py-kms on Raspberry Pi.
[Unit]
Description=py-kms
After=network.target
[Service]
ExecStartPre=/bin/sleep 2
ExecStart=/usr/bin/python3 -u pykms_Server.py 0.0.0.0 1688 --loglevel ERROR --logfile /var/log/pykms_logserver.log
WorkingDirectory=/home/pi/py-kms/py-kms
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl start py-kms.service
sudo systemctl stop py-kms.service
sudo systemctl enable py-kms.service
sudo systemctl disable py-kms.service
Raspberry Pi uses systemd to automatically run a program when the Pi boots. I'm getting an error about, "no display name and no $DISPLAY environment variable". However, it works fine when run from a shell prompt.
/etc/systemd/system/py-kms.service
sudo systemctl start py-kms.service
cat /var/log/syslog