build: make the classroom desktop something a .deb installs

Building the package found two things reading the tree did not.

dpkg refused it outright: plasma-workspace already owns
/etc/xdg/plasmanotifyrc and friends, and two packages cannot own one
path. The room's settings move to a directory of their own with
/etc/environment.d putting it in front of /etc/xdg, which is KConfig's
own cascade rather than a file fight.

The postinst then failed on a chmod for a command that no longer
exists. It now walks what the package installed instead of naming
files, removes the login shell that used to start sway on tty1, and
enables SDDM and the audio service.

Verified by installing the built package on a fresh machine and
starting the session from it: restrictions in force, palette applied,
audio service enabled and running, panel supervision unconditional.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-10 09:06:53 -05:00
co-authored by Claude Opus 5
parent 4c3f19d599
commit f7d5aecd6c
7 changed files with 66 additions and 31 deletions
+12 -7
View File
@@ -9,13 +9,18 @@ set -euo pipefail
SRC="${1:-/srv/classroom}"
install -Dm644 "$SRC/config/plasma/xdg/kdeglobals" /etc/xdg/kdeglobals
install -Dm644 "$SRC/config/plasma/xdg/kwinrc" /etc/xdg/kwinrc
install -Dm644 "$SRC/config/plasma/xdg/kwinrulesrc" /etc/xdg/kwinrulesrc
install -Dm644 "$SRC/config/plasma/xdg/kscreenlockerrc" /etc/xdg/kscreenlockerrc
install -Dm644 "$SRC/config/plasma/xdg/ksmserverrc" /etc/xdg/ksmserverrc
install -Dm644 "$SRC/config/plasma/xdg/krunnerrc" /etc/xdg/krunnerrc
install -Dm644 "$SRC/config/plasma/xdg/plasmanotifyrc" /etc/xdg/plasmanotifyrc
# A directory of the classroom's own, ahead of /etc/xdg in
# XDG_CONFIG_DIRS. plasma-workspace owns files by these names in /etc/xdg
# and two packages cannot own one path.
for setting in kdeglobals kwinrc kwinrulesrc kscreenlockerrc ksmserverrc \
krunnerrc plasmanotifyrc; do
install -Dm644 "$SRC/config/plasma/xdg/$setting" \
"/etc/ekklesia-classroom/xdg/$setting"
rm -f "/etc/xdg/$setting.ekklesia-old"
done
install -Dm644 "$SRC/config/environment/90-ekklesia-classroom.conf" \
/etc/environment.d/90-ekklesia-classroom.conf
install -Dm644 "$SRC/config/plasma/colors/EkklesiaDark.colors" \
/usr/share/color-schemes/EkklesiaDark.colors
+1
View File
@@ -103,6 +103,7 @@ plasma-up)
-e WAYLAND_DISPLAY="$OUTER" -e XDG_SESSION_TYPE=wayland \
-e XDG_CURRENT_DESKTOP=KDE -e LIBGL_ALWAYS_SOFTWARE=1 \
-e QT_LOGGING_RULES="kwin_scripting.debug=true" \
-e XDG_CONFIG_DIRS=/etc/ekklesia-classroom/xdg:/etc/xdg \
-d "$NAME" sh -c 'exec startplasma-wayland > /tmp/plasma.log 2>&1'
for _ in $(seq 1 60); do
docker exec "$NAME" pgrep -x plasmashell >/dev/null 2>&1 && break