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
+21 -23
View File
@@ -8,30 +8,21 @@ if ! id classroom >/dev/null 2>&1; then
classroom
fi
cat > /home/classroom/.bash_profile <<'PROFILE'
if [ -z "$WAYLAND_DISPLAY" ] && [ "${XDG_VTNR:-}" = "1" ]; then
exec sway -c /etc/ekklesia-classroom/sway/config
fi
PROFILE
# The session is started by SDDM now. An upgrade from a sway-era room has
# to remove the login shell that used to start it, or the machine has two
# things trying to own tty1.
rm -f /home/classroom/.bash_profile
rm -f /etc/systemd/system/[email protected]/autologin.conf
rmdir --ignore-fail-on-non-empty \
/etc/systemd/system/[email protected] 2>/dev/null || true
chown classroom:classroom /home/classroom/.bash_profile
chmod 0644 /home/classroom/.bash_profile
chmod 0755 /usr/local/bin/classroom-browser
chmod 0755 /usr/local/bin/classroom-chrome-windows
chmod 0755 /usr/local/bin/classroom-window
chmod 0755 /usr/local/bin/classroom-dvd
chmod 0755 /usr/local/bin/classroom-dvd-session
chmod 0755 /usr/local/bin/classroom-dvd-css-setup
chmod 0755 /usr/local/bin/classroom-notify
chmod 0755 /usr/local/bin/classroom-notify-test
chmod 0755 /usr/local/bin/classroom-mqtt
chmod 0755 /usr/local/bin/classroom-notifications
chmod 0755 /usr/local/bin/classroom-scale
chmod 0755 /usr/local/bin/classroom-shutdown
chmod 0755 /usr/local/bin/classroom-chrome-setup
chmod 0755 /usr/local/bin/classroom-provision
chmod 0755 /usr/local/bin/classroom-printer-setup
# Commands the room's own parts install. Listing them by name went wrong
# once already, when a command that had been removed was still chmod'ed
# here and the whole postinst failed; the package is the list.
for command in /usr/local/bin/classroom-*; do
[ -e "$command" ] || continue
chmod 0755 "$command"
done
# Reading the optical drive needs group cdrom. Takes effect at the next
# login, which the OTA reboot provides.
@@ -55,6 +46,13 @@ chmod 0640 /etc/ekklesia-classroom/device.conf
systemctl daemon-reload || true
# Autologin into the classroom, and back into it if the session ever ends.
systemctl enable sddm.service >/dev/null 2>&1 || true
# The room's own user services: the audio policy, and the drop-in that stops
# Plasma giving up on a repeatedly crashing panel.
systemctl --global enable ekklesia-classroom-audio.service >/dev/null 2>&1 || true
# NetworkManager ships nmtui and deliberately leaves interfaces declared in
# /etc/network/interfaces under ifupdown's control (managed=false). This gives
# administrators saved, auto-reconnecting Wi-Fi without taking over an