Novell Home

Forcing Thunderbird to Open Hyperlinks in Firefox

Novell Cool Solutions: Feature
By Scott M. Morris

Digg This - Slashdot This

Posted: 29 Aug 2005
 

Applies to:

  • Platforms using KDE 3.4
  • Platforms using Firefox
  • Platforms using Thunderbird

I ran into a problem the other day that I'd like to share. I'll also provide the solution that I found. The problem was that for the life of me, I could not get Thunderbird to open hyperlinks using Firefox as the browser. I had the KDE Control Panel set to use Firefox as my browser. I also had .htm and .html files set to be opened with Firefox. So why wouldn't Thunderbird open links in Firefox?

The solution is essentially to manually tell Thunderbird what to do, and where Firefox is. The first thing that we are going to do is to create a shell script. This script opens a URL in Firefox:

#!/bin/bash

url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi

exec /usr/bin/firefox "$url"

Make sure the line that says /usr/bin/firefox indeed points to the location of Firefox on your system.

Save this script as openlink.sh in the .thunderbird subdirectory of your home directory. For me, this path is /home/scott/.thunderbird/openlink.sh though yours will probably have your username instead of "scott."

Now, make that script executable. Open a command prompt and type the following command, substituting "scott" for your username:

[1808][smorris@linux:~]$ chmod +x /home/scott/.thunderbird/openlink.sh
[1808][smorris@linux:~]$ 

Slick, now we can tell Thunderbird to call this script when we click on a hyperlink. First, make sure Thunderbird is not running. Next, edit the /home/scott/.thunderbird/[some profile name].default/prefs.js in your favorite text editor. The "[some profile name]" will be a random combination of letters and numbers.

At the bottom of this file, edit the following entries (if they are not there, add them):

user_pref("network.protocol-handler.app.ftp", "/home/scott/.thunderbird/openlink.sh");
user_pref("network.protocol-handler.app.http", "/home/scott/.thunderbird/openlink.sh");
user_pref("network.protocol-handler.app.https", "/home/scott/.thunderbird/openlink.sh");

Obviously, you will switch out "scott" in the paths with your own username.

Once this is all done, you are finished. When you fire up Thunderbird and click a link, it should always open it in Firefox.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell