Thunderbird on Linux Not Honoring Default Browser – Fix

browserkde-4thunderbird

Under KDE 4.7 I have "chromium-browser-chromium" set as my default browser in system settings.

This works for KDE apps, but not Thunderbird. I suspect that Thunderbird is looking for the default browser in a GTK type config place, rather than a KDE setting.

So while KDE apps open links in Chromium, Thunderbird (I am currently in tb6.0, but the same behaviour happens in previous versions) opens links in Firefox.

I know I can force the issue in prefs.js but I would like to get thunderbird to respect the system setting. How can I do this?

Best Answer

Thunderbird (at least version 6 here) appears to be using the XDG MIME actions specification. The preferences are stored in ~/.local/share/applications/mimeapps.list, and all desktop environments are supposed to respect them.

[Default Applications]
text/html=chromium.desktop
x-scheme-handler/http=chromium.desktop

Older versions of Thunderbird may still be using GNOME's Gvfs for this. You can check using gconftool-2:

$ gconftool-2 --get /desktop/gnome/url-handlers/http/command
firefox %s

If that's the case, the best option is to configure Gvfs to use xdg-open for all URL schemes, which in turn should invoke the right program from mimeapps.list:

$ for scheme in http https about unknown; do
    gconftool-2 --set /desktop/gnome/url-handlers/$scheme/command \
        --type string "xdg-open %s"
done

Or you could try xdg-settings, which... honestly, I'm not sure what it does:

$ xdg-settings set default-web-browser chromium.desktop
Related Question