Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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
share|improve this answer
    
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 '11 at 10:20
    
@Paul: text/html is only for HTML files. When opening http URLs, x-scheme-handler/http is used. –  grawity Aug 24 '11 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-ch‌​romium.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 '11 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). –  cayhorstmann Oct 20 '12 at 14:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.