When I click on the .rar file in Firefox it offers either to open it with a default application or to save it to disk. However, the default app for .rar is set to gedit (?) So how do I change that, so that FF will offer to open .rar files with archive manager? I tried editing Preferences/Applications, but I need it to ask me first what to do and then open it ot save it. Thanks!
Success! I just got it to work for me. Here's how I did it:
Just like @jasmines suggested, you need to modify the
mimeTypes.rdf
file in your Firefox profile.First go into your Firefox profile's directory. Using a terminal,
cd ~/.mozilla/firefox/
then typels
you will see a directory with a name of random letters and numbers followed by.default
(mine is73mr2fae.default
) this is your profile. Typecd [the name of the profile directory]
replace the brackets with your profile name (you can use the Tab key to autocomplete once you have typed the first few letters).First back up the
mimeTypes.rdf
filecp mimeTypes.rdf mimTypes.rdf.backup
Next open it for editing
gedit mimeTypes.rd
Now paste in the following entry (make sure not to paste it within another entry, look for a line with a closing tag
</RDF:Description>
then hit the Return key to paste it on a new empty line after that closing tag):Looks like Firefox will automatically alphabetize it later so as long as you don't put it inside another tag you should be set.
Next look for a section starting with
<RDF: Seq
... it will probably look like this:Add the line
<RDF:li RDF:resource="urn:mimetype:application/x-rar-compressed"/>
somewhere inside this tag, I don't think the order matters.Here is what mine looks like afterwards:
Save the file. Restart Firefox and download a .rar file (I used the test files here: http://www.maximumcompression.com/data/files/index.html).
The first time the dropdown box might look a little weird. But you can still click on it and select Archive Manager. Subsequent times it appears to remember this choice.
Hope this works for you!
Install Archive Manager from Ubuntu Software Centre if it is not already installed. Once installed, it will automatically show as an option, when you click on the downloaded rar file. If the Archive Manager is already installed, Open Ubuntu Software Centre, search for Archive Manager, click on More Info, scroll down, and from the list of Add-ons select Unarchiver for .rar files (non-free version) (unrar). Then select Apply Changes.
Try editing /home/[your user]/.mozilla/firefox/[your profile].default/mimeTypes.rdf (back it up, first!!!).
You may want to change each occurence of:
to: