feat: dress VLC down to an appliance screen

Stock VLC looks like a desktop media player, which is wrong for a room
where the TV is the whole interface. VLC stays the backend because its
dvdnav module is what provides the disc menus, and menus are the part
that matters on a commercial disc.

It is dressed down with documented VLC 3.x options, all verified against
the 3.0.23 build in Debian Trixie: minimal view, dark palette, no cone,
no tray, no now-playing popups, no resume prompt, no recent-disc
history, no title banner. sway draws no border on the window either, so
there is nothing above the video.

The auto-hiding fullscreen controller is deliberately kept: it is not
persistent chrome, and it is the only way a volunteer with a mouse can
pause or change chapter.

No skin is involved. Skins replace the interface wholesale and take the
keyboard and mouse handling that DVD menu navigation depends on with
them, as would --intf dummy.

Also drops --no-qt-updates-notif, which was not an option in Debian's
VLC at all. It made VLC exit before it started, so the DVD button could
never have launched a disc.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-04 21:33:22 -05:00
co-authored by Claude Opus 5
parent 428eb27a74
commit c81fc1b0b9
4 changed files with 95 additions and 10 deletions
+5
View File
@@ -19,6 +19,11 @@ exec --no-startup-id /usr/local/bin/classroom-dock
include /etc/sway/config.d/* include /etc/sway/config.d/*
# The DVD player is an appliance screen, not a desktop window: no sway
# title bar, and it opens fullscreen over the dock.
for_window [class="(?i)vlc"] border none
for_window [app_id="(?i)vlc"] border none
# Minimize and restore. # Minimize and restore.
# #
# classroom-window parks the window on a hidden workspace as an ordinary # classroom-window parks the window on a hidden workspace as an ordinary
+55 -8
View File
@@ -39,32 +39,79 @@ a disc left in over the week does not announce itself at every boot.
## Playback ## Playback
Playback is VLC, chosen over mpv because mpv dropped DVD menu support. Playback is VLC, chosen over mpv because mpv dropped DVD menu support.
VLC's `dvdnav` path gives working menus, chapters and audio tracks. VLC's `dvdnav` module is what provides the disc menus, and `dvd://`
selects it.
`classroom-dvd toggle` hands the disc to VLC through `classroom-window`, `classroom-dvd toggle` hands the disc to VLC through `classroom-window`,
so the DVD player behaves like any other classroom application: the DVD so the DVD player behaves like any other classroom application: the DVD
button focuses it, minimises it, and restores it. `Super+M` minimises it button focuses it, minimises it, and restores it. `Super+M` minimises it
too. VLC starts fullscreen; `Esc` leaves fullscreen. too. VLC starts fullscreen; `Esc` leaves fullscreen.
## How VLC is made to fit the classroom
Stock VLC looks like a desktop media player, which is wrong for a room
where the TV is the whole interface. It is dressed down with documented
VLC 3.x options — no skin is involved, because skins replace the
interface wholesale and take DVD menu input with them:
| Option | Why |
| --- | --- |
| `--fullscreen` | The disc opens straight onto the TV |
| `--qt-minimal-view` | No menu bar or extended panels |
| `--qt-dark-palette` | Dark window instead of the default light grey |
| `--no-qt-bgcone` | No orange cone, no album-art panel |
| `--no-qt-system-tray` | Not a background desktop application |
| `--no-qt-name-in-title` | Nothing in the title bar to read |
| `--no-qt-video-autoresize` | The window does not jump to the video size |
| `--qt-notification=0` | No now-playing popups |
| `--qt-continue=0` | Never asks to resume where it left off |
| `--no-qt-recentplay` | No history of the discs a classroom has played |
| `--no-qt-privacy-ask` | No first-run privacy dialog |
| `--no-video-title-show` | No title banner over the video |
sway also draws no border on the VLC window
(`for_window [class="(?i)vlc"] border none`), so there is no title bar
above the video either.
The auto-hiding fullscreen controller is deliberately **kept**. It is
the only way to pause or change chapter with a mouse, it is not
persistent chrome, and a volunteer with a wireless mouse needs it.
`--intf dummy` would give an even barer window, but the dummy interface
takes the keyboard and mouse handling that DVD menu navigation depends
on, so it is not an option here.
Note that `--no-qt-updates-notif`, which earlier classroom builds
passed, is not an option in Debian's VLC at all — it made VLC exit
before it started.
## Commercial (CSS encrypted) discs ## Commercial (CSS encrypted) discs
Most retail DVDs are CSS encrypted, and Debian cannot ship the Most retail DVDs are CSS encrypted, and Debian cannot ship the
decryption library. Unencrypted discs — curriculum discs, home-burned decryption library. Unencrypted discs — curriculum discs, home-burned
video — play without any extra work. video — play without any extra work.
For commercial discs, run once per endpoint, as root: **This is automatic.** On any classroom with `DVD_ENABLED=true`, the
provisioning service installs the codecs after the next boot. See
[provisioning.md](provisioning.md).
To do it by hand, or to watch it happen:
``` ```
sudo classroom-dvd-css-setup sudo classroom-dvd-css-setup
classroom-dvd-css-setup --status
``` ```
That enables the Debian `contrib` component, installs `libdvd-pkg` and It enables the Debian `contrib` component in whichever APT source format
builds `libdvdcss`. It needs network access and it compiles a package, the machine uses, installs `libdvd-pkg`, answers its debconf questions
which is why it is deliberately not run from the package `postinst`: the and builds `libdvdcss`. It only ever adds a missing component to an
postinst runs while dpkg already holds the apt lock during an OTA update. existing Debian entry, so repeated runs cannot produce a duplicate
repository or a duplicate component, and third-party repositories such
as Google Chrome's are never touched.
**Commercial DVD playback has not been verified on hardware yet.** Test It needs the network and it compiles a package, which is why it runs
with an actual disc before relying on it for a service. from the provisioning service rather than the package `postinst`: the
postinst executes while dpkg is still holding the apt lock.
## Command line ## Command line
+3
View File
@@ -111,6 +111,9 @@ With `DVD_ENABLED=true`:
- [ ] Closing the player works - [ ] Closing the player works
- [ ] Ejecting is detected, the icon goes back - [ ] Ejecting is detected, the icon goes back
- [ ] Reinserting is detected again - [ ] Reinserting is detected again
- [ ] VLC opens fullscreen, dark, with no menu bar, no orange cone and
no sway title bar
- [ ] The fullscreen controller still appears on mouse movement
- [ ] Commercial CSS disc, after `classroom-dvd-css-setup` - [ ] Commercial CSS disc, after `classroom-dvd-css-setup`
## OTA ## OTA
+32 -2
View File
@@ -43,12 +43,42 @@ def notify(title, message, urgency="normal"):
def player_command(device): def player_command(device):
"""VLC, dressed down to look like an appliance rather than a desktop app.
All of these are documented VLC 3.x options, verified against the
3.0.23 build in Debian Trixie. No skin is involved: skins replace the
interface wholesale and break DVD menu input, which is the one thing
that has to keep working.
Note that --no-qt-updates-notif, which earlier builds passed, is not
an option in Debian's VLC and made it refuse to start at all.
"""
return [ return [
PLAYER, PLAYER,
# Fullscreen first: the disc opens straight onto the TV.
"--fullscreen", "--fullscreen",
"--no-video-title-show", # No menu bar or extended panels, and a dark window instead of
# the default light grey one.
"--qt-minimal-view",
"--qt-dark-palette",
# No orange cone, and no album-art panel, behind the video.
"--no-qt-bgcone",
# Nothing that behaves like a desktop application.
"--no-qt-system-tray",
"--no-qt-name-in-title",
"--no-qt-video-autoresize",
"--qt-notification=0",
# Never offer to resume, and never accumulate a list of the
# discs a classroom has played.
"--qt-continue=0",
"--no-qt-recentplay",
# No first-run privacy dialog, no title banner over the video.
"--no-qt-privacy-ask", "--no-qt-privacy-ask",
"--no-qt-updates-notif", "--no-video-title-show",
# dvd:// selects VLC's dvdnav module, which is what provides the
# disc menus. The Qt interface is kept for exactly that reason:
# --intf dummy would be cleaner still but takes the keyboard and
# mouse handling that menu navigation depends on with it.
f"dvd://{device}", f"dvd://{device}",
] ]