Firefox/Thunderbird Printing Issues on Linux Platforms
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.
Firefox/Thunderbird Printing Issues on Linux Platforms
I used the in-built search engine to try and find discussions relating to printing issues with both Firefox and Thunderbird, but no articles were returned, which seemed to answer the question. I have asked this same question on mozillazine.org, but have not had any luck. In fact, I was advised to post the question to a Linux forum; naturally this one came to mind first.
I have just installed a printer on my Linux system (ProMEPIS, if anyone is interested), and neither Firefox, or Thunderbird are connecting with the print device.
Generally I would consider hardware or driver issues before looking at a specific application, but the printer responds to test pages, Konqueror, OpenOffice, and all other applications just fine.
Is this a common issue? Am I missing something in the configuration of the browser? Should I post this question in the Thunderbird forum too?
You havn't found any other messages about this because it is not a common problem at all - firefox/thunderbird and so on should automatically print to whatever is on lp0. (just asking - can you do a print preview OK?)
You could try looking in:
file > print > properties
this should show you the print command that is being used.
Also check the print server/manager or whatever processes the print jobs - what happens when you try to print? The printer itself shouldn't be an issue unless it cannot handle postscript.
Originally posted by Simon Bridge
[B]You havn't found any other messages about this because it is not a common problem at all - firefox/thunderbird and so on should automatically print to whatever is on lp0. (just asking - can you do a print preview OK?)
Simon, thanks for responding. This has been quite a puzzle for me.
To answer your question, yes. I can print test pages from the print manager (and all other applications on the system) just fine. It seems to be only Firefox and Thunderbird that have the problems.
Quote:
Originally posted by Simon Bridge
You could try looking in:
file > print > properties
this should show you the print command that is being used.
I'm not sure if I should post the scripts or commands here or not, so I chose to err on the side of caution.
I can clearly see the commands being used by the browser, but I am not experienced enough to know if they are correct. Nor am I able to find the command line in the print manager.
Would you mind giving me a little more help on this?
OK - this is hard to do by remote control ... "caution", BTW, indicates that you should post the scripts etc.
I'll need to know specifically about your printer setup and what firefox thinks it is. Show us what commands firefox is running to print - and tell us about your printer setup... like: make and model of printer, wether it is network or parralell or whatever.
You could try looking at the printer options in apps that print OK, and comparing those with the firefox options -this should provide a clue. If you do this, please tell us what you find (or, if you don't find anything - post the stuff you compared so we can have a look too!)
Thanks for the interest and your offers to help, Simon.
Quote:
Originally posted by Simon Bridge I'll need to know specifically about your printer setup and what firefox thinks it is. Show us what commands firefox is running to print - and tell us about your printer setup... like: make and model of printer, wether it is network or parralell or whatever.
The printer is HP 5500 series (printer, scanner, fax, copier etc) and is connected to the computer through a 4-port USB hub. Therefore, the printer is not parallel, but USB. I'm also using the CUPS platform.
The command being used by Firefox is:
Code:
lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}
Firefox print dialog box describes the print device as: PostScript/hpoffice (hpoffice is the name I gave the device when I installed it).
Quote:
You could try looking at the printer options in apps that print OK, and comparing those with the firefox options -this should provide a clue. If you do this, please tell us what you find (or, if you don't find anything - post the stuff you compared so we can have a look too!)
The applications that are printing successfully? In a word, everything. The only exceptions I've been able to find so far are Mozilla-based products (i.e. Firefox, Thunderbird, Mozilla Internet Suite), and Adobe Acrobat Reader 5.0.
Unfortunately, I am unable to find the commands that the other apps are using, but they seem to be using the same print device (i.e. hpoffice).
I hope there is enough in the above information to be able to progress.
OK: lpr -P <printer name> <file> is the correct command.
the MOZ_PRINTER_NAME:+'-P' is setting other options besides "-P" for print. The next reference is the printer name to print to. Presumably mozilla privides the "file" to the standard input or appends the correct name later (since it is not under user control).
It would appear that the variable MOZ_PRINTER_NAME is looking in the wrong place - I've been having a go trying to extract it but I'm having difficulty there. Striktly speaking you should be able to replace the variable names with the exact printer. Take the name of the printer queue off the print manager and insert it in where the printer name goes. (see man lpr for more) Of course, using another app to do the printing may also work
You may also want to try printing to (ps) file and viewing/printing that ... this will tell you more about where the fault lies.
If you leave off the -P MOZ_PRINTER_NAME (i.e. stick in just lpr) then no printer name will be given to lpr and it will print to the default printer. If your hp5500 is set up as the system default then that is where it should go.
Last edited by Simon Bridge; 04-29-2005 at 09:53 PM.
Thanks again for the input. You're helping me make progress here.
Here's some information that did not occur to me to give you in the beginning.
I have been logged in as my regular user, and not as root. I discovered last night, quite by accident, that when I am logged in as root, I can print with the Mozilla apps. The Mozilla apps that I use with root access use the print command that I pasted earlier. But, when I end the root session and log back in as my regular user, the Mozilla apps no longer are able to print.
When I logged back in as the regular user, I replaced the command as suggested by rshaw, and the print attempts were successful. However, when I restarted the machine, I found the the kdeprinter command had been replaced with the original Mozilla command I pasted to the forum. My guess is that the regular user is not able to make changes that are permanent.
Now, when I check with the print manager, the permissions are "allow all users", so I don't understand why Mozilla apps are prining in root, but not as the regular user.
When using the kprinter --stdin command to print, you'll probably have to remember not to use Mozilla-print's interface for things like multi-copies and so on. You'd also more or less have to be using KDE.
Sonomatek: Yeah - the bit about root would have been helpful. Try looking at the permissions in the lpr command. However, if your are running KDE - the kprint --stdin command should fix everything like the noob says, and give you more flexability than mozprint does.
(Aside: Waiheke Island - pronounced "why-HIKKY" - is in the South Pacific, in the main harbour of Auckland City, New Zealand. It's difficult to know how to reply to such questions tho, when you havn't stuck your own location in your profile. Hint hint. )
Simon, sorry to take so long to reply. I've been busy as all get out.
Quote:
Originally posted by Simon Bridge
(Aside: Waiheke Island - pronounced "why-HIKKY" - is in the South Pacific, in the main harbour of Auckland City, New Zealand. It's difficult to know how to reply to such questions tho, when you havn't stuck your own location in your profile. Hint hint. ) [/B]
I was born and raised in Sydney; living there for the first 37 years of my life. Nowadays I am a U.S. citizen located in California, U.S.A.
I promise not to make any Kiwi jokes, if you promise not to make any Aussie jokes ;-)
Now, at the top of the page is a button marked User CP - you can enter your location and distro in there and it'll show up in the sidebar like mine. It can really help you get good replies around here. Sometimes, if someone is close to you, you can end up with technical assistance at your doorstep - this community thing can be like that.
I have received a motherboard, cpu and a modem this way ... back when I was starting out and managed to appall someone with my archaic system.
It is a good idea to check the stderr file for your login session.
If a mozilla program can not print then it outputs an error to
stderr. You just need to see it. For example with gnome you
look in $HOME/.xsession-errors. This tip applies to much
more than just mozilla based programs.
A common cause could be that /var/tmp is not writeable.
If that is the case then kprint or any other command wont
make any difference.
You know that cups and lpr were working. So it had to be
the mozilla programs. Well done for working out what you
did.
I'm postign to say I have the same problem as Sonomatek. I cannot print from firefox (didn't test thunderbird) when I'm logged in as a regular user. When I login as root, pirinting works fine.
I'm using Firefox 1.0.4 on slackware linux, with the printer command: lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}. But I tried with kprinter, and that also doesn't work.
Printing works fine from any other application on my system, even acrobat reader. The only problem seems to be with mozilla products.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.