-1

There are many times when I'd like to have a certain daemons run when a user logs in and killed when a user logs out. I'd like these daemons to be restarted if the daemon exits unexpectedly and I'd like a handy way to view the daemon status and what not. I want the daemon process to be owned by the user.

Basically, I want systemd and systemctl, but for sessions and not for the system. Is there such a thing? I'd imagine this is already part of systemd, but I haven't found anything regarding it. Usually folks recommend adding services to ~/.profile, but this seems like a really poor init system.

  • Have you checked the documentation? There is a user mode which I believe is for just what you describe. – Wildcard Sep 21 at 16:23
6

Yes, systemd has a user service manager which takes care of user-scoped services. You can control it using the same systemctl commands you’d apply to system services, but with an extra --user option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.