OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
apps-services medium common DISPUTE

Make printers appear in a Flatpak app's print dialog

omarchyarchendeavouroscachyosmanjarohyprlandwaylandflatpaklaptopdesktop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The fix contains a command that cannot work, so this is corrected. flatpak override --user --filesystem=/etc/cups:ro is dead: dont_export_in[] in https://github.com/flatpak/flatpak/blob/main/common/flatpak-exports.c lists /etc among the paths Flatpak refuses to export, and any path with that prefix fails with Path "/etc" is reserved by Flatpak. https://github.com/flatpak/flatpak/blob/main/common/flatpak-context.c then routes that failure through log_cannot_export_error, which logs Not sharing "..." with sandbox: ... at message level and clears the error, so the app still launches and the reader believes a permission was granted that never existed. That is the worst shape of wrong advice and it is why this record could not stay ok. https://github.com/flatpak/flatpak/blob/main/common/flatpak-run-cups.c shows the second half of the same defect: --socket=cups resolves the server from $CUPS_SERVER, then ~/.cups/client.conf, then /etc/cups/client.conf on the HOST, outside the sandbox, so in-sandbox visibility of the file was never the mechanism, and flatpak_run_cups_check_server_is_socket accepts the value only if it starts with / and contains no colon. A carried TODO comment says network CUPS servers are not supported and it falls back to /var/run/cups/cups.sock. So the record's remote-CUPS paragraph was wrong about the mechanism and wrong about the outcome, and it is replaced with the lpadmin route, whose flags and the ipp://hostname:631/printers/queue_name URI form both come from https://wiki.archlinux.org/title/CUPS. What held, and what I confirmed on this workstation (omarchy 4.0.2-1, kernel 7.1.9): cups 2:2.4.19-1 is installed and listed in /usr/share/omarchy/install/omarchy-base.packages alongside cups-filters, cups-pk-helper and system-config-printer. cups.service and cups.socket are both enabled and active, and cups.socket listens on /run/cups/cups.sock, which exists with mode srw-rw-rw-, so the cause's socket path is right. /var/run is a symlink to ../run, so Flatpak's sandbox target /var/run/cups/cups.sock is the same file. The portal claim holds and I confirmed it two ways. On this machine gtk.portal lists org.freedesktop.impl.portal.Print in its Interfaces and hyprland.portal does not, and https://wiki.archlinux.org/title/XDG_Desktop_Portal's backend table gives Print as yes for xdg-desktop-portal-gtk and no for both xdg-desktop-portal-hyprland and xdg-desktop-portal-wlr, the latter being the half I could not check locally because wlr is not installed. cups is a real socket name and both --share and --env are real override options per https://github.com/flatpak/flatpak/blob/main/doc/flatpak-override.xml, and flatpak info --show-permissions in the verify line is valid, so verify is left alone. The Omarchy 4 branch of the fix is new and is a real correction rather than a restyle: xdg-desktop-portal-gtk 1.15.3-1 is in omarchy-base.packages line 142, so it is always installed and the old sudo pacman -S step was a no-op that sent the reader down a dead end, and hyprland-portals.conf already names gtk as the fallback with default=hyprland;gtk, which is the mechanism documented on the Arch wiki portal page. All three portal user units are active here and both unit names in the record are correct, with xdg-desktop-portal-gtk.service being static and D-Bus activated. The danger is rewritten because it was pointed at the wrong thing. --socket=cups is listed under Standard permissions on https://docs.flatpak.org/en/latest/sandbox-permissions.html, which says those can be freely used, and the socket is world writable anyway, so calling it unfiltered access overstates it. The genuine hazard is the app-less global form the fix offers as a convenience, and the danger now leads with that. I did not assert what cupsd's default policy permits, because /etc/cups/cupsd.conf is mode -rw-r----- root:cups and I have no sudo, so I could not read it. On the cited issue: I read https://github.com/flatpak/xdg-desktop-portal/issues/341 in full, body and all three comments. It is still open, dated 2019 against flatpak 1.4.1 on Linux Mint 18.3, and it supports the SYMPTOM (LibreOffice, Scribus and GIMP seeing no CUPS printers) and the cause's point that non-portal apps enumerate printers their own way, which is exactly what hadess says in the thread. It never mentions --socket=cups and supports no part of the fix, so it is weak but not false and I left it in place rather than removing it. One comment there notes the reporter's remote printers had to be added locally, which happens to support the replacement advice. Omarchy 4 framing, confirmed here: flatpak is NOT installed and is in none of /usr/share/omarchy/install/*.packages. It is pulled in only by omarchy-pkg-add flatpak inside omarchy-install-gaming-geforce-now. Keeping omarchy in applies_to is still right, since anyone hitting this symptom installed flatpak themselves, but frequency: common is generous for the Omarchy slice of the audience, which needs flatpak plus a configured printer plus a non-portal app. I left it alone because applies_to also covers Arch, EndeavourOS, CachyOS and Manjaro, where it is fair. What I could NOT exercise: with no flatpak binary present I ran no flatpak command, so every override claim rests on the man page source and the C source rather than on this machine, and I could not reproduce the printing failure because lpstat -p -d reports no destinations here. I also left --env=CUPS_SERVER=host:631 plus --share=network out of the fix, even though both options are documented and the Arch wiki documents CUPS_SERVER, because I could not test whether in-sandbox libcups picks it up and I was not going to replace one untested command with another.

The cause above was rewritten on 2026-09-11 to match this note; the fix was corrected by the audit itself.
RISK

Keep the override scoped to one app. flatpak override --user --socket=cups with no app id applies to every Flatpak app on the system, including ones you install months later, and there is nothing in the app's own listing to show where the permission came from.

--socket=cups itself is a modest grant rather than a hole. The local socket is already world writable on a stock install (srw-rw-rw- /run/cups/cups.sock), so the sandbox gets the same reach any ordinary host process already has, which is enumerating queues and submitting jobs, and upstream lists cups among the standard freely-usable permissions. The real exposure is that a sandboxed app can now send documents to a printer and read queue and job metadata. Administrative changes to cupsd are still subject to the authentication rules in /etc/cups/cupsd.conf.

Do not reach for --filesystem=host-etc or --filesystem=home to work around a printing problem. Both hand over far more than printing needs, and neither fixes this.

Symptom

The print dialog inside Flatpak LibreOffice / GIMP / Chrome / Inkscape shows "No printers found", or only offers "Print to File", while lpstat -p -d on the host lists the printer as idle and printing from a native app works fine.

Cause

CUPS is reached over the Unix socket /run/cups/cups.sock, which is not mounted inside the Flatpak sandbox unless the app holds the cups socket permission. With that permission Flatpak bind-mounts the host socket into the sandbox at /var/run/cups/cups.sock, the same file on Arch because /var/run is a symlink to /run. Apps that do not go through the Print portal see no CUPS server at all and report zero printers, and manifests vary in whether they request the permission. The permission only ever forwards a LOCAL socket. Flatpak looks at $CUPS_SERVER, then ~/.cups/client.conf, then /etc/cups/client.conf on the host, but it accepts the value only when it is a filesystem path with no colon in it, so a network ServerName host:631 is ignored and it falls back to the local socket.

Fix

Grant CUPS access to the specific app:


flatpak override --user --socket=cups org.libreoffice.LibreOffice

Omitting the app id applies the override to every Flatpak app you have now and every one you install later, so prefer the per-app form above:


flatpak override --user --socket=cups

Check that a portal backend implementing the Print portal is present and running. xdg-desktop-portal-gtk implements it, xdg-desktop-portal-hyprland and xdg-desktop-portal-wlr do not.

On Omarchy 4 it is already installed. xdg-desktop-portal-gtk is listed in /usr/share/omarchy/install/omarchy-base.packages, and /usr/share/xdg-desktop-portal/hyprland-portals.conf already names it as the fallback backend with default=hyprland;gtk, so check it is running rather than installing it:


systemctl --user is-active xdg-desktop-portal.service xdg-desktop-portal-gtk.service
systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service

On plain Arch with Hyprland or another wlroots compositor it may be missing, so install it first:


sudo pacman -S --needed xdg-desktop-portal-gtk
systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service

Confirm the host side is actually serving printers before blaming the sandbox:


systemctl status cups.service
lpstat -p -d

If your printers live on a remote CUPS server, --socket=cups will not reach them, because it forwards a local socket only and ignores a network ServerName in /etc/cups/client.conf. Do not try to bind that file in. flatpak override --user --filesystem=/etc/cups:ro <app> is accepted by the override command but can never take effect, because every path under /etc is on Flatpak's reserved list. At launch Flatpak prints Not sharing "/etc/cups" with sandbox: Path "/etc" is reserved by Flatpak on stderr and carries on without it, which a user launching from a desktop icon never sees. Add the remote queue to the local cupsd instead, then grant --socket=cups:


sudo lpadmin -p office -E -v "ipp://printserver.example:631/printers/office" -m everywhere
lpstat -p -d

Then fully quit and relaunch the Flatpak app, because overrides are only read at startup.

Verify

flatpak info --show-permissions org.libreoffice.LibreOffice lists cups under [Context] sockets, and the printer now appears in the app's own print dialog.

Sources

flatpak-app-cannot-see-cups-printers