Integrate Firefox with other tools

104

Author: Keith M. Swartz

If you’re moving over to Firefox from Mozilla, you’ve surely noticed how Firefox is built to be a sleeker, faster browsing engine. It accomplishes this in part by shedding all of its counterparts from the Mozilla Suite, including an email/news client, composer, and chat client. But that doesn’t mean this functionality is no longer available. With a few extensions — or with no work at all — you can make Firefox integrate with your email client as though it were still part of a suite. You don’t have to stop there, either; at least one valuable extension gives you the power to connect Firefox with virtually any program on your system.

This article is excerpted from the newly published book “Firefox Hacks: Tips and Tools for Next-Generation Web Browsing.”

Integrate email and news

Firefox does not include a mail client: this functionality has been outsourced to its cousin, Thunderbird. However, a quick glance at some of the menu options might make you think the Firefox developers didn’t get that memo:

File→Send Link

For emailing the current URL

Tools→New Message

For composing a new email message (Windows only)

Tools→Read Mail

For opening your mail client to read new messages (Windows only)

In addition to these menu items, there are frequent mailto: or news: links on the Web that should allow you to send an email message or read a newsgroup. Firefox contains just
enough glue to pass all these potential actions on to another program.

The good news is that if you have a default mail program set up on your operating system, all of these functions will integrate seamlessly with that program without any additional work. If you are running Firefox on Unix/Linux and you don’t have a default mail program set up on Linux, or if you want Firefox to use a different program, you can integrate Firefox with your mail program by setting the following preferences:

network.protocol-handler.external.mailto/* set to true, no default */
network.protocol-handler.app.mailto/* set to filepath, no default */

For example, if you want Linux Firefox to launch Thunderbird when you click on a mailto: link, set the network.protocol-handler.app.mailto preference to the following filepath, if that happens to be where Thunderbird’s startup program is located:

/usr/local/bin/thunderbird/thunderbird

To do the same thing for links that use the news:, snews:, or nntp: protocols, verify that the following preferences are set to true:

network.protocol-handler.external.news
network.protocol-handler.external.snews
network.protocol-handler.external.nntp

Then, set one or more of these matching preferences to the name of your newsreader:

network.protocol-handler.app.news
network.protocol-handler.app.snews
network.protocol-handler.app.nntp

Another option for handling mailto: links is to use the Launchy extension, discussed below.

If you prefer to use a Web mailer, such as Gmail or Hotmail, there’s a solution for that, too. The Webmailcompose extension allows you to
override the behavior of mailto: links by directing you to a Web mail provider of your choice. It also replaces the various mail-related menu options with a list of supported services from which you can choose.

Integrate Email Message Counts

On Windows operating systems, there are two additional items under the Tools menu: Read Mail and New Message. The New Message button will start a new message in your default mail client (or whatever client you have chosen to override the default), just as if you had clicked on a mailto: link with no recipient. The Read Mail option does the same thing, except that it also displays how many new unread messages you have. That might seem curious, given that Firefox has no mail functionality of its own.

In fact, you might find that it indicates you have 125 new messages, but you’ve already checked and are sure you don’t. Or maybe it reads “(0 new),” even when you know you have unread mail waiting for you.

The problem here is that Firefox is not actually checking to see if you have new mail but rather is relying on Windows to provide this information. More specifically, Firefox is looking in the Windows Registry for the key HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurre ntVersionUnreadMail. If the key exists, it queries the MessageCount registry property for the default mail account (or the first one that is listed if there is no default). This property is updated by mail utilities such as Outlook Express. It is not used by Thunderbird or other third-party mail clients. Therefore, the text in the Tools menu will be accurate only if your mail client tells Windows this information on a regular basis.

Integrate IRC

If you’re a fan of Chatzilla, the native IRC client for Mozilla, you’ll be happy to know
it’s only a click away. The Chatzilla extension for Firefox will provide you with the same functionality, sidebar and all.

Integrate everything else with Launchy

The Launchy extension is a veritable Swiss Army knife when it comes to integrating Firefox with other programs. It provides you with a new context menu for pages, links, and images, giving you the ability to open these items in any of dozens of recognized external programs. On Windows, these programs are all discovered automatically, but you can customize the list and even add your own on any operating system.

Launchy is an ideal way to handle all kinds of integration points that are otherwise unavailable in Firefox. For instance, if you want to edit the current Web page, you can use the Launchy context menu to send the page source to Mozilla Composer or NVu. If you’re on a page with an extremely large image, you can send it to Photoshop for better viewing or editing with a single click.

If you’re forced to use a Web site that has the audacity to only work in Internet Explorer, perhaps the best feature of Launchy is its ability to send the page straight to Internet Explorer — but hopefully, this won’t ever happen to you!