0

I have a server system with CentOS 7 here. It is running systemd but it is not starting per-user systemd:

➜  ~ systemctl --user
Failed to get D-Bus connection: No such file or directory

This prevents me from using user units for some daemons.

I have searched a bit and it appears that systemd --user can be started by pam_systemd. But that appears to start the systemd --user instance only upon logging in. Am I correct?

So, should I instead create a system unit which will start systemd --user for my specific user with User= setting? Or is there any other convenient way how to start systemd --user for some users?

1 Answer 1

1

You'd enable automatic starting of the user session using loginctl enable-linger yourusername. This enables you to do user daemons using user unit files.

I do this on servers, where I have a user with user unit files bringing up podman pods, i.e., networks, volumes and containers for some web application. It's pretty neat.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .