I'd like to start a python script that uses
pydbus to listen for incoming commands via D-Bus on boot, and it needs root permissions. It would be nice if it can be stopped and restarted via
systemctl, so I don't want to put it into
The script is based on this example.
I can run the script just fine in a terminal, both in an X11 session and in tty, and send commands to my dbus server. But when starting it via a systemd
.service file it complains about
gi.repository.GLib.Error: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0), because I have been using SessionBus. So I went to using SystemBus instead and now get permission errors:
Connection ":1.474" is not allowed to own the service which is probably associated with the conf in
So I looked at some other service to see how they work:
Is this all the stuff that I need to use? It's just so incredibly troublesome, and everything I try results in new errors.
Are there any good resources on how to do this?
How would one start the linked example above on boot using a systemd