# DVD support DVD support is optional per classroom and off by default. ## Enabling a room Edit `/etc/ekklesia-classroom/device.conf` on that endpoint: ``` DVD_ENABLED=true ``` Then restart the session (reboot, or restart `classroom-dock`). With `DVD_ENABLED=false`, or the key absent, the DVD button is not built at all and no drive polling happens. Older endpoints get a commented `DVD_ENABLED=false` appended on upgrade so the option is discoverable, which leaves their behaviour unchanged. ## Behaviour The dock polls the drive every two seconds with the `CDROM_DRIVE_STATUS` ioctl. That is a status query, so it does not spin the disc up. | State | Dock icon | Clicking the button | | --- | --- | --- | | No drive connected | DVD logo held back at 55% | "No DVD drive is connected to this classroom computer." | | Drive present, no disc | DVD logo held back at 55% | "No disc is in the drive. Insert a disc to get started." | | Tray open | held back | "The disc tray is open. Insert a disc to get started." | | Disc still being read | held back | "Reading the disc. Please try again in a moment." | | Disc ready | DVD logo at full strength | Plays the disc | When a disc becomes ready, a **DVD Ready** notification is shown once. Discs never play on their own; playback always needs a button press. The first poll after login only records what is already in the drive, so a disc left in over the week does not announce itself at every boot. ## Playback Playback is VLC, chosen over mpv because mpv dropped DVD menu support. 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`, so the DVD player behaves like any other classroom application: the DVD button focuses it, minimises it, and restores it. `Super+M` minimises it 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 Most retail DVDs are CSS encrypted, and Debian cannot ship the decryption library. Unencrypted discs — curriculum discs, home-burned video — play without any extra work. **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 classroom-dvd-css-setup --status ``` It enables the Debian `contrib` component in whichever APT source format the machine uses, installs `libdvd-pkg`, answers its debconf questions and builds `libdvdcss`. It only ever adds a missing component to an 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. It needs the network and it compiles a package, which is why it runs from the provisioning service rather than the package `postinst`: the postinst executes while dpkg is still holding the apt lock. ## Command line ``` classroom-dvd status # drive node, drive state, whether VLC is installed classroom-dvd toggle # what the dock button does classroom-dvd play # start playback even if the drive is unsure classroom-dvd eject # open the tray ``` ## Permissions Reading the drive needs group `cdrom`. The postinst adds the `classroom` user to it; that takes effect at the next login, which the OTA reboot provides. Without it the drive reads as absent.