0

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.

BOC
  • 221
  • How did that user log in? If you are experimenting with a mock (or system) user using sudo -u or su, then you'll have problems because loginctl 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
  • I have tested with ssh connection. On ubuntu, I have reproduced with a simple terminal on the desktop. – BOC Nov 03 '22 at 13:34

0 Answers0