Re: Power switch to actually turn off my computer

Florian Müllner <fmuellner <at>> writes:

On Thu, Apr 10, 2014 at 5:33 PM, Charles T. Smith
< <at>> wrote:
So, one responder supposed that gnome listens to the power switch, and
another responder supposed that logind listens to the power switch - but
that's only when someone is logged in.

Actually both are correct 


On systemd systems, logind handles the power key.

gnome-settings-daemon's media-keys plugin will request an inhibitor
for 'handle-power-key', which means that it asks logind to take over
the handling of the power key.

Ok, gnome-settings-daemon delegates to logind.
When?  Always or just when the console user logs on?

When handling the power key,
gnome-settings-daemon delegates back to logind, but requesting the
action configured by the button-power key in
org.gnome.settings-daemon.plugins.power instead of the one in

uh ... you mean that gnome-settings-daemon takes back control from logind
(i.e. logind delegates back to gnome-settings-daemon) when the user logs off?

So, during a user session, /etc/systemd/logind.conf configures power button
handling, but when nobody's logged in at the user console, it's a
Windows-Registry-like-thing, owned by a user-space app, that holds the
configuration of how the power button is to be handled?

Is there a special device for the power button and the window manager itself
opens that directly and, say, has an async-i/o signal handler registered for it?

Thank you for your perseverance.  I'm starting to catch on...

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]