-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to print from a flatpak app? #90
Comments
(Works fine for me with the recent LO 6.2.4.2 flatpak on Fedora 30 GNOME/Wayland. In e.g. Writer, "File - Printer Settings..." dialog lists the correct printer, not "Generic Printer".) |
@stbergmann: That's interesting - is your printer on the same PC or (as in my case) on the same LAN accessed via CUPS? |
Didn't mean to close this issue - hit the wrong icon, sorry. I am still seeking a fix. |
Please re-open this issue. |
The latter, LAN via CUPS. |
Works here with my HP printer via USB: |
Doesn't work with LAN printers |
Same here on Fedora 32 Silverblue I tried to give cups access to the LO flatpak thanks to flatseal, but no luck. Same with dbus acces. Is that a "green" tech to prevent waste of paper ? Pretty neat |
For me adding Printer via LAN |
hey there, any updates on this? |
@geodro does solution from #90 (comment) works for you? |
Sadly no. I have a network printer |
--share=network - access the network? |
I am using flatpak version of LibreOffice |
I had completely forgotten I started this issue 2½ years ago. Thanks for everyone's ideas. But, I no longer use flatpak versions of LibreOffice or Scribus, so lost interest. Happy if this issue is closed. |
@geodro I'm also using Silverblue and printing on LibreOffice has worked fine for a long time. It seems you've not selected the right printer. In the LibreOffice dialog I see a Generic Printer, while in your printer settings the printer is called HP Laserjet. Can't you find it in the dropdown list of LibreOffice? |
The dialog in the screenshot is selected. The only options are Print to file and Generic Printer. |
Weird... try undoing permission changes in Flatseal so you're sure you're using the same as me. For example, I don't have |
I've undo the permissions and the behavior is the same. No printer seen. |
Fix for network printer, see : flathub/org.libreoffice.LibreOffice#90
Then @geodro I suggest you ask for help on https://ask.fedoraproject.org/ |
* master: BugFix : default element collection path is wrong snap: Remove framework snap prompt Update translation and add cn chinese ts files Danish translation updated Danish translation Danish translation Add new thumbnail element Flatpak add --share=network Flatpak : add --socket=cups see : flathub/org.libreoffice.LibreOffice#90 Graphics item handler is bigger when overred Add toolbar widget for edit size of handler in diagram editor. Fix Multiple translation in elements Fix Multiple translation in elements Fix segfault. new Analog-In - Module cleanup and upgraded elements modified: lang/qet_nl.qm modified: lang/qet_nl.ts Add Russian translation, thanks "А.Разживин" little modification in hungarian language Fixed typo
I got my Epson network printer to show up in LibreOffice installed via Fedora Linux Flatpak repo on Fedora Silverblue 35 by adding "D-Bus system bus" permission in Flatseal. |
I printed over the network today using LibreOffice in a flatpak with the default settings. At first, I assumed it might not work and I might need to save to a PDF and print that with Evince, as before. But printing from LibreOffice worked without issues here. This is on Fedora Silverblue 36 beta on GNOME 42 in Wayland with the automatic default driverless setting for my Brother printer. D-Bus is not enabled for either user or system. To be clear: This is on the Flathub Libreoffice, not the Fedora Flatpak or the Fedora RPM (as an overlay). I just checked to be certain. I did follow this bug because I had printing issues on Fedora at least a release or two ago. It's probably worth considering having "D-Bus system bus" enabled by default if that's what's necessary to fix printing for people using LibreOffice on various distro + desktop combinations. So it's possible that something in Fedora itself (including GNOME) changed in the 36 beta, or I just got lucky here with the defaults. If not, I wonder why it's working for me without the D-Bus settings and it only works for @ahsodex with system D-Bus access enabled. |
It would be nice to check actual dbus address needed with |
@Erick555: I'm assuming that means @ahsodex should run the following at a terminal prompt and attempt to print, right? Would he need to reset settings first or just go with the D-Bus system bus enabled when running it? flatpak run --log-system-bus org.libreoffice.LibreOffice I just tried it here and it printed fine and there was no output, but things were working correctly for me with default settings, so I guess his printer needs some D-Bus call (I suppose) while mine doesn't? |
Yes this is how I would test this (including removal of session-bus permission). I realized the report comes from Fedora flaptak though not flathub so this is like apples & oranges comparison that may lead us nowhere. |
Where is it supposed to log to? man flatpak-run doesn't say. I tried "flatpak run --log-system-bus org.libreoffice.LibreOffice" without the D-Bus permission, verified only the generic printer shows, then tried it again with D-Bus permission and verified my Epson printer shows and prints. I checked journalctl and only got this:
and this from the terminal:
|
Yeah, agreed. I've specifically chosen to use the Flathub version instead of the Fedora version of LibreOffice. It's nice to get the new releases ASAP. (Huge thanks to everyone who works on making LibreOffice on Flathub a reality! 🥳) @ahsodex: If it's the Fedora Flatpak of LibreOffice, then that's definitely a bug that should be reported (at https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=libreoffice). You might also want to try the Flathub version instead, to see if printing works for you out of the box. (If it is the Flathub version, then you're at the right place.) You can check the version like this: flatpak list | grep libreoffice And if it's from Flathub, results will look like this:
|
My flatpak command doesn't show version info but here's a copy from about:
So it's an older version of LibreOffice too. I uninstalled that and installed the newer version from Flathub repo but now it doesn't show my printer, whether I enable D-Bus session or system, or Printing system permissions or just default. I went back to the Fedora flathub repo version and it's back to showing my printer with just D-Bus system bus permission enabled. I don't really care that much about it, it was a minor annoyance even having to print to PDF and then to my printer since I print so rarely, so I'm good. Thanks! |
I'm running KDE Neon 20.04, with Thunderbird and Firefox installed via Flatpak. I was seeing the issue of no system printers visible in the print dialogue of either Flatpak app. I installed the Flatseal app ( |
My best guess is that, with (Perhaps it's using a mix of the two and doing something akin to getting a sandboxed file path from the File Chooser portal and then attempting to write a sibling file into the containing folder.) |
Using flatseal to give access to DBus seemed to work for me - print dialog went from only having 'to pdf' to having my actual printer in it. |
For me I found out that my printer wasn't defined in For anyone who doesn't know how this works. Open your browser and go to Go to administration at the top, and it will prompt for a username and password, just give it your local credentials. Then click "find printer" or "add printer", (they seem to do very similar things, though find printer gave me a more concise list) and find the model you have in the list. You can then define the friendly name for the printer and it's location. The next step is selecting the driver. You might need to select the brand and model, but after that try to find a driver that's named after your printer. I had to try a couple of different drivers before my printer worked correctly. Once you find the driver you can click "set default options" and it will take you to a page to do so. Once you're done click "set default options" again and it will generate the changes into the Once this is set any app with the Hope this helps! |
I'm running flatpak (v 1.4.0-1~xenial) in LinuxMint 18.3 on my home PC.
I use CUPS to print from my home pc to a usb printer attached to my home server - both run LM 18.3.
I have installed the following flatpak apps:
My issue: Neither of these 2 apps sees my system printer. Instead, they just list a 'Generic Printer'. See pasted png image:
The drop-down list doesn't reveal any other printers.
My work-around - first export the file to pdf and then print from a non-flatpak pdf viewer!
So, does anyone know how you get a flatpak app to see printers that all the non-flatpak apps see?
The text was updated successfully, but these errors were encountered: