Skip to content

Make systemd service user-specific instead of system-wide #5

@rGunti

Description

@rGunti

Related to the following comment on the YouTube video (I am not the author of the comment, but I share the same view and have some information about this)

@zvpunry1971
2 hours ago
5:45 Don't throw own service files to /lib/systemd/system/, there they belong to /etc/systemd/system/. But that is only for services that don't belong to some specific user. On a raspberry pi you have the default user that is automatically logged in. This user has its own systemd running, it is controlled with "systemctl --user ..." and has its service files in ~/.config/systemd/user/

That said, depending on your desktop environment (I assume raspberry pi defaults), there is another place to automatically start the script: ~/.config/autostart/ where you can put *.desktop files.

The .service file has to be located under ~/.config/systemd/user/ instead and systemctl commands have to be used with the --user flag, apart from that the handling should be the same.

Disclaimer: I pulled this information from my own project of running an Elgato Stream Deck on Linux Mint (Ubuntu-based), but afaik systemd should handle this the same way on Raspbian as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions