Helper Applications
by Christian Biesinger <cbiesinger@web.de>This document aims to explain Mozilla's concept of "Helper Application", what they are and what they are used for.
The UI for them can be found at Edit/Preferences/Helper Applications and when encountering files Mozilla can't handle.
Helper Applications are not Plugins
This seems to be a common misunderstanding. Helper Applications are only used if neither Mozilla itself nor a plugin can handle a specific file. Only in that case will Mozilla use an application chosen in Preferences/Helper Applications to open a file.
What are Helper Applications?
Sometimes, Mozilla tries to load a URI that it can't display, say a .zip file. When that happens, Mozilla consults the Helper Application preferences to find out what it should do. There are several possibilities: Mozilla can open the file with the (system-wide) default application, it can open it with a user-specified application, or it can save it to disk.
All these things can be configured in Edit/Preferences/Helper Applications. Firstly, Mozilla will try to find an entry there by looking up via the mime type the server sent. If that doesn't work, Mozilla tries to find an entry by using the file extension the server sent. This entry's settings are then used.
When no entry can be found, Mozilla defaults to asking the user, defaulting to "Open with default application".
If Mozilla asked the user, and the user made a choice, the chosen settings are saved for later use, and can be viewed in Preferences/Helper Applications.
Extensions and MIME Types
For local files and other files for which Mozilla does not get a content type from the server, you can use a helper application entry to give a specific MIME Type to files with a specific extension. To do this, just create an entry in Edit/Preferences/Helper Applications, enter the MIME Type that you want in the Type field, and enter the extensions in the extension field. The rest can be left at the default values.
You might get a warning that Mozilla can handle the type internally. If all you want is to change the assigned mime type of a file, you can ignore this message (click "Proceed anyway").
Assigning more than one helper application to one mime type
Usually, you can only assign one application to one MIME type.
However, if your files have a type of application/octet-stream
,
this is different: You can make use of the fact that Mozilla does not
save settings for this type, and that Mozilla will lookup a helper
application by extension if it doesn't find one by MIME type - just
create a helper app entry (with a type other than application/octet-stream
)
for extension ABC, and another entry (again, not with type application/octet-stream
)
for extension XYZ.
This way, if Mozilla encounters a file with type application/octet-stream
and extension ABC, the first helper application will be used, while if
the extension is XYZ, the second one will be used.
This works equally well for E-Mail-Attachments.