From a script that runs as root, I’d like to start a systemd user service.
I’ve tried the most obvious thing:
sudo -u $ user systemctl --user <etc>
but I get
Failed to connect to bus: No such file or directory – I assume this is referring to the dbus system bus.
Do I need to set
DBUS_SYSTEM_BUS_ADDRESS? How would I find out what to set it to?
Or is there a different way to interact with another user’s systemd?