Monthly Archives: February 2012

Fix Firefox Empty Printer List on Debian Squeeze 64-bit

Firefox icon

I recently installed Debian Squeeze (6.0.3) 64-bit, running XFCE.  While using Firefox 9 (and 10), I found that my CUPS printers weren’t showing up in Firefox’s print dialog box.  All I wanted to do was print to PDF! And a nearly identical configuration on my 32-bit Debian Squeeze setup was working just fine.

Running Firefox from the bash command line pointed me in the right direction by generating “ELFCLASS64” errors like the following:

Gtk-Message: Failed to load module “canberra-gtk-module”: /usr/lib/gtk-2.0/modules/ wrong ELF class: ELFCLASS64
(firefox:13517): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/ wrong ELF class: ELFCLASS64
(firefox:13517): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/ wrong ELF class: ELFCLASS64
/usr/lib/gio/modules/ wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/
LoadPlugin: failed to initialize shared library /usr/lib/gnash/ [/usr/lib/gnash/ wrong ELF class: ELFCLASS64]

Thanks to some reading, and thanks to Oleg Cherkasov’s comment #22 here, I was able to get it working.  Specifically, the following export just prior to launching Firefox seems to do the trick:

export GTK_PATH=/usr/lib32/gtk-2.0/

I presume this overrides the default GTK settings by pointing instead to the lib32 GTK. Works for me!

(Mind you, IceWeasel 3.5.x was able to find the printers on its own without this fix.)

I chose not to add this export to my user profile because I wasn’t sure what the broader impacts of the GTK override might be. So nowadays I just launch Firefox from a shell script that does this export immediately prior to kicking off the Firefox executable.