[systemd-devel] Start a global service
Lennart Poettering
lennart at poettering.net
Wed Feb 15 17:21:59 UTC 2017
On Wed, 15.02.17 16:58, Damien Robert (damien.olivier.robert+gmane at gmail.com) wrote:
> 1) Feature request
>
> I would like a way [as root] to start a service on all active user sessions.
> Typically to start a user service that was installed globally.
>
> sudo systemctl --global start myservice.service
>
> will start myservice.service as a root user service, not on the other user
> sessions.
Sorry, but this is unlikely to be added. I understand that this would
be handy, but this is semantically very questionable, as this would be
transition from privileged code into unprivileged code, and that's
something we can't really have.
> 2) Feature request
>
> Something that could be usefull too is a special target (both for the user
> and system sessions) that is started automatically when there is ac loss,
> so that we run on battery, and conversely. We could even imagine systemd
> calling hooks like for systemd-sleep.
systemd is not really a battery manager, use services like upower for
that, which do provide similar hooks.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list