diff --git a/docs/classroom-v2-experiment.md b/docs/classroom-v2-experiment.md index e470060..35159c3 100644 --- a/docs/classroom-v2-experiment.md +++ b/docs/classroom-v2-experiment.md @@ -58,6 +58,7 @@ can photograph it and a real pointer can be aimed at it. ``` tools/lab/lab build # the image +tools/lab/from-package # a fresh machine, the .deb, and nothing else tools/lab/cold-start 3 # three complete cold starts, from nothing tools/lab/lab session # compositor + Plasma session tools/lab/lab shot NAME # docs/screenshots/NAME.png @@ -574,9 +575,21 @@ The existing Debian classroom test VM should be kept. * Secondary windows, print dialog, notifications, fullscreen, themes, lockdown all verified on a running session. * Audio policy written with the failing room as a test. -* Cold starts repeated. +* Cold starts repeated: eleven, identical. +* Package built, and the file conflict and the stale `postinst` it exposed + both fixed. +* `tools/lab/from-package` run: fresh machine, `.deb`, session up, both + applications launched, one button each. -**Next**: SDDM autologin; move the file list in `tools/build-release.sh` to -the Plasma layout and build a `0.1.45~plasma1` package on its own channel; -Plasma display scaling at 1.25 and 1.5; then a real VM for DVD, audio and -performance. +**Next**, in order: + +1. Port `classroom-window` off sway so the DVD player is whole. It is the + last thing on this branch that still speaks a compositor the classroom + no longer runs. +2. Publish `0.1.45~plasma1` to a channel of its own, the way the Hyprland + milestone did, so a stable or canary room can never be offered it. +3. Bench-test SDDM: autologin, and that ending the session brings the + classroom back rather than a shell. +4. On real hardware: a DVD, a television switched on after the computer, + printing to Elmer, display scaling at 1.25 and 1.5, and a weekend of + uptime. diff --git a/docs/screenshots/v2-both-apps.png b/docs/screenshots/v2-both-apps.png new file mode 100644 index 0000000..5a4b425 Binary files /dev/null and b/docs/screenshots/v2-both-apps.png differ diff --git a/docs/screenshots/v2-from-package.png b/docs/screenshots/v2-from-package.png index da31619..be8bb50 100644 Binary files a/docs/screenshots/v2-from-package.png and b/docs/screenshots/v2-from-package.png differ diff --git a/tools/lab/from-package b/tools/lab/from-package new file mode 100755 index 0000000..b349fbe --- /dev/null +++ b/tools/lab/from-package @@ -0,0 +1,52 @@ +#!/bin/bash +# The whole thing, from nothing, the way a classroom would get it: a fresh +# machine, the built .deb, and the session started from what it installed. +# No developer install script anywhere in the path. +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +LAB="$ROOT/tools/lab/lab" +DEB="${1:-$(ls -t "$ROOT"/dist/ekklesia-classroom_*_amd64.deb | head -1)}" +NAME="${LAB_NAME:-classroom-v2-lab}" + +echo "installing $(basename "$DEB")" +"$LAB" up >/dev/null + +docker exec "$NAME" sh -c ' + printf "#!/bin/sh\nexit 101\n" > /usr/sbin/policy-rc.d + chmod +x /usr/sbin/policy-rc.d + apt-get update -qq >/dev/null 2>&1' + +docker exec "$NAME" sh -c " + DEBIAN_FRONTEND=noninteractive dpkg -i '/srv/classroom/${DEB#$ROOT/}' \ + >/dev/null 2>&1 || true + DEBIAN_FRONTEND=noninteractive apt-get -y -qq -f install >/dev/null 2>&1 + DEBIAN_FRONTEND=noninteractive dpkg --configure ekklesia-classroom >/dev/null 2>&1 + rm -f /usr/sbin/policy-rc.d" + +state=$(docker exec "$NAME" dpkg-query -W -f='${db:Status-Abbrev}' ekklesia-classroom) +echo "package state: $state" + +# environment.d is read when the user manager starts, so it starts after. +docker exec "$NAME" systemctl restart user@1000.service +sleep 4 + +"$LAB" session >/dev/null +sleep 8 + +check() { printf ' %-46s %s\n' "$1" "$2"; } +env_dirs=$(docker exec -u classroom -e XDG_RUNTIME_DIR=/run/user/1000 \ + -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus "$NAME" \ + systemctl --user show-environment 2>/dev/null | grep '^XDG_CONFIG_DIRS=' || true) + +check "package installed" "$state" +check "session config path" "${env_dirs:-NOT SET}" +check "plasmashell" "$(docker exec "$NAME" pgrep -c -x plasmashell || echo 0)" +check "kwin" "$(docker exec "$NAME" pgrep -c -x kwin_wayland || echo 0)" +check "panel applets" "$(docker exec "$NAME" sh -c 'grep -c "^plugin=" /home/classroom/.config/plasma-org.kde.plasma.desktop-appletsrc' || echo 0)" +check "panel restart policy" "$(docker exec -u classroom -e XDG_RUNTIME_DIR=/run/user/1000 \ + -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus "$NAME" \ + systemctl --user show plasma-plasmashell.service -p Restart --value)" +check "audio policy" "$(docker exec -u classroom -e XDG_RUNTIME_DIR=/run/user/1000 \ + -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus "$NAME" \ + systemctl --user is-active ekklesia-classroom-audio.service || true)"