LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Firefox 3 cannot print to CUPS printer (https://www.linuxquestions.org/questions/linux-desktop-74/firefox-3-cannot-print-to-cups-printer-655002/)

rnturn 07-10-2008 10:46 PM

Firefox 3 cannot print to CUPS printer
 
Okay... I decided to download Firefox 3 after reading all the glowing reviews. All it's cracked up to be? So far, except for one thing: I find that printing doesn't work.

Environment: OpenSUSE 10.3 with latest patches. I removed the installed Firefox (2.0.0.14) using YaST. Downloaded the Firefox 3 archive. Unpacked it under /opt/app (local choice). Created symbolic link in /usr/local/bin pointing to the binary in /opt/app/firefox. Created a "firefox.conf" file in /etc/ld.so.conf.d containing the path to the Firefox shared libraries and ran ldconfig. (The system has not been rebooted since the above was done.) Tweaked my panel launcher to point to the new location. Firefox launches just fine. Attempting to print, though, gives me the normal printing popup with the "Print" button grayed out when the CUPS printer is selected as the target. If I select "print to file" the "Print" button is ungrayed.

Any ideas? Am I experiencing another ".0" release problem? :)

TIA

--
Rick

amani 07-11-2008 05:35 PM

Reboot your system. I did not have this problem in a similar scenario on my laptop. Otherwise printing with CUPs from FF-3 is ok on Kubuntu64-8.04

rnturn 07-13-2008 10:29 PM

Quote:

Originally Posted by amani (Post 3211701)
Reboot your system.

Did that. No joy.

Any other ideas?

Firefox 2.0.0.15 might be a better choice. At least I could print when I was using 2.0.0.x.

--
RT

loenen 07-22-2008 08:03 AM

same problem here
 
I have exactly the same problem. There used to be a way to change the printer settings, but I also can not do that anymore. Suggestions anyone?

mogrady 08-02-2008 03:06 PM

I'm running PCLinuxOS 2007 and had the same problem with FF 3. I fooled around and found a workaround but I can't remember it exactly. It was print to file, or save page in some document, something along those lines. Then it printed. I'm sure if you put a little time in you can find it. I was lazy and just switched to another browser, Opera, and forgt about the problem solution.

Good Luck, MIchael

meetscott 08-31-2008 12:57 AM

I have a similar issue on 2 different Slackware 12.1 boxes running Firefox 3.0.1. I can't print on either of them and *all* other applications are printing just fine. The only option that is available is the print to file.

This is ridiculous. Firefox 3 is great on my other systems, like my XP box at work. What the hell is going on? Does anyone know how to print on Linux with Firefox 3?

And yes, I too can print to a Postscript file and then issue lpr filename.ps to print. But why should I have to do that? No one else in my household is going to know how to use the printer when they are web browsing.

We *have* got to figure this out.

rnturn 08-31-2008 01:17 AM

Quote:

Originally Posted by meetscott (Post 3264981)
We *have* got to figure this out.

Personally, I'm hoping the Firefox coders can figure this out. I'm with you on it being ridiculous that one might have to print to disk and then send that file to the printer, especially when the resulting PostScript sent to the printer results in a horrible looking rendering of the web page. I can't blame it on CUPS (as awful as CUPS is IMHO) since all the other browsers and all other applications installed on the system print perfectly.

meetscott 09-01-2008 03:32 AM

Quote:

I can't blame it on CUPS (as awful as CUPS is IMHO)
I don't know much about CUPS because I don't use it. Slackware has kept lprng in the "pasture" for the last few releases and even after it's gone from the distribution, I might still install lprng because I like it and it works. I also know a lot about it and I don't mind writing printcap files. It's stable as a rock, it never needs to be restarted, it network prints very well, and it integrates nicely with Samba. In short, I only have to have one printer hooked into my server to have *all* of my computers print without any issues, even XP laptops that come to visit once in a while can use it.

I also use this to make cheap network enabled printers for people. I find a throw away computer, install Slackware and make it available through Samba and lprng to XP networks. It can even be a Windows only printer! You can't print from the Slackware computer on these set-ups but *every* Windows computer can send it through their driver and through the network to the Slackware box which is hooked to the printer.

It's pure bullshit that I can do all this cool stuff with Linux printing and I can't print from my local Firefox web browser! At least we know it has nothing to do with CUPS vs lprng because that works on both of our systems.

We either have a library missing from our distributions that Firefox is looking for or Firefox 3 is broken.

meetscott 09-08-2008 02:38 AM

Okay guys.... this is fixed!

Create this file:
/etc/gtk-2.0/gtkrc

Add this line to it:
gtk-print-backends = "lpr,file"

These options will then "appear" in the print dialogue for Firefox the next time you restart it. This is what works for lprng print systems. I've never used CUPS, but I imagine that lpr works on CUPS systems too, so you should be good.

Thanks to Morten L. on the usenet group alt.os.linux.slackware for helping me solve this.

mogrady 09-08-2008 06:05 PM

Thanks for the tip meetscott.

