[systemd-devel] Starting an unit in user mode for all users

Filipe Brandenburger filbranden at google.com
Tue Jun 26 22:20:00 UTC 2018


On Tue, Jun 26, 2018 at 3:10 PM Alberto Salvia Novella
<es20490446e at gmail.com> wrote:
> I'm writing a SystemD service for a daemon that it only works in user mode. Its name is Xiccd.
>
> The problem I’m having is that either I can enable the service as system wide, or per user. But I cannot enable it in user mode for all users, only user by user.
>
> I just liked the daemon to be started like XDG Autostart does, but with the extra capabilities of SystemD. The point is that I have found no way to do that, neither in the documentation online or by asking people.

That's what /etc/systemd/user is for.

If you create a service file and symlink it from
/etc/systemd/user/default.target.wants/, it should be started by each
user manager on startup.

See also:
https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Unit%20File%20Load%20Path

Cheers,
Filipe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4851 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180626/c5a0d732/attachment.bin>


More information about the systemd-devel mailing list