Getting Firefox and Thunderbird to play nice under Linux.

Mozilla Firefox and Thunderbird are great programs, but they need a little glue to get them to talk to one another. Here’s how I did it on Linux.

The documentation for these two scripts can be found here for those that would like more information.

The path to the two scripts need to be added to your respective Firefox and Thunderbird configuration files (prefs.js). In Firefox you can use the about:config dialogue, and in Thunderbird you will need to edit the prefs.js file by hand.

In Firefox set the following value to the path to your thunderbird.sh script.
network.protocol-handler.app.mailto

Thunderbird is similar, but you may want to add more than one entry:
user_pref(“network.protocol-handler.app.ftp”, “/home/augie/bin/firefox.sh”);
user_pref(“network.protocol-handler.app.http”, “/home/augie/bin/firefox.sh”);
user_pref(“network.protocol-handler.app.https”, “/home/augie/bin/firefox.sh”);

Here are the scripts that I use:

Firefox


#!/bin/sh

# if firefox is already running, then open a new tab.
firefox -remote "ping()" && firefox -remote "openURL($@,new-tab)" && exit 0

# otherwise start firefox.
firefox "$@"

Thunderbird


#!/bin/bash

# if thunderbird is already running, then open a new compose window.
thunderbird -remote "ping()" && thunderbird -remote "mailto(${1#mailto:})" && exit 0;

# otherwise start thunderbird with a new compose window.
thunderbird -compose mailto:${1#mailto:}

This entry was posted in General, work and tagged , , . Bookmark the permalink.

One Response to Getting Firefox and Thunderbird to play nice under Linux.

  1. Nat says:

    thats really cool. Thanks alot augie :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>