[plug] thunderbird and urls

Collin Baillie collin at xorotude.com
Sat Feb 12 18:46:10 WST 2005


Craig Dyke wrote:
> Has anyone found a successful way to have urls in Thunderbird open in 
> Firefox?
> 
> If so, would you please let me know the secret :)
> 
> Craig
> 

Hi Craig,

I am running Slackware 10.1 rc1 (I should upgrade all the packages now 
that they have released).

I had the problem where Thunderbird would not open urls in ANY browser. 
It seems that you have to provide instructions to thunderbird in the 
~/.thunderbird/<something>.default/prefs.js file.

The line looks like this:

user_pref("network.protocol-handler.app.http", "<something>");

where <something> is the "application" to use.

I use the following script, which I put in /usr/bin

--------- begin file: /usr/bin/firefox-remote ---------
#!/bin/sh

export FIREFOX=/usr/bin/mozilla-firefox

url="$1"

if [ "$url" = "" ]; then
     url="www.google.com.au"
fi

if $FIREFOX --remote openURL\($url,new-window\); then
   exit 0
fi
exec $FIREFOX $url
--------- end file: /iusr/bin/firefox-remote ---------

so, I changed <something> to /usr/bin/firefox-remote.

This opens any links in a new window (you could change it to a tab if 
you like), it also makes the default URL (if none is supplied) google :)

new-window can be changed to new-tab for new tabs (If no window exists, 
a new window will open)

Oh yeah, and edit prefs.js when Thunderbird is NOT RUNNING, cause it 
overwrites it when you quit. So quit first, then edit the file, and all 
should be well.

Cheers,

Collin



More information about the plug mailing list