[systemd-devel] diverting HandlePowerKey

Lennart Poettering lennart at poettering.net
Thu Aug 16 07:34:59 PDT 2012


On Thu, 16.08.12 12:23, Robin Becker (robin at reportlab.com) wrote:

> Hi,
> 
> I liked the idea of systemd when I first saw it, but after doing a
> few conversions I have some small issues. I run arch linux with slim
> & openbox and that seems to be fully supported so far as I can tell.
> 
> However, on my netbooks I like to use the power button to launch
> oblogout which brings up a bunch of buttons that allow me to
> logout/suspend/restart/halt etc etc. I can of course continue to use
> acpid to handle the power button, but that seems opposed to the
> spirit of systemd.

I don't get this. This "oblogout" thing is a graphical tool you spawn
from the system level? Does that mean it runs privileged but accesses
your unprivileged X session? That sounds wrong...

If you have a graphical session then the graphical session should handle
the power/sleep key presses directly.

> Is there a way to divert HandlePowerKey to a script of my choosing?

No, there currently isn't. Eventually might add something that would
allow people to reconfigure what happens when people press the
power/sleep keys. But I am not sure we'll allow specification of
arbitrary scripts for that.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list