I am kinda terminal or konsole challenged you might say. I still have not mastered the command line stuff. If you could post a step by step set of commands it would be very helpfull.
Thank You, Michael

loenen 09-09-2008 04:50 AM

great, but...
 
Quote:

Originally Posted by meetscott (Post 3272971)
Okay guys.... this is fixed!

Create this file:
/etc/gtk-2.0/gtkrc

Add this line to it:
gtk-print-backends = "lpr,file"

These options will then "appear" in the print dialogue for Firefox the next time you restart it. This is what works for lprng print systems. I've never used CUPS, but I imagine that lpr works on CUPS systems too, so you should be good.

Thanks to Morten L. on the usenet group alt.os.linux.slackware for helping me solve this.

Thanks a lot, this works great, also on systems running cups.
I just have one more minor question. I always like to print through kprinter since it allows me to select my printer and print options. This is easily done by choosing lpr and replacing the command with "kprinter", however, firefox does not remember this change. I tried changing it in the about:config, but my changes are removed when I print again. Does anybody know a way to permanently change the print command from lpr into kprinter?

meetscott 09-11-2008 01:31 PM

Quote:

Thanks for the tip meetscott.

I am kinda terminal or konsole challenged you might say. I still have not mastered the command line stuff. If you could post a step by step set of commands it would be very helpfull.
Thank You, Michael
You should take the time to learn a command line oriented editor. It will be well worth your time. At the risk of starting a flame war, I would recommend vi because it's available on *every* Unix system I've run into for the last 15 years.

For now you can dump directly to a file like this:
- Change to the root user with su -
- cd /etc/gtk-2.0
- cat > gtkrc
- Then type in or paste in the line I specified, 'gtk-print-backends = "lpr,file"', without the single quotes of course.
- Ctrl + d will end the file and write it.

Quote:

Thanks a lot, this works great, also on systems running cups.
I just have one more minor question. I always like to print through kprinter since it allows me to select my printer and print options. This is easily done by choosing lpr and replacing the command with "kprinter", however, firefox does not remember this change. I tried changing it in the about:config, but my changes are removed when I print again. Does anybody know a way to permanently change the print command from lpr into kprinter?
I'd try adding "kprinter" in place of "lpr" like this:
gtk-print-backends = "kprinter,lpr,file"
or like this:
gtk-print-backends = "kprinter,file"

Try it and post back your results. It might help someone else with the same issue. I'd try the first one I posted then the second. My theory is that all 3 will show up in Firefox's Print Dialogue if all 3 are in the file. I think the first one will be the default.

loenen 09-12-2008 03:05 AM

Quote:

Originally Posted by meetscott (Post 3277413)
I'd try adding "kprinter" in place of "lpr" like this:
gtk-print-backends = "kprinter,lpr,file"
or like this:
gtk-print-backends = "kprinter,file"

I already tried that, it doesn't work. What I understood from the documentation of gtk is that the options basically are lpr, file and cups. So I am looking or a way to cheat it. A way to make firefox use the command "kprinter -c" when you are printing to lpr.
Like I said it is a small issue, typing kprinter when you want to print is already much better then having toprint to a file all the time.

Does anybody have a(nother) brilliant idea?

meetscott 09-12-2008 09:52 AM

Firefox 3 cannot print to CUPS printer
 
Quote:

My theory is that all 3 will show up in Firefox's Print Dialogue if all 3 are in the file. I think the first one will be the default.
So much for that theory.

I'm sure there are some people who have the same sort of issue, even with lprng. For example, they might want another default printer queue to come up instead of default lpr. For me, it would be something like:
lpr -Plexmarkz52 filename.

The solution you find is worth knowing, since Firefox is obviously not using the usual files to find out about available printers. I would like to see them use /etc/printcap in their print dialogues or at least integrate with KDE's print settings. If this solution is not programmatically possible, then just being able to set it once and keep the setting would be a minimum expectation.

I suppose this is some kind of limitation with the GTK print system and some Firefox dev would school me about how GTK hasn't been used by too many programs for a "standard integrated linux style print dialogue" and using it is good because it fits the local environment the way Windows print systems do for the Windows environment... except it DOESN'T work. We're still back to editing cryptic files on the command line, so I'm inclined to say this was a poor choice.

If I find something on setting the default print queue, I will post back the solution. Anyone else should do the same.

Thanks to everyone for the great feedback. This issue was very upsetting to me.

Swynndla2 09-25-2008 08:36 PM

I got it to work via kprinter with a bit of a hack (and I don't know what side effects it will have).

I did as root:
Code:

echo 'gtk-print-backends = "lpr,file"' >/etc/gtk-2.0/gtkrc
mv /usr/bin/lpr /usr/bin/lpr.old
ln -s /usr/bin/kprinter /usr/bin/lpr

Now when ff tries to use lpr, it gets tricked into using kprinter instead.

I also did this so that it would go straight to the default printer (cups menu):
Open ff and go to "about:config".
Right-click anywhere in the white space, then click on "New --> Boolean" to add a new Boolean entry. Type:
print.always_print_silent
and set its value to "true"


All times are GMT -5. The time now is 09:41 PM.