How to make Firefox file associations consistent with Ubuntu file associations?

6

2

This seems to be a pretty commonly Google question, but one for which there are no answers.

http://www.linuxquestions.org/questions/linux-software-2/firefox-download-mime-types-378902 http://www.birkit.com/content/kubuntu-linux/internet/firefox/fix-file-associations-in-firefox.html

Being three links amongst the many.

The gist of what I want to accomplish is to have Firefox understand the file associations I download without me having to manually map all of them myself. Gnome knows the file extensions, so I would have expected that Firefox could just use the already-known file mappings there to open the right stuff (as I presume Chrome does). But it doesn't. At least not for me, using Firefox 4, and not by default. When I click on a downloaded file right now, Firefox always has to ask me what application should be used to open the file.

A handful of Google results tell me that I can reassociate my file extensions by deleting ~/.mozilla/firefox/[profile name]/mimeTypes.rdf, but while deleting that file does in fact result in a new mimeTypes file being generated, the new mimeTypes is just as barren as the old one had been.

Based on the amount of unanswered Qs on the Googlesphere, I know this is a very common problem for Ubuntu users, but it seems to be one for which nobody has chimed in with a good solution. Maybe Superuser can finally be the panacea for us all?

wbharding

Posted 2011-04-20T18:17:56.033

Reputation: 162

Answers

3

You must install ubufox extension try sudo apt-get install ubufox on a terminal. That transitional dummy package associated file extensions to firefox. Here's the link https://launchpad.net/ubufox

afarazit

Posted 2011-04-20T18:17:56.033

Reputation: 146

Didin't work for me on ubuntu 18.04 – Laurent – 2018-09-26T23:11:31.000

3Could you add a little more information about what ubufox is and why it would be helpful, possibly with a link to their website? That would make your answer much more helpful. Thanks! – nhinkle – 2011-04-20T23:07:35.733

@wbharding so have you solved your problem? – afarazit – 2011-05-08T11:11:30.230

3

As originally stated here:

  1. Stop firefox if it is running
  2. Delete or rename the mimetypes cache (where firefox keeps its file association settings):

    $ rm ~/.mozilla/firefox/<yourprofile>/mimeTypes.rdf
    
  3. Start firefox again

  4. Download any file if you had not done this before
  5. Open that file from the “Tools > Downloads” menu (by right-clicking on it and selecting “Open“). When asked to choose the application for opening the file, browse to “/usr/bin/xdg-open“. then check the checkbox to “Remember your choice“.

emegeve

Posted 2011-04-20T18:17:56.033

Reputation: 31