Repository navigation
fix(wordcraft): list host CUPS printers in the Print dialog - #969
Merged
Merged
Conversation
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.
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WordCraft (
ai.storyteller.wordcraft). File › Print listed no printers: the sandbox could not reach the host CUPS socket, and the runtime haslibcupsandlprbut notlpstatorlp, 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-clientmodule that builds CUPS 2.4.20 (Apache-2.0, statically linked) and installslp,lpstatandlpoptionsbehindcups-socket.sh. The wrapper points a Unix socket named in~/.cups/client.confat the socket Flatpak mounted, and leaves an explicitCUPS_SERVERor a networkServerNamealone. 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 -efinds driverless printers through the host Avahi daemon--filesystem=~/.cups:ro— default printer and saved options; not writtenStill not granted:
--share=network— the optional--controlserver, 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— unchangedTested
Built with
./scripts/publish.sh(hostflatpak-builder) and installed the local repo as a user install.publish.sh --verifystopped earlier ingen-sitebecause 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 -dlists both printers and the host defaultlpstat -elists bothclient.confwhoseServerNameis the mounted socket still lists the default, withCUPS_SERVER=/var/run/cups/cups.sockServerNamesocket lines fail instead of talking to the wrong serverServerNameis not rewrittenDid 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
lpstatoutput above.Flathub
WordCraft is not on Flathub. This package is the FlatPark listing.