I have an executable I'd like to run as a user and that user should be able to start and stop that service without sudo.
systemd --user always running for the user by running
loginctl enable-linger user
I've confirmed the
systemd --user instance is running as that user using
ps but when I try to run any
systemctl command as that user, I get the following error:
vagrant-ubuntu-vivid-64:~$ systemctl --user list-units Failed to get D-Bus connection: Connection refused
Based on my googling it sounds like I should have a
dbus-daemon instance running as that user but it is not. It should be noted I'm switching to the user with
su so it may not be counting as a "login".
I have two questions:
- Can my user instance of
systemdjust use the system instance of d-bus?
- Should Ubuntu somehow be starting a user instance of d-bus for me?