Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Rep:
Firefox printing produces garbled output
I've noticed in the past week or so that any time I print something from Firefox I wind up with a pile of paper that has either nothing on it, is a mess of graphics characters, or a combination of the two. No other applications seem to have problems printing. I can successfully print from gedit, OOWriter, OOCalc, as well as other browsers (well, I'm not 100% certain of Opera yet). Output from LaTeX/dvips and even an old handcrafted PostScript file can be printed correctly with "lpr".
I've tried printing to a file from all the browsers on my system and they all produce output viewable with "gv" except Firefox.
So... I suspect that something's gotten horribly misconfigured in my FF settings.
Q: What does one do to go back to FF defaults without blowing away the entire browser configuration? I'm not keen on losing all the browser settings if I can possibly avoid it. Especially bookmarks and stored passwords (though those could be written down, I guess, and re-saved).
This problem started with FF 3.5.4 (if memory serves) that I had gotten from OpenSUSE's download site. Today I uninstalled that and grabbed a copy of the 3.6.3 tar archive and installed that. It didn't help so I suspect it's a configuration problem that 3.6.3 has inherited from the old settings.
One thing I will try as soon as I can is to login into the system as a different user and see if that account is able to print correctly from FF. I will post the results as soon as I attempt that. In the mean time, any tips would be greatly appreciated.
TIA
--
Rick
On a related topic: I was looking around in the "about:config" page and noticed that there are definitions for ancient print queues that no longer exist on our network. I can see no way to remove these. Is there a way to remove these unneeded configuration settings?
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
Through any number of Firefox versions, I've never had a problem with printing and I might suggest that it's not Firefox, it's your system printer configuration. If you're using CUPS, life is easy -- simply open CUPS in a browser and look at the printer configuration(s) (particularly the default configuration, the one that you'll print to if you "lp filename"). If you're not using CUPS, start checking your printer models and clean out dead configurations.
Firefox will spool to your printer system, particularly to the default printer. If you're getting gobbledegook, you're (maybe) sending PostScript to a non-PostScript printer (or HP stuff to a PostScript printer or whatever) and you may need to pass through a utility to straighten things out. That is simple with CUPS, more difficult with lp or lpr.
Back to basics (dang those basics), pretty much every printer needs a "model" of some sort to get from what you've got to what you want. In the lp family you have to create or edit the model files, in CUPS you simply select the printer model from a list (or, worst-case, the PPD files that come with the printer CD-ROM). lp family: hard; CUPS: easy.
Abother thing you can do is select Page Setup in the File drop-down menu in Firefox and see what's what; choose a printer from the Format For selection and see if that helps.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Original Poster
Rep:
Quote:
Originally Posted by tronayne
... it's not Firefox, it's your system printer configuration.
That doesn't explain why non-Firefox printing works just fine.
Quote:
If you're using CUPS, life is easy -- simply open CUPS in a browser and look at the printer configuration(s) (particularly the default configuration, the one that you'll print to if you "lp filename"). If you're not using CUPS, start checking your printer models and clean out dead configurations.
Clients are using CUPS. The print server itself is using LPRng. Why? To avoid having every print job -- no matter how small -- into a one-page-per-minute pain in the neck. All of the workstations running CUPS have the printer defined as the HP LJ1200 that it is.
I've double checked the CUPS configuration (using YaST) on the workstation where FF is not printing correctly. It looks the same as the workstations where FF printing is working.
Quote:
If you're getting gobbledegook, you're (maybe) sending PostScript to a non-PostScript printer (or HP stuff to a PostScript printer or whatever) and you may need to pass through a utility to straighten things out. That is simple with CUPS, more difficult with lp or lpr.
At one time I was pretty good at writing filters for use in printcap configurations. I'm glad to not be doing that any more.
It is FF that is producing the bad output. I can stop the print queue and examine the contents of the spool directory. The "file" command sees all the queued print jobs as PostScript level 3 files. Only the output produced by FF cannot be viewed using "gv". I'd say that exonerates all the applications except FF. Especially since I can print from FF from other systems. I just cannot print via FF from my primary workstation.
I'm still looking at this as an FF settings corruption of some kind.
preceded and followed by some, well, lots of, other stuff.
Have you tried blowing away ~/.mozilla/firefox and starting from scratch? Save your bookmarks file (at least) then just blow it away, restart Firefox and set it up again? This may be overkill, though.
Do you have a default printer defined in the environment; e.g.,
If you're not using CUPS on that box, try defining LDDEST, which will get handed to Firefox as the printer. And, if it's a network printer, make sure that it's in /etc/hosts with the address and name; e.g.,
Code:
192.168.1.15 InkJet
then check and see what Firefox is seeing with the drop-down described previously.
A final thing you may -- may -- want to do is install the latest edition of HPLIPhttp://hplipopensource.com/hplip-web/downloads.html. HPLIP provides support for pretty much every printer they've made and can save you a bunch of trouble.
and lpr just hands it to CUPS (or spools it out to the actual device).
Yeah, I've noticed that Firefox doesn't give you much in the way of printer control. It does seem to pull in a lot of information about printers/queues and store it in its configuration. Like I mentioned in the OP, there's information in about:config regarding print long deleted print queues. I'm thinking that FF may be using some corrupted information. BTW, I even tried adding the "-l" switch to the "lpr" command to try and prevent any further tweaking of the print output. It was no help.
Quote:
Have you tried blowing away ~/.mozilla/firefox and starting from scratch? Save your bookmarks file (at least) then just blow it away, restart Firefox and set it up again? This may be overkill, though.
Not yet.
Quote:
Do you have a default printer defined in the environment; e.g.,
<snip>
If you're not using CUPS on that box, try defining LDDEST, which will get handed to Firefox as the printer.
<snip>
then check and see what Firefox is seeing with the drop-down described previously.
I have a "PRINTER=" environment setting and Firefox always seems to use that printer as the default.
I still want to try printing from a different account on the system where FF is producing garbled print jobs. If that works, I'll try clobbering the FF directory (well, actually, renaming "~/.mozilla/firefox" to "~/.mozilla/firefox.saved") in my primary user account and see what effect that has.
Sure would be nice for FF to have some sort of "return to Firefox defaults" switch. (Though I suspect someone would complain that such a switch blew away their painstakingly customized settings so I can understand why it doesn't exist.)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Original Poster
Rep:
[Solved] Firefox can now print correctly
Well, I finally bit the bullet and renamed the ~/.mozilla/firefox subdirectory and started with a fresh set of configuration files. I was able to print without all the garbage output and the wasted paper ($$).
The biggest hassle is that there is no way, apparently, to import the saved passwords from the previous set of configuration files -- copying the SQLite file with that information didn't work -- so I wound up renaming the Firefox subdirectories so that I could run the previous incarnation and write them down. Then, after renaming things back to the new configuration directory, I visited each site and logged in by hand, and saved the passwords in Firefox again. Good thing I don't have more than a dozen or so sites that I'd saved login information so the brute force method wasn't too horrible of a process. I'm sure there's a better way to transfer that information. (Note: I can see a nasty security problem if that process is too easy.) Perhaps giving one the option of using a password wallet application would help, especially for those of us that use multiple browsers There's probably a plug-in that does that and maybe I'll find it one day.
While I'm not too crazy about having to recover from the printing problem in this way, there was a side benefit: all of the ancient print queues that no longer exist on our network got cleaned out of the Firefox configuration files as a result of starting with a fresh set. There really ought to be a way of deleting printers from Firefox. Imagine what a pain in the neck it would be for someone working on a corporate network with a large number of printers and having them all show up in the FF print drop-down. Ugh. A means of selecting only a few printers from the complete list -- with a checkbox to "show all" when you need to see them -- would sure be handy. (A handier feature, IMHO, than a delete button on each and every tab but what do I know. )
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
You could maybe exit Firefox then edit the prefs.js file and delete everything having to do with any printers (probably want to back up the file first, though) then restart Firefox; might work and might not lose your other stuff that way...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.