[systemd-devel] logind's .PowerOff and .Reboot methods doesn't seem to respect inhibitors

Mantas Mikulėnas grawity at gmail.com
Wed Dec 9 12:23:35 PST 2015


On Wed, Dec 9, 2015 at 10:20 PM, Troels Mæhl Folke <
t.r.o.e.l.s.m.f at gmail.com> wrote:

> Hello,
>
> I've had problems getting systemd-logind to respect shutdown inhibitors
> when
> I ask it over DBus to power off or reboot.
>
> Here is what I've tried:
>
> In one gnome-terminal as non-root, I type:
>
> systemd-inhibit --what=shutdown --mode=block --who=unison unison-gtk2
>
> ...to set up the inhibitor.
> Then next, in another gnome-terminal - also as non-root - I type:
>
> busctl call org.freedesktop.login1 /org/freedesktop/login1 \
> org.freedesktop.login1.Manager PowerOff b true
>

AFAIK, inhibitors from the same user are ignored (which to be honest makes
them not very useful), and systemctl merely checks them manually.

(You might find gnome-session-inhibit useful; it tells GNOME itself to
avoid shutting down.)

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151209/3d3b203a/attachment.html>


More information about the systemd-devel mailing list