LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-07-2010, 04:10 PM   #1
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
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?
 
Old 05-08-2010, 07:23 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
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.

Hope this helps some.
 
1 members found this post helpful.
Old 05-08-2010, 11:40 AM   #3
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by tronayne View Post
... 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.

Any other ideas?

--
Rick
 
Old 05-08-2010, 02:29 PM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Thing is, there just are not many printer settings in Firefox; it pretty much just hands off the print job to the print utility (like this):
Code:
print.print_command;lpr ${MOZ_PRINTER_NAME:+-P"$MOZ_PRINTER_NAME"}
and lpr just hands it to CUPS (or spools it out to the actual device).

In prefs.js, my default printer is defined as "InkJet," a HP Business Inkjet 2280tn (PostScript, network card) and the lines in prefs.js look like
Code:
user_pref("print.printer_InkJet.print_bgcolor", false);
user_pref("print.printer_InkJet.print_bgimages", false);
user_pref("print.printer_InkJet.print_colorspace", "default");
user_pref("print.printer_InkJet.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}");
user_pref("print.printer_InkJet.print_downloadfonts", false);
user_pref("print.printer_InkJet.print_edge_bottom", 0);
user_pref("print.printer_InkJet.print_edge_left", 0);
user_pref("print.printer_InkJet.print_edge_right", 0);
user_pref("print.printer_InkJet.print_edge_top", 0);
user_pref("print.printer_InkJet.print_evenpages", true);
user_pref("print.printer_InkJet.print_footercenter", "");
user_pref("print.printer_InkJet.print_footerleft", "&PT");
user_pref("print.printer_InkJet.print_footerright", "&D");
user_pref("print.printer_InkJet.print_headercenter", "");
user_pref("print.printer_InkJet.print_headerleft", "&T");
user_pref("print.printer_InkJet.print_headerright", "&U");
user_pref("print.printer_InkJet.print_in_color", true);
user_pref("print.printer_InkJet.print_margin_bottom", "0.500000012107193");
user_pref("print.printer_InkJet.print_margin_left", "0.500000012107193");
user_pref("print.printer_InkJet.print_margin_right", "0.500000012107193");
user_pref("print.printer_InkJet.print_margin_top", "0.500000012107193");
user_pref("print.printer_InkJet.print_oddpages", true);
user_pref("print.printer_InkJet.print_orientation", 0);
user_pref("print.printer_InkJet.print_pagedelay", 500);
user_pref("print.printer_InkJet.print_paper_data", 0);
user_pref("print.printer_InkJet.print_paper_height", "279.40");
user_pref("print.printer_InkJet.print_paper_name", "na_letter");
user_pref("print.printer_InkJet.print_paper_size_type", 1);
user_pref("print.printer_InkJet.print_paper_size_unit", 1);
user_pref("print.printer_InkJet.print_paper_width", "215.90");
user_pref("print.printer_InkJet.print_plex_name", "default");
user_pref("print.printer_InkJet.print_resolution_name", "default");
user_pref("print.printer_InkJet.print_reversed", false);
user_pref("print.printer_InkJet.print_scaling", "  1.00");
user_pref("print.printer_InkJet.print_shrink_to_fit", true);
user_pref("print.printer_InkJet.print_to_file", false);
user_pref("print.printer_InkJet.print_to_filename", "/home/trona/mozilla.ps");
user_pref("print.printer_InkJet.print_unwriteable_margin_bottom", 56);
user_pref("print.printer_InkJet.print_unwriteable_margin_left", 25);
user_pref("print.printer_InkJet.print_unwriteable_margin_right", 25);
user_pref("print.printer_InkJet.print_unwriteable_margin_top", 25);
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.,
Code:
export LPDEST=printer_name
and, maybe
export PRINTER=printer_name
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 HPLIP http://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.

Hope this helps some.
 
1 members found this post helpful.
Old 05-09-2010, 11:19 AM   #5
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by tronayne View Post
Thing is, there just are not many printer settings in Firefox; it pretty much just hands off the print job to the print utility (like this):
Code:
print.print_command;lpr ${MOZ_PRINTER_NAME:+-P"$MOZ_PRINTER_NAME"}
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.)

Later...

--
Rick
 
Old 05-10-2010, 08:03 AM   #6
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
You could try setting up a new Firefox profile and see if that solves the problem. See http://support.mozilla.com/en-US/kb/profile
 
Old 05-10-2010, 08:20 AM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
[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. )

--
Rick
 
Old 05-10-2010, 10:47 AM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
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...

Hope this helps some.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fdisk -l produces no output jakubi Debian 13 03-02-2011 09:50 AM
Printing from the web produces garbage mikieboy Linux - Hardware 1 01-10-2007 11:13 AM
c thread program produces no output kpachopoulos Programming 7 10-14-2005 09:11 PM
less produces no output tvynr Linux - Software 14 06-09-2005 11:06 PM
lirc's mode2 produces no output under Mandrake 10 foxostro Linux - Software 0 10-12-2004 08:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration