Skip to content

fix(wordcraft): list host CUPS printers in the Print dialog - #969

Merged
jing2uo merged 2 commits into
flatpark:mainfrom
3ddruck12:fix/wordcraft-cups
Nov 5, 2026
Merged

jing2uo merged 2 commits into
flatpark:mainfrom
3ddruck12:fix/wordcraft-cups

Conversation

@3ddruck12

@3ddruck12 3ddruck12 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

WordCraft (ai.storyteller.wordcraft). File › Print listed no printers: the sandbox could not reach the host CUPS socket, and the runtime has libcups and lpr but not lpstat or lp, which craft-print runs to list printers and submit jobs.

Upstream already fixed this in its own Flatpak manifests (storytold/wordcraft#4909). This extra-data package never picked those permissions up, so FlatPark 0.15.0 still shows an empty printer list. Same symptom as storytold/wordcraft#4924.

Packaging

Unchanged extra-data pin (v0.15.0 tarball). Added a cups-client module that builds CUPS 2.4.20 (Apache-2.0, statically linked) and installs lp, lpstat and lpoptions behind cups-socket.sh. The wrapper points a Unix socket named in ~/.cups/client.conf at the socket Flatpak mounted, and leaves an explicit CUPS_SERVER or a network ServerName alone. Same approach as upstream's manifests.

Sandbox

Granted, because printing does not work without them:

  • --socket=cups — the host CUPS socket
  • --system-talk-name=org.freedesktop.Avahi — lpstat -e finds driverless printers through the host Avahi daemon
  • --filesystem=~/.cups:ro — default printer and saved options; not written

Still not granted:

  • --share=network — the optional --control server, and a CUPS server named by address in ~/.cups/client.conf. Local queues do not need it. Override, already in the metainfo: flatpak override --user --share=network ai.storyteller.wordcraft
  • --filesystem=home / host — unchanged

Tested

Built with ./scripts/publish.sh (host flatpak-builder) and installed the local repo as a user install. publish.sh --verify stopped earlier in gen-site because this checkout is shallow; the app commit itself built and installed.

Inside the sandbox, against two host CUPS queues (HP LaserJet P3005, Brother MFC-J5320DW):

  • lpstat -p -d lists both printers and the host default
  • lpstat -e lists both
  • a client.conf whose ServerName is the mounted socket still lists the default, with CUPS_SERVER=/var/run/cups/cups.sock
  • two disagreeing ServerName socket lines fail instead of talking to the wrong server
  • a network ServerName is not rewritten

Did not send a sheet of paper. Did not open the Print dialog: this machine's WordCraft profile is in use, and the dialog's list is the lpstat output above.

Flathub

WordCraft is not on Flathub. This package is the FlatPark listing.

craft-print discovers printers with lpstat and submits jobs with lp. The
runtime has neither tool, and the sandbox could not reach the CUPS socket,
so the printer list stayed empty.

Co-authored-by: Cursor <[email protected]>
jing2uo added a commit to flatpark/prebuilt that referenced this pull request Nov 5, 2026
The runtimes ship libcups and lpr but not the System V clients, so apps
whose print dialog runs lpstat/lp (craft-print in the ArtCraft apps) list
no printers. Same build as upstream WordCraft's cups-client module, plus
the socket wrapper, packaged as an extra-data stack instead of being
compiled into one app's ref (flatpark/flatpark#969).
Building CUPS in this manifest puts a single app's dependency into the
ref, which docs/packagers/prebuilt.md rules out. flatpark/prebuilt now
ships the same build plus the socket wrapper as cups-client-v1; pin it as
extra-data, unpack it in apply_extra and link the tools onto PATH. The
module keeps its name so it still lines up with upstream's manifest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants