Hacker News new | past | comments | ask | show | jobs | submit login

This is why I have instated a policy of using systemd --user services whenever possible.

If you don't need elevated permissions this is ideal.

All you have to do is enable linger using loginctl if you want your service to auto start as the user on boot unattended.

Your user services live in ~/.config/systemd/user




I tried, but found it very confusing around the user session. Apparently an environment variable need to point to a started dbus. I can't get consistent results over local session vs ssh vs su vs sudo


What are you trying to do with dbus?


I used to do this but frankly it's easier to run a system-level unit as whatever user you want and keep all the files in /etc instead of scattered around /home.

The user-level units are most useful when running an actual multi-user system. If you trust your users to not abuse them, anyway.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: