Two layers for the button, because one is not enough: while a session is running PowerDevil holds logind's handle-power-key inhibitor and acts on the button itself, so a logind drop-in alone would be overruled. logind covers the machine before the session starts, after it ends, and if PowerDevil is not running. Verified: after the drop-in is installed and logind reloaded, it reports ignore for the power, suspend, hibernate and lid keys, and the running session was not disturbed by the reload. Holding the button still cuts the power. That is firmware, below any operating system, and it is deliberately left alone as the only recovery a person standing at a wedged machine has. The maintenance terminal is Meta+Ctrl+Alt+Shift+K, declared in the package rather than seeded into a teacher's configuration, where an update could not reach it. KGlobalAccel read it and registered the component; invoking it opened a working shell. It needed a wrapper. The classroom's Kiosk policy sets shell_access=false and Konsole honours it — measured: with the classroom configuration in its cascade Konsole starts and says "Program to run not set." The restriction is worth keeping everywhere else, so it is lifted for this one process by leaving the classroom's configuration directory out of its cascade. It grants no privilege: the classroom user has no sudo rule, and that restriction was always a barrier in the interface rather than a privilege boundary. Konsole's own entry is shadowed and hidden from /usr/local/share, so nothing is patched and Konsole's package stays maintainable. Nothing is pinned to the panel; a task button appears only while a terminal is open, and closing it returns the bar to three launchers. Co-Authored-By: Claude Opus 5 <[email protected]>
27 lines
812 B
Plaintext
27 lines
812 B
Plaintext
# The desktop half of "the power button does nothing".
|
|
#
|
|
# PowerDevil takes logind's handle-power-key inhibitor while a session is
|
|
# running, so the logind drop-in on its own would be overruled by
|
|
# whatever this says. 0 is no action.
|
|
#
|
|
# Immutable, so nothing in the session can put an action back.
|
|
#
|
|
# Every profile gets the same answer. A classroom machine has no battery,
|
|
# but a profile that exists and disagrees is worse than one that does not
|
|
# exist at all.
|
|
|
|
[AC][HandleButtonEvents][$i]
|
|
powerButtonAction=0
|
|
lidAction=0
|
|
triggerLidActionWhenExternalMonitorPresent=false
|
|
|
|
[Battery][HandleButtonEvents][$i]
|
|
powerButtonAction=0
|
|
lidAction=0
|
|
triggerLidActionWhenExternalMonitorPresent=false
|
|
|
|
[LowBattery][HandleButtonEvents][$i]
|
|
powerButtonAction=0
|
|
lidAction=0
|
|
triggerLidActionWhenExternalMonitorPresent=false
|