Hi, What is the recommended way to set up Systemd user services with Debian?
With previous Debian releases I've been running services like tomcat from regular user accounts by creating wrapper scripts that controls the PATH and environment variables, and start those scripts with @reboot from the user's crontab. While this works ok, I find that the scripts are hard to maintan and does not meet all requirements of service managment. It would be nice to migrate away from my fragile scripts to something that's dedicated to controlling services, like Systemd units. AFAIU, to make this happen, I need to have a user Systemd instance started on boot. How do I set up my Debian server to automatically start a user instance for a regular user on boot to control the user's service units? Is there a recommended way to do it? BTW, if I just try to start systemd from the console, it fails: $ systemd --user Trying to run as user instance, but $XDG_RUNTIME_DIR is not set. Clearly that is not the way to do it. Any advice? -- Fredrik Jonson