You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like the ~/.config/systemd/user/ directory needs to exist prior session start, otherwise systemd behaves weird:
I logged in, created that directory and a unit file therein.
systemctl --user list-unit-files listed the newly created unit file just fine,
but systemctl --user start my... gave an error like that:
$> systemctl --user start mytestunit.service
Failed to start mytestunit.service: Unit mytestunit.service not found.`
It took me a while to debug that. In the end, I just run sudo reboot and from there on everything worked fine - just as explained in your repo. Also with newly created unit files. That's why I expect that this directory needs to exist prior user session start, otherwise the user units don't really work.
Btw. daemon-reload did not help.
Maybe you should mention this as a hint in your beautiful tutorial.
((NB: the reboot was easier than session restart, as I was connected to a raspberry via ssh, ssh relogin did not suffice - b/c that did not terminate the user session I suppose))
The text was updated successfully, but these errors were encountered:
I had the same problem, and I think running systemctl --user enable my_service weirdly solved it.
At this time I hadn't added the [Install] part so the enable command did not worked but after that the start worked 🤷🏻♂️
Seems like the
~/.config/systemd/user/
directory needs to exist prior session start, otherwise systemd behaves weird:systemctl --user list-unit-files
listed the newly created unit file just fine,systemctl --user start my...
gave an error like that:It took me a while to debug that. In the end, I just run
sudo reboot
and from there on everything worked fine - just as explained in your repo. Also with newly created unit files. That's why I expect that this directory needs to exist prior user session start, otherwise the user units don't really work.Btw. daemon-reload did not help.
Maybe you should mention this as a hint in your beautiful tutorial.
((NB: the reboot was easier than session restart, as I was connected to a raspberry via ssh, ssh relogin did not suffice - b/c that did not terminate the user session I suppose))
The text was updated successfully, but these errors were encountered: