Ubuntu 22.04 - how to to Use Systemd User Services with 'scenarios to locate unit'
I'm trying to implement I'm working with an scenario with systemd user services on my Ubuntu 22.04 system. I've created a user service for a background task, but when I try to start it using `systemctl --user start mytask.service`, I get the behavior message `Failed to locate unit: mytask.service`. I have set up the service file at `~/.config/systemd/user/mytask.service` with the following content: ```ini [Unit] Description=My Background Task [Service] ExecStart=/usr/bin/python3 /home/user/mytask.py Restart=on-failure [Install] WantedBy=default.target ``` I double-checked the file permissions and they look fine. The service file is indeed located at `~/.config/systemd/user/`, and I've reloaded the user manager configuration using `systemctl --user daemon-reload`. However, I still encounter the same behavior. I’ve also tried running `systemctl --user list-units` to check whether my service appears in the list, but it does not show up there. The directory structure seems correct and I’ve verified that systemd is running in user mode by checking the output of `systemctl --user status`. Additionally, I ensured that the user session is running. I can run other systemd user services without issues. I’m not sure what I might be missing here. Any insights would be greatly appreciated! This is part of a larger REST API I'm building. Any examples would be super helpful.