[systemd-devel] [RFC] Add some way to inhibit keys system-global
Lennart Poettering
lennart at poettering.net
Fri Apr 5 10:03:21 PDT 2013
On Mon, 01.04.13 23:00, Manuel Reimer (Manuel.Spam at nurfuerspam.de) wrote:
> Hello,
>
> I already mentioned this in my thread about "handle-power-key"
> inhibitors but maybe it's better to post this as new thread.
>
> It would simplify the installation of an alternative key handler, if
> there would be some way to tell systemd to completely ignore that
> key system wide.
>
> This could be an system-global way to inhibit specific keys (like
> the power key) or maybe even some special variable in the ".service"
> file that tells systemd to ignore the keys, listed there, as long as
> this service is running.
>
> Currently the only way, to use alternative system key handlers, is
> to manually edit logind.conf.
I have now changed systemd git to consider key inhibitors taken by
processes which are not part of a session (i.e. taken by system
services) to be "global", i.e to be effective on all VTs the same way,
ignoring any active/inactive logic.
http://cgit.freedesktop.org/systemd/systemd/commit/?id=2c4f86c1298f402220965682ab0e7729e150a562
This should allow your tool to run as system service (which it does
anyway, right? after all it's doing system-global stuff). You'd still
have to fight out key handling between your code and GNOME/KDE, but at
least logind will stay out of your way then.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list