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]>
35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
# The classroom's power button does nothing.
|
|
#
|
|
# A teacher reaching behind a television for a cable, a child leaning on
|
|
# the tower, a volunteer tidying the room: none of those should be able to
|
|
# take the computer down in the middle of a Sunday morning. Recovering a
|
|
# room that has been switched off needs somebody who knows where the
|
|
# button is, which is exactly the person who is not there.
|
|
#
|
|
# This is one of two layers, and both are needed. While a graphical
|
|
# session is running, PowerDevil takes logind's handle-power-key
|
|
# inhibitor and acts on the button itself, so logind alone would be
|
|
# ignored — see the classroom's powermanagementprofilesrc for the other
|
|
# half. This layer is what covers the machine before the session starts,
|
|
# after it ends, and if PowerDevil is not running at all.
|
|
#
|
|
# Holding the button for several seconds still cuts the power. That is
|
|
# the firmware doing it, below any operating system, and it is left alone
|
|
# on purpose: it is the only recovery a person standing at a wedged
|
|
# machine has.
|
|
|
|
[Login]
|
|
HandlePowerKey=ignore
|
|
HandlePowerKeyLongPress=ignore
|
|
HandleSuspendKey=ignore
|
|
HandleSuspendKeyLongPress=ignore
|
|
HandleHibernateKey=ignore
|
|
HandleHibernateKeyLongPress=ignore
|
|
HandleRebootKey=ignore
|
|
HandleRebootKeyLongPress=ignore
|
|
# Classroom machines are desktops, but a laptop pressed into service in a
|
|
# room should not sleep when its lid is closed either.
|
|
HandleLidSwitch=ignore
|
|
HandleLidSwitchExternalPower=ignore
|
|
HandleLidSwitchDocked=ignore
|