No 'Print to LPR' in Firefox print dialog

At some point after upgrading Firefox I noticed that the print dialog no longer has a 'Print to LPR' option, only 'Print to File'. If I go back to firefox-esr, the 'Print to LPR' option is present. I originally noticed this running FreeBSD10.4, then I upgraded to 11.1 and I still see the issue. I'm using lpd, not cups, if it's relevant. I've searched but haven't found anything that would explain what I'm seeing. Anybody have any ideas?
 
Please don't post things multiple times. If it's in the wrong place a mod will move it. No need to post the same thing multiple times.
 
My guess is that lpr support is removed in GTK3. Firefox-ESR still has GTK2 support and this supports lpr. In GTK3 you need to use CUPS. Same thing with Qt4 > Qt5. I'm not happy with this development either.
 
Marco, thanks for your reply. Based on some very old Linux threads that I saw where bugs in GTK caused similar issues, I think you are most likely correct. I have never had much luck with CUPS. This basically means that native LPD is kind of useless. So is the only option to use CUPS?
 
Hmmm, you are supposed to be able to configure the gtk3.0 printing backends in ~/.config/gtk-3.0/settings.ini by adding a comma separated list of the backends you want
Code:
gtk-print-backends="file, cups, pdf, lpr"
but if I put anything at all in there, I don't even get print to file.
 
My guess is that gtk3-print-backends is not included. I don't see it in ports. This seems like an "installation of ports and packages" issue, not a peripheral hardware issue.
 
In usr/local/lib/gtk-3.0/3.0.0/printbackends, there are libprintbackend-cups.so libprintbackend-file.so & libprintbackend-lpr.so

So it looks like it's there, so why can't I configure it?
 
So is the only option to use CUPS?
In addition to using firefox-esr, you can print to pdf/postscript file and then use print/gv or the command line to print the file. Currently, graphics/xpdf will also bring an lpr compliant print dialog. The latest xpdf version, not yet in FreeBSD, moved from the motif toolkit to Qt5
 
Last edited:
I'll go to my point: try to do the simplest.
Which version are you using?
Do
Code:
 firefox --version
And check that you have Mozilla Firefox 59.0.2
My next solution, I don't want to post it...because even I don't have idea of how you upgraded the system. Perhaps firefox isn't in its latest version.
 
side question: how much memory Firefox consume without any open tabs? Sum all Firefox processes when you start the program without opening any tab.
 
My guess is that lpr support is removed in GTK3. Firefox-ESR still has GTK2 support and this supports lpr. In GTK3 you need to use CUPS. Same thing with Qt4 > Qt5. I'm not happy with this development either.

Thanks for the bad news. :/

I used to have a scheme, to use qt4 for vlc, and -as You say- gtk2 for firefox, because otherwise I cannot avoid having it pulling in the dbus stuff. And I dont want dbus, neither cups, neiter gconf2.
At this year's portbuild, it looked like this is hardly possible anymore. :(
Therefore, I am currently reluctant to install the freshly built ports, as there seems to be trouble ahead.

Concerning the topic: I had to cope with cups once on a laptop, and I found it somehow possible to get cups properly feeding jobs to my distributed lpd installation, so that cups becomes what it ought to be: just another superfluous in-between.
Another idea: the firefox used to have lots of printer configuration stuff in it's about:config page. It might be possible that the lpd drivers are still there, only not configured. But thats just an idea, for now.
 
Eventually I try to use Qt5 and keep Gnome related stuff out as much as possible, GTK2 and Qt4 are getting really old and will be deprecated soon anyway. Qt5 stuff takes more time to build but doesn't have unnecessary dependencies like GTK/Gnome.

Only thing that I can't get rid of is Dbus, and the only application with GTK3 I use is Firefox. Printing with lpr is something I miss a little bit, but my solution is just to print to file/pdf and send it to my printer with Xpdf3.
 
sgunn, I made the same observation recently but figured I was just losing my mind (well, that could still be true).

The work wblock@ did in the Handbook is so nice, that I completely forgot about CUPS (which always seemed to me like way too much "monkey motion" to sign up for, just to get out of buying a slightly more expensive Postscript printer--though I'll bet that even economically, I've come out way ahead with my LaserJet 1320n relative to any ink-jet, since it's had zero problems in over ten years).

Yeah, and it just so happens that Firefox is one of the few programs I sometimes print from.
 
From everything I read, it does seem like you should be able to modify the gtk3 settings.ini to tell gtk to show lpr, and the FreeBSD gtk3 library does seem to include the lpr-backend, and Firefox behavior does change when you change the print backend settings for gtk. It just doesn't work. This isn't just an issue for Firefox, it's an issue for any application that uses gtk3.0 if you're using lpd.

I'm using Firefox 60.0 if it matters.

Robroy - I hadn't seen the updated lpd page in the handbook, he really did do a nice job. It contains much of the information that I painfully figured out many moons ago.
 
I sent email to the port maintainer, and he was kind enough to respond and he looked up that there was an upstream change to Firefox to remove 'Print to LPR'. He sent me the patches, and when I get a chance, probably tomorrow, I'll try to build Firefox to confirm.
 
I sent email to the port maintainer, and he was kind enough to respond and he looked up that there was an upstream change to Firefox to remove 'Print to LPR'. He sent me the patches, and when I get a chance, probably tomorrow, I'll try to build Firefox to confirm.

Do you have a set of patches which restores the 'print to lpr' functionality?
 
Back
Top