May 29, 2017

Getting firefox to hand mailto: links to thunderbird

I tried a number of things (detailed below for no particular reason), before finding a rather simple way to accomplish this. Fire up Firefox and select Edit -> Preferences -> mailto and change the setting!

I select "use other" and then walkthe filesystem to /usr/bin/thunderbird.

Things that do not work

For some reason, on my Fedora system (circa 2012), Firefox still trys to hand mail to Evolution, whatever the h*** it is. I am finally fed up with this, and want to change this Fedora default.

The first thing which does NOT work is to change the setting of the network.protocol-handler.app.mailto preference. First I use about:config to look at all the preferences and see if this is already set, it is not. Then I find the file prefs.js (which is in the directory /home/user/.mozilla/firefox/sxigwd03.default on my system. I edit that file and add the line:

user_pref("network.protocol-handler.app.mailto","/usr/bin/thunderbird");
After this, I restart firefox and see if about:config shows this setting (it does not), then I find a site with a mailto: link to test it (it does not work). There is some progress though, I hear disk activity and it no longer tries to bring up evolution. When I look at the about:config listing, I do see several mailto: variables, namely:
network.protocol-handler.expose.mailto         false
network.protocol-handler.external.mailto       true
network.protocol-handler.warn-external.mailto  false

In the process of researching these, I found an mozillaZine article about setting your default mail client.

The process it describes, which also does NOT work is to once again, bring up the about:config page, and right click with the mouse. This brings up a dialog where you select New -> String and enter network.protocol-handler.app.mailto as the name of the preference, and for the value you enter /usr/bin/thunderbird. As recommended I then use File -> Send Link, and get nothing.

Note that typing /usr/bin/thunderbird does work.

Now, lets try yet a third thing, which ultimately does NOT work. You can set the value for the Gnome "Custom Mail Reader" via the Gnome applications menu. I am running xfce, so this won't work for me. What might work is to run the gnome configuration editor (gconf-editor) and it does! I then navigate to /desktop/gnome/url-handlers/mailto and change evolution --component=mail %s to thunderbird %s. Still no dice, hmmmm.


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org