Firefox does not list CUPS default printer as first printer

Martin Jacobs martin.jacobs at nexgo.de
Thu Sep 17 12:05:04 PDT 2009


It's solved.

> I'm running CUPS 1.3.11 with two HP printers. List of configured printers shows 6 names, 5 times a PhotoSmart C7280 in different default configurations (quality, duplex) and one old Deskjet. One of those PhotoSmart printers is marked as default printer. CUPS web frontend lists that printer as default printer. There are no local lpoptions files.
>
> Firefox (own compilation) lists all 6 CUPS printers and one Postscrit/default. It loads the only existing library libcups.so.1 existing on my machine on runtime.
>
> But CUPS default printer is not presented as first entry. I've checked Firefox' source
>
>     mozilla/gfx/src/psshared/nsPSPrinters.cpp
> ...

A little bit astonishing: Firefox, Thunderbird, but Staroffice 8 too, respect environment variable PRINTER and take a queue matching that name as default printer/queue. A deep look into mozilla sources gives an explanation: if mozilla is compiled with --enable-xprint, source code in /gfx/src/xprintutil/xprintutil.c reads environment variables XPRINTER, PDPRINTER, LPDEST, PRINTER (in that order).

If your firefox-bin or components/libgfxxprint.so file is linked against libXp.so.6 it looks for those environment variables.




More information about the cups mailing list