Thunderbird:Extension Installation

From MozillaWiki
Jump to: navigation, search

We need a better way to install extensions into Thunderbird. Currently a user must download the extension file locally and then either install the extension by opening the addons dialog and clicking the install button or dragging the extension into the add ons dialog. We get too many complaints from users who click on the extension from within their browser (Firefox) and the extension ends up trying to load in Firefox.

Goal

  • Make it easy to install extensions in Thunderbird and other non browser applications.
  • Prevent Thunderbird extensions from attemping to install into Firefox.

There are currently two proposals for solving this problem:

  • Use a site specific browser from within Thunderbird
  • Use custom mime types for extension on the addons site.

Single Site Browser

Add a single site browser in Thunderbird (so could other applications like Songbird). From the Thunderbird Add-ons dialog, the "Get Extensions" link would open up a chromeless browser window that's a part of Thunderbird. This window would be a single site browser which only browses through addons.mozilla.org. Link clicks outside of this site would get sent to your default browser.

Advantages:

  • can be fixed without changing addons.mozilla.org
    • only halfway; i.e. you have to log in in order to get sandboxed extensions.

Negatives:

  • Clumsy user interface, too many windows...
  • Doesn't help users browsing addons in Firefox or another browser from installing extensions they see and like.
  • Doesn't help users who want to look at extensions on other sites like extensionmirror.

App Specific Mime Types

Use application specific mime types for .xpi files. Thunderbird registers itself as a mime handler with the OS for: application/x-xpinstall;app=thunderbird. The addons server returns an appropriate mime type based on the application the extension in intended for. In this case, the browser wouldn't recognize x-xpinstall;app=thunderbird so we find the default handler which is Thunderbird.

Thunderbird must implement a command line handler that can accept the url to the XPI we want to load and then install the extension at that url.

Advantages:

  • Provides the best user experience for users.
  • I believe this is how the extension system was intended to work (for instance Firefox already registers itself as x-xpinstall;app=firefox with the OS but that doesn't appear to be used for anything currently).
  • Can work with other addon hosted sites besides just addons.mozilla.org (i.e. extension mirror).

Negatives:

  • Requires coordination with the addons.mozilla.org to set up the mime type
  • Not clear how you install extensions that are compatible with multiple applications (maybe it depends on whether you are browsing for 'Thunderbird' extensions or 'Seamonkey Extensions', on the addons site....
  • It's not clear that the mime type registration technique will work, I haven't tested that yet. Will a browser kick out that mime type to the OS and invoke Thunderbird as a helper app via a command line call?

Other Ideas

These are some other ideas I've heard tossed around...

  • Someone proposed using app specific protocol handlers instead of mime types. i.e. tbird-ext://https://addons.mozilla.org/en-US/thunderbird/addon/1556).
  • Some sort of custom code that runs within Firefox and monitors attempts to install extensions that don't belong in Firefox...prompting the user as to which application it should be installed into.
    • Or, let XULRunner open all xpi files and present the list of compatible & installed applications.
      • Exactly, but this could be any Gecko app that opens the extension. In other words, if I open an XPI using Firefox/Songbird/whatever that is only compatible with TB, it would attempt to install in TB. If it is compatible with multiple apps, it should prompt the user to install it in one or more of them.
  • If the user (for whatever reason) winds up with a .xpi on his desktop, there should be an easier path for installation from there as well. Songbird accepts media files as command-line and drag-and-drop items, so we also handle .xpi through those points. Dropping your .xpi right into the Thunderbird window should bring up the manager and start the install (such functionality would be in-addition-to rather than instead-of the other ideas on this page).
  • Why not just call Thunderbird extensions .xpj instead of .xpi
    • What about the MIME type? application/x-xpjnstall ? And what about multi-app extensions? (one .xpi which can be installed without changes in two or more of Thunderbird / Firefox / SeaMonkey / Netscape 6+ / Flock / Nvu / ...)

Drag and Drop from AMO in Firefox to addons window in Thunderbird

The GNOME Art site allows you to drag a link to a theme from your web browser (including Firefox) to the GNOME Theme Manger to install themes (here is an example). The files there are compressed as well. Couldn't similar functionality eventually be included in Thunderbird to install extensions and themes?