3

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?

2 Answers 2

6

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
4
  • Ah ok, this is tb6 so going by option 1, I have text/html=chromium-browser-chromium.desktop;userapp-Firefox-JWXOSV.desktop;. This suggests firefox is a fallback to chromium. The chromium desktop file definitely exists in /usr/share/applications/ and has the correct chromium-browser %u exec line. I'll try removing the fallback but strange tb is not respecting the primary option.
    – Paul
    Aug 24, 2011 at 10:20
  • @Paul: text/html is only for HTML files. When opening http URLs, x-scheme-handler/http is used. Aug 24, 2011 at 12:22
  • Interesting. I don't have that handler defined in .local. However, in /usr/share/applications/mimeinfo.cache I have x-scheme-handler/http=opera-browser.desktop;firefox.desktop;chromium-browser-chromium.desktop; Which suggests opera should be first. I get that KDE should honour the .local copy, but does it write to it?
    – Paul
    Aug 24, 2011 at 14:17
  • I had to add x-scheme-handler/https as well. Otherwise, Thunderbird opens HTTP links with my preferred browser and HTTPS links with the default browser (for some definition of default). Oct 20, 2012 at 14:50
0

Here's one thing that works for me: http://community.linuxmint.com/tutorial/view/1391

Basically, the idea is to set network.protocol-handler.warn-external.http to true. Same applies to network.protocol-handler.warn-external.https for https protocol and maybe network.protocol-handler.warn-external.ftp for FTP. After applying that, Thunderbird will ask you which program to open the URL with and allow you to remember the choice.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .