Closed DavMon closed 6 years ago
Yes, there is. I'll add this to the new image, but the steps are:
Create a new service file in /lib/systemd/system/
:
sudo nano /lib/systemd/system/headunit.service
Paste the following into the file:
[Unit]
Description=Viktorgino's Headunit Desktop Service
After=multi-user.target
[Service]
Type=idle
User=pi
Group=pi
Environment="QT_QPA_PLATFORM=eglfs"
ExecStart=/opt/headunit-desktop/headunit-app
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
Modify the permissions on the new service file:
sudo chmod 644 /lib/systemd/system/headunit.service
Enable it with systemd:
sudo systemctl daemon-reload
sudo systemctl enable sample.service
And reboot:
sudo reboot 0
Thank you will do this
Is there any way to auto start this instead of having to always login and use QT_QPA_PLATFORM=eglfs /opt/headunit-desktop/headunit-app as I'd rather not have to carry a keyboard in my car