feat: give every room the broker, one scale, and its own panel back
Little Waders took the Plasma build and reported what a container cannot. A disc player on a machine with no optical drive, a clock nobody at the back of the room could read, a browser at half the size of the panel around it, and Parent Call with no broker to call. The broker is the same for every classroom, so it is a default now and not something to fill in room by room. classroom-migrate brings an existing room to the same place without touching its name, its username or its password, and Parent Call distinguishes a broker it cannot reach from one that was never set up: those send somebody to look at completely different things. The disc player's detection was right and ran too late — alongside the session rather than before it, and the panel is built from the layout the moment a session starts. It runs before the display manager now, and again from udev when a drive is plugged in. UI_SCALE had a ceiling of 1.5, which cannot express a 4K television; a clock pinned at 15 points, which is the same size at every scale; and a browser that was never told the number at all. All three are fixed and the room doubles together at 200%. This also brings 0.1.47's work into the repository, where it had only ever existed in a build directory under /tmp: the hidden display dialog, its authenticated writer, the polkit action, and the church's own wallpaper. One piece of it is deliberately left out. The custom volume display needed a shell package of our own, and with one selected plasmashell builds no panel at all — measured twice, with that build's own files, on a classroom that deletes its panel configuration at every login by design. The lab connected to the real church broker the moment the package defaulted to it. Nothing was left behind, which was checked, but the guard that should have stopped it had never worked: it used iptables, which the lab image does not have, and probed with /dev/tcp under dash, where that always fails. Both reported success. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
926668dc9b
commit
34fd02e08f
@@ -133,6 +133,36 @@ if [[ -f "$CONFIG_HOME/powermanagementprofilesrc" ]]; then
|
||||
say "cleared the user's power settings; the package supplies them"
|
||||
fi
|
||||
|
||||
# THE DISC PLAYER, AND WHETHER THIS MACHINE HAS ONE.
|
||||
#
|
||||
# The panel about to be built comes from the packaged layout, and the one
|
||||
# line in it that depends on hardware is written by
|
||||
# ekklesia-classroom-layout.service before the display manager starts.
|
||||
# This cannot write /usr and does not try. It checks, because a room
|
||||
# showing a disc player it has no drive for is a teacher clicking a button
|
||||
# that can only disappoint, and the journal should say so at the moment
|
||||
# the panel is built rather than after somebody notices.
|
||||
LAYOUT=/usr/share/plasma/look-and-feel/org.ekklesia.classroom.desktop/contents/layouts/org.kde.plasma.desktop-layout.js
|
||||
|
||||
if [[ -r "$LAYOUT" ]]; then
|
||||
if compgen -G "/dev/sr[0-9]*" >/dev/null; then
|
||||
drive=yes
|
||||
else
|
||||
drive=no
|
||||
fi
|
||||
|
||||
if grep -q '^\s*/\* CLASSROOM-DVD-LAUNCHER \*/' "$LAYOUT"; then
|
||||
offered=yes
|
||||
else
|
||||
offered=no
|
||||
fi
|
||||
|
||||
if [[ "$drive" != "$offered" ]]; then
|
||||
say "WARNING: this machine has drive=$drive but the layout offers"
|
||||
say " the disc player=$offered — run classroom-desktop-layout"
|
||||
fi
|
||||
fi
|
||||
|
||||
CONFIG="$CONFIG_HOME/plasma-org.kde.plasma.desktop-appletsrc"
|
||||
|
||||
if [[ -e "$CONFIG" ]]; then
|
||||
@@ -142,6 +172,28 @@ else
|
||||
say "no panel configuration to clear"
|
||||
fi
|
||||
|
||||
# A shell package the classroom used to select.
|
||||
#
|
||||
# One build chose a shell package of its own so that it could replace the
|
||||
# volume display. With one selected, plasmashell builds no panel at all —
|
||||
# and this script deletes the panel at every login, so the room came up
|
||||
# with an empty screen. The package no longer ships it; this removes the
|
||||
# choice from a profile that was written while it did.
|
||||
if [[ -f "$CONFIG_HOME/plasmashellrc" ]] \
|
||||
&& grep -q "^ShellPackage=" "$CONFIG_HOME/plasmashellrc" 2>/dev/null; then
|
||||
sed -i "/^ShellPackage=/d" "$CONFIG_HOME/plasmashellrc"
|
||||
say "removed a shell package choice that leaves the room with no panel"
|
||||
fi
|
||||
|
||||
# The display, like the panel, comes from the package rather than from
|
||||
# whatever the room last negotiated. KWin remembers a resolution and a
|
||||
# scale per output in this file, and a television that once came up in the
|
||||
# wrong mode keeps it for good — the scale service applies UI_SCALE again
|
||||
# a moment after this, so there is nothing here to preserve. Seen in the
|
||||
# lab: an output that had been through two scale changes stayed at a
|
||||
# resolution nothing on the machine had asked for.
|
||||
rm -f "$CONFIG_HOME/kwinoutputconfig.json" 2>/dev/null || true
|
||||
|
||||
# The icon cache remembers a name it once failed to find, which outlives
|
||||
# the package that later supplies it.
|
||||
rm -f "$CACHE_HOME/icon-cache.kcache" 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user