[systemd-devel] diverting HandlePowerKey
Robin Becker
robin at reportlab.com
Thu Aug 16 04:23:05 PDT 2012
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.
Is there a way to divert HandlePowerKey to a script of my choosing? I could
imagine that an option starting with a / character could be used to distinguish
such a command from one of the standard logind.conf values, but that's obviously
not implemented. Even if it was does systemd allow me to configure oblogout
properly ie check for the conditions no-session, tty-session, any-session? Shell
scripts might be a bit slower at boot, but they allow for possibilities that
were not thought of at design time.
Of course I would also like to treat the lid switch in a different way to what
systemd proposes, surely it's obvious that some might like to hibernate or power
off rather than suspend if the lid is closed?
--
Robin Becker
More information about the systemd-devel
mailing list