Open rohanpm opened 8 years ago
Here is a sample:
[Unit]
Description=qingfanyi
[Install]
WantedBy=default.target
[Service]
Type=simple
ExecStart=/usr/bin/qfy
Restart=on-failure
Environment=DISPLAY=:0 XAUTHORITY=/var/run/lightdm/rmcgover/xauthority PYTHONUNBUFFERED=1
Problem: those X11 related Environment variables can't be hardcoded of course. AFAIK certain systemd versions have shipped with some configuration making this unnecessary. Need to investigate.
It could be useful to include a qfy.service in the package so that qfy can easily be enabled for the user session by: systemctl --user enable qfy
One reason that's nice is that qfy uses several processes and systemd would robustly contain them.