I would like to experiment with systemd (systemctl --user) to start and stop a big application. The server where it will run is headless.
I have tried in a first terminal:
dbus-daemon --session --print-address 1
and in a second
DBUS_SESSION_BUS_ADDRESS="..." systemctl --user show-environment
This cause an error in the first terminal:
dbus-daemon[13421]: [session uid=1001 pid=13421] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
It seems I need the systemd(1) daemon and that it complains, but why ? How to satisfy him ? My target is RedHat, but I can reproduce the problem on ubuntu.
sudo -u
orsu
, then you'll have problems becauseloginctl
doesn't create a fresh environment for that user. This answer may help you: https://unix.stackexchange.com/a/615964/272848 – Stewart Oct 31 '22 at 13:45