Files
Classroom_Desktop/tools/lab/install-desktop
T
ekklesiaandClaude Opus 5 87b55761c6 feat: give the classroom a desktop instead of a shell
The whole appliance UI is now configuration for a desktop Debian already
ships: a Plasma 6.3 session with a colour scheme, a look and feel package
that builds the bar, window rules, and KDE's own Kiosk restrictions.

Two things were measured rather than assumed, and both changed a decision.

Plasma restarts a crashed panel three times a minute and then gives up,
which is the failure a classroom has already had. Four lines of systemd
drop-in make it unconditional; the panel then survived eight SIGKILLs a
second apart, back each time in 2.4s.

Plasma draws a minimised task and a background task identically, so the
five states the room needs cannot all be shown. Rather than write a task
manager, the classroom removes minimise: clicking a launcher always means
show me this.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 08:35:12 -05:00

71 lines
3.0 KiB
Bash
Executable File

#!/bin/bash
# Put the classroom desktop onto a machine, from the repository, at the
# paths the package will use. Run as root inside the lab.
#
# Every destination here is a normal system path that Plasma already reads.
# There is no classroom daemon in this list, and nothing is generated: the
# desktop is a set of files.
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
install -Dm644 "$SRC/config/plasma/colors/EkklesiaDark.colors" \
/usr/share/color-schemes/EkklesiaDark.colors
install -Dm644 "$SRC/config/plasma/colors/EkklesiaLight.colors" \
/usr/share/color-schemes/EkklesiaLight.colors
LNF=/usr/share/plasma/look-and-feel/org.ekklesia.classroom.desktop
rm -rf "$LNF"
install -Dm644 "$SRC/config/plasma/lookandfeel/metadata.json" "$LNF/metadata.json"
install -Dm644 "$SRC/config/plasma/lookandfeel/contents/defaults" \
"$LNF/contents/defaults"
install -Dm644 \
"$SRC/config/plasma/lookandfeel/contents/layouts/org.kde.plasma.desktop-layout.js" \
"$LNF/contents/layouts/org.kde.plasma.desktop-layout.js"
for entry in "$SRC"/config/plasma/applications/*.desktop; do
install -Dm644 "$entry" "/usr/share/applications/$(basename "$entry")"
done
# Entries that deliberately shadow a vendor one. XDG_DATA_DIRS searches
# /usr/local/share before /usr/share, so these win without touching, and
# without being overwritten by, the package that provides the original.
for entry in "$SRC"/config/plasma/applications-local/*.desktop; do
install -Dm644 "$entry" "/usr/local/share/applications/$(basename "$entry")"
done
install -Dm644 "$SRC/config/plasma/solid/ekklesia-dvd.desktop" \
/usr/share/solid/actions/ekklesia-dvd.desktop
for icon in "$SRC"/config/icons/ekklesia-*.svg; do
[ -e "$icon" ] || continue
install -Dm644 "$icon" \
"/usr/share/icons/hicolor/scalable/apps/$(basename "$icon")"
done
install -Dm644 "$SRC/config/wallpapers/classroom-calm.png" \
/usr/share/backgrounds/ekklesia/classroom-calm.png
install -Dm644 "$SRC/systemd/user/plasma-plasmashell.service.d/ekklesia-classroom.conf" \
/etc/systemd/user/plasma-plasmashell.service.d/ekklesia-classroom.conf
for script in classroom-browser classroom-wonderink; do
[ -e "$SRC/scripts/$script" ] || continue
install -Dm755 "$SRC/scripts/$script" "/usr/local/bin/$script"
done
command -v gtk-update-icon-cache >/dev/null 2>&1 \
&& gtk-update-icon-cache -qtf /usr/share/icons/hicolor || true
command -v update-desktop-database >/dev/null 2>&1 \
&& update-desktop-database -q /usr/share/applications || true
echo "classroom desktop installed"