Files
ekklesiaandClaude Opus 5 f65c814eff fix: put the popup close button in the dock, and clear the printer location
Three things, none of them redesigns.

The close affordance for a secondary Chrome window was a separate
layer-shell surface anchored to that window's corner, repositioned by a
five-per-second poll. Any position change tore the surface down and
built another, so on real hardware it chased the window and flickered.
Removed entirely: the GTK button process, the geometry maths that placed
it, the --close-button mode that spawned it, and the poll loop that
drove it. The window helper no longer imports GTK at all.

The behaviour underneath it was right and is kept. The first Chrome
top-level is the classroom browser, tiled and borderless; later ones
float centred at about three quarters of the output. Creation order is
the only thing that can tell them apart — confirmed on a real session,
where every Chrome top-level shares app_id, shell, PID and a null
transient_for, and sway exposes no window properties for Wayland
toplevels at all. Titles are still not used. It now follows sway's own
window events instead of polling, so dragging a popup costs nothing.

Close moved into the dock, which was already on screen and does not
move, so it cannot chase anything. It appears only while a secondary
window is focused and runs kill on that one container. The helper
publishes which window that is; the dock watches the file rather than
polling. A stock sway title bar has no close button, so restoring the
border would not have solved this either.

Two bugs found by looking rather than by testing state. Chrome
renegotiates the size of a popup opened with explicit dimensions after
the resize returns, which left windows centred for a width they no
longer had; placement now settles and repeats once, at creation only, so
dragging is still free. And the dock's Close button came up empty
because show_all does not recurse into a no-show-all widget.

The printer's Location is now blank. CUPS prints it under the queue name
in every dialog, so "Ekklesia Classroom" was a second line the teacher
had to read past; the identity is one word. The already-configured check
includes Location, so a machine set up before this is corrected rather
than left as close enough.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-06 20:24:51 -05:00

3.7 KiB

Classroom printing

The package installs and enables CUPS, its client/filter stack, and Debian's compressed Foomatic PPD database. Chrome is configured to open the system print dialog, which shows the queues configured in CUPS.

The Ricoh Aficio MP C3502 supports PCL 5c and PCL 6 as standard; PostScript 3 is optional. Debian Trixie does not provide a model-specific C3502 PPD in the installed driver set, so the classroom uses Trixie's recommended generic color PCL 6/PCL XL driver. This uses the printer's standard language and requires no vendor binary.

Automatic church printer

Every provisioning pass runs:

classroom-printer-setup

It creates or updates this site-wide queue:

Setting Value
Queue and display name Elmer
Printer Ricoh Aficio MP C3502
Address 10.10.0.155
Hardware address 00:26:73:4F:E7:C9
URI socket://10.10.0.155:9100
Default Elmer
Print quality PrintoutMode=Normal
Color ColorModel=Color

Those two print options are set explicitly. The generic driver otherwise chose Normal.Gray on the physical printer, which silently made jobs grayscale.

If an older release created Classroom_Color, provisioning removes it before creating Elmer. A correct subsequent run reports that Elmer is already configured and does not rewrite the queue.

The helper can still take an explicit address for diagnostics or future site changes:

sudo classroom-printer-setup 10.10.0.155
sudo classroom-printer-setup ipp://10.10.0.155/ipp/print
sudo classroom-printer-setup --no-default socket://10.10.0.155:9100

The command does not contact the printer while configuring CUPS. An unreachable printer only leaves jobs queued; the provisioning call is also capped at 30 seconds, so it cannot affect boot.

Network printer discovery

Automatic remote queue browsing is disabled. cups-browsed is stopped and disabled, and both avahi-daemon.service and avahi-daemon.socket are stopped, disabled and masked. No other classroom component uses Avahi.

This removes the direct DNS-SD destinations that lpstat -e can show even when cups-browsed is inactive, including the Brother check-in printer and the duplicate discovered Ricoh. The intended output is only:

$ lpstat -e
Elmer

Administration

List the available Debian drivers, including the selected PCL path:

lpinfo -m
lpinfo -m | grep -i -E 'Ricoh|PCL|PostScript|IPP Everywhere'

Show the queue, URI, system default and print defaults:

lpstat -p Elmer -v
lpstat -d
lpoptions -p Elmer -l | grep -E '^(PrintoutMode|ColorModel)/'

Set the default manually:

sudo lpadmin -d Elmer

Print CUPS's test page:

lp -d Elmer /usr/share/cups/data/testprint

Inspect or cancel queued jobs:

lpstat -o Elmer
cancel -a Elmer

The printer language choice is based on Ricoh's published MP C3002/C3502 specifications.

What the teacher sees

The queue is Elmer, its Description is Elmer, and its Location is deliberately blank. CUPS prints the Location under the queue name in every print dialog, so anything there becomes a second line the teacher has to read past. The printer's teacher-facing identity is one word.

classroom-printer-setup enforces this idempotently, and its already-configured check includes the Location, so a machine set up before this change is corrected on the next run rather than being left alone as "close enough".

lpstat -l -p Elmer      # Description: Elmer, Location: (blank)
lpstat -p -d            # Elmer, and the system default
lpstat -e               # Elmer, and nothing else