Files
Classroom_Desktop/scripts/classroom-admin-terminal
T
ekklesiaandClaude Opus 5 30a924d945 feat: the power button does nothing, and one chord opens a terminal
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]>
2026-09-10 15:17:55 -05:00

31 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
# The maintenance terminal, for the one person who is allowed one.
#
# Normal administration is over SSH. This exists for the case where
# somebody is standing at a classroom machine and SSH is not available,
# and it is reached only by a deliberately awkward chord that no teacher
# will find by accident.
#
# Why it is a wrapper rather than plain Konsole:
#
# the classroom's Kiosk policy sets shell_access=false, and Konsole
# honours it — measured: with the classroom configuration in its
# cascade it starts and prints "Program to run not set." rather than
# opening a shell. That restriction is worth keeping for everything
# else, so it is lifted for this one process by leaving the classroom's
# configuration directory out of its cascade. Nothing is patched and no
# binary is replaced; XDG_CONFIG_DIRS is the documented way to say
# which configuration an application sees.
#
# The terminal therefore looks like stock KDE rather than like the
# classroom, which is fair: it is not part of the classroom.
#
# This grants no privilege. The classroom user has no sudo rule, and
# anything that needs root still needs the administrator's own account
# and password. The Kiosk restriction was always a barrier in the
# interface, never a privilege boundary.
exec env XDG_CONFIG_DIRS=/etc/xdg konsole "$@"