[systemd-devel] diverting HandlePowerKey

Mantas Mikulėnas grawity at gmail.com
Thu Aug 16 04:47:26 PDT 2012


On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker <robin at reportlab.com> wrote:
> 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.

acpid is still okay, I believe. Even though it comes with a single
shell script for all actions, it is not part of boot process, and it's
not a required part of acpid either – acpid actually has a built-in
filtering mechanism in /etc/acpi/events, and the shell script is just
default configuration.

However, running X11 programs from a daemon, regardless whether it it
is logind or acpid, is not recommended. Sure, it might be okay for a
single-user machine, but I have ended up with two, three X servers
fairly often even on my personal laptop.

It'd be a bit better if the button/lid events were handled by a
program running inside the Openbox session (the events can be read
from /run/acpid.socket).

-- 
Mantas Mikulėnas


More information about the systemd-devel mailing list