Home » Questions » Computers [ Ask a new question ]

How do you associate an action with a file type in Firefox 3.0?

How do you associate an action with a file type in Firefox 3.0?

I'm trying to associate a specific action with a file type in Firefox 3.0.

Asked by: Guest | Views: 135
Total answers/comments: 3
Guest [Entry]

"What you're looking for is the mimeTypes.rdf file in your Firefox's profile folder.

A word of warning before you go any further, the mimeTypes.rdf file is not meant to be directly edited by users, and if you mess up it could stop your Firefox working.

Where your profile folder is depends on what OS you're running, see here for how to find your profile folder: Firefox Profile Locations.

It is an RDF file, which is a type of data file similar in some ways to XML, but its heirarchy works differently, this does mean that if you're careful you can read and edit it with a text editor. MozillaZine's knowledgebase has an article on the mimeTypes.rdf file here. You'll want to read up on the RDF format (more than what's in the link I just quoted) because its not quite as simple as XML to just paste in a new line to do what you want."
Guest [Entry]

"In firefox 74, the solution seems to be as for Firefox 60 (Thanks for that advice).

I wanted to add a handler for Zoommtg for the zoom meeting application. It seems that the zoom installer probably creates this tag, but only for the Mac user account that zoom is installed in (the administrator account). Trying to run the installer in a normal user account just resulted in the installer quiting (presumably because zoom.us was already installed). I added into handlers.json:

""application/zoom"":{""action"":2,""ask"":true,""extensions"":[""zoommtg""]},

Then I went into Firefox preferences, and selected the zoom.us application to be opened. I then clicked on the zoom meeting link and got it to launch the right applications. Eventually, the saved file contained:

""application/zoom"":{""action"":2,""extensions"":[""zoommtg""],""handlers"":[{""name"":""zoom.us"",""path"":""/Applications/zoom.us.app""}],

and

""zoommtg"":{""action"":4,""ask"":true}

probably only the latter is actually needed."
Guest [Entry]

"In Firefox 60, what worked for me was to edit the json file handlers.json in my profiles folder. First, make a backup of the file, and then look for the stanza mimeTypes. Copy an entry within that stanza and use it as a template for your entry.

In my case, I wanted gzip files to be downloaded instead of being opened in an archive viewer, so I inserted

""application/gzip"": {
""action"": 0,
""ask"": true,
""extensions"": [
""gz"", ""tgz""
]
},

That turned out not what firefox wanted to read, and in my case firefox silently fixed the stanza to read:

""application/x-gzip"": {
""action"": 0
}
},

As a bonus, firefox added an entry for the new mimetype stanza in the about:preferences list of handlers.

YMMV"
"In Firefox 60, what worked for me was to edit the json file handlers.json in my profiles folder. First, make a backup of the file, and then look for the stanza mimeTypes. Copy an entry within that stanza and use it as a template for your entry.

In my case, I wanted gzip files to be downloaded instead of being opened in an archive viewer, so I inserted

""application/gzip"": {
""action"": 0,
""ask"": true,
""extensions"": [
""gz"", ""tgz""
]
},

That turned out not what firefox wanted to read, and in my case firefox silently fixed the stanza to read:

""application/x-gzip"": {
""action"": 0
}
},

As a bonus, firefox added an entry for the new mimetype stanza in the about:preferences list of handlers.

YMMV"