0

I want to run systemd copy for my user to orchestrate daemon workers.
I've enabled lingering for my user:

$ sudo loginctl enable-linger dmitry

After it I'm trying to run basic systemctl command and I run into this error:

$ systemctl --user show-environment
Failed to get environment: Process org.freedesktop.systemd1 exited with status 1

$ sudo systemctl --user show-environment
Failed to connect to bus: No such file or directory

How can I fix this problem?

Dmitry
  • 257
  • 1
    sudo systemctl --user? Also, did you restart after enabling linger? – muru Mar 15 '18 at 13:14
  • Failed to connect to bus: No such file or directory. No, I didn't restart. Can I do it without system restart? – Dmitry Mar 15 '18 at 13:51
  • 1
    Either you'll have to login as that user once or restart to have their session automatically started, AFAIK. – muru Mar 15 '18 at 13:54
  • New ssh sessions with this user couldn't help. And I don't want to restart the server: it's orchestrated by Ansible, and I can't restart in the middle of playbook. – Dmitry Mar 15 '18 at 14:19

0 Answers0