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/libcanberra-gtk-module.so: wrong ELF class: ELFCLASS64
(firefox:13517): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libxfce.so: wrong ELF class: ELFCLASS64
(firefox:13517): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libxfce.so: wrong ELF class: ELFCLASS64
/usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
LoadPlugin: failed to initialize shared library /usr/lib/gnash/libgnashplugin.so [/usr/lib/gnash/libgnashplugin.so: 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.

8 thoughts on “Fix Firefox Empty Printer List on Debian Squeeze 64-bit

    1. admin Post author

      Oleg,
      I installed Firefox in a directory named “/programfiles/firefox”. I have a desktop launcher that points to “firefox.sh”. The content of firefox.sh is as follows:

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

      I hope that helps.

      Reply
  1. Windows-Eater

    Anscheinend existiert das Problem immer wieder (aktuell Debian 6.0.1 + FF19).
    Ein blick in das Startscript (/usr/bin/firefox) offenbart:
    if [ $arch = “x86_64” ]; then
    export GTK_PATH=/usr/lib32/gtk-2.0
    fi
    oder auch:
    if [ $arch = “x86_64” ]; then
    export GTK_PATH=/usr/lib/gtk-2.0
    fi

    Einfach den Exportpfad auf /usr/lib64/gtk-2.0 ändern und schon geht es.

    Reply
    1. admin Post author

      I don’t speak German, but I think the commenter is saying the problem still exists in Debian 6.0.1 with Firefox 19.

      Reply
  2. Björn

    Yes, he does. Translation:

    Apparently, the problems reoccurs from time to time, currently under Debian 6.0.1 and Firefox 19.

    Looking at the start script at /usr/bin/firefox reveals:

    if [ $arch = “x86_64” ]; then
    export GTK_PATH=/usr/lib32/gtk-2.0
    fi

    or:

    if [ $arch = “x86_64” ]; then
    export GTK_PATH=/usr/lib/gtk-2.0
    fi

    As a consequence, just change the exported GTK_PATH and it should run smoothly.

    NB: The same for Debian 6.0.6.

    Reply
  3. Pingback: Install Brother DCP-7020 Printer on Debian or Ubuntu | DullSharpness

Leave a Reply

Your email address will not be published.

*