Skip to content

Missing ~/.config/systemd/user/ on session start #9

Closed
@k-husmann

Description

@k-husmann

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions