RFE: let sandboxed applications opt out of the print portal
GtkPrintOperation
always launches the portal version of the print dialog when invoked from a flatpak. This occurs because gdk_use_portal
returns true whenever /.flatpak-info
is detected. Unfortunately, the current print portal does not custom UI in the print dialog (tracked Bug #45 here). This omission significantly hinders the printing capabilities of certain applications. For example:
-
Evince adds a "Page Handling" tab for users to adjust the justification and scaling. This tab is not present on the flatpak version Evince which comes preinstalled with Fedora Silverblue; consequently, many printed documents have the wrong scaling.
-
Eog adds an even fancier "Image Settings" tab with an inline print preview, and the controls in this tab are critical for correct print formatting (see this bug report for instance). Again, the flatpak version of eog that ships with Silverblue is broken.
Since apps can add arbitrary UI in custom print settings tabs, the printing portal bug seems unlikely to have an easy fix. In the meantime, flatpak apps could potentially work around the problem by talking to the cups socket directly (after adding socket=cups
to their manifest) if only they could use the non-portal implementation of GtkPrintOperation
. Could the print dialog support opting out of the portal version through an environment variable?