13

No matter what changes i make to file associations (actions) in the 'Applications' tab in Firefox, they're totally ignored.
For example, i set .wmv and .avi files to open with 'smplayer' but when i download a file and double-click on it (through the 'Downloads' window), it keeps opening with Totem player.

The default file associations through nautilus ('open with' tab) work fine, i.e. i've set smplayer as the default player and when i double-click a video file it open correctly.

I've tried to delete and recreate mimetypes.rdf but that didn't help.

Any ideas on what else should i check?

1
  • Almost 10 years and no answers approach SELinux configuration yet.
    – mckenzm
    Sep 30, 2020 at 3:09

7 Answers 7

10

UPDATE: Ever since Firefox 18, Firefox has GIO support instead of GnomeVFS support, so the workaround below shouldn't be necessary anymore. If anyone's still hitting this issue in recent Firefox versions, this will be unlikely to fix it.

So, take the rest of this post with a grain of salt...

The fix

This fixes it for me:

cd .local/share/applications/
ln -s mimeapps.list defaults.list

and finally, restart Firefox. When it comes up again, its Download Manager should invoke the correct program (as specified in the .list files referenced above).

Details

Firefox (up through trunk nightlies as of this post) currently uses GnomeVFS API to ask "What app should I use to open files with this mimetype?" However, GnomeVFS has become deprecated in favor of GIO.

Nautilus (I'm looking at ver 2.32.2.1) now uses GIO to register user-specified default handler-applications (like smplayer in your case). GIO and GnomeVFS use different files to manage their settings, but the files are apparently in the same format (at least similar enough for the above "ln" hack to work for me. :))

(I've investigated this in a bit more detail on a Mozilla bug report.)

2
  • After digging a little deeper: I've found that Firefox has optional GIO support added in bug 402892, but it's currently disabled at build-time, by default. If you compile your own Firefox builds, you can enable it with the "--enable-gio" mozconfig build flag.
    – dholbert
    Jul 31, 2011 at 2:21
  • In my case, the defaults.list seems to be ok and the mimeapps.list seems to have some 'bad entries'. Nevertheless, your answer helped a lot. Thanks :-)
    – Pavlos G.
    Aug 7, 2011 at 16:40
5

Oddly, this topic seems still actual in 2018.

Some newly installed applications take over the "default" status in FF's about:preferences instead of the per-filetype normal application set at system level (e.g. Palemoon takes over as default instead of gwenview for jpeg files, Inskape or File Roller takes over instead of Okular for pdf file.).

"Always ask" is the choice that should be used in this case and then trying to create a per-user file ~/.local/share/applications/mimeinfo.cache with the lines:

[MIME Cache]
application/pdf=okularApplication_pdf.desktop

The disadvantage of the above is that it is a per-file-type setting. To have a solution for all files (as said in this answer), run:

cd .local/share/applications/
ln -s mimeapps.list defaults.list

In case this stops working: see that the undesired application is not again selected under about:preferences: be sure "Always ask" is selected there. Setting manually a different program (even the default for your file-type at system level, but which is not marked as "default" in the list for your file under about:preferences) might not work.

Tested in Firefox 60.0 in Kubuntu 18.04.


Something is not right with the Firefox settings. "Always ask" and "Save file" do not make sense for files already downloaded, therefore settings under about:preferences shouldn't affect the Downloads list. But they do. And they do in an inconsistent manner: only selecting the application marked as default is followed, switching to another application is not. To reverse that one might need to select "Always ask" and then follow the steps mentioned above.

2
  • 1
    Hmm, I've linked the mimeapps.list to defaults.list and I still get the wrong file being opening. :/ Sep 19, 2018 at 8:27
  • I actually get the best results by removing all three of mimeinfo.cache, mimeapps.list and defaults.list.
    – Sunday
    Nov 28, 2019 at 12:09
1

To follow up to Peterling's solution, that worked for me. I was messing around with my mime types files forever trying to figure it out. Turns out that installing Nautilus on my Mint17 KDE system was the way to go. It strikes me as ridiculously convoluted that Firefox is looking at Nautilus settings on a system that does not even have it, but there you go. I'm running Firefox 33 BTW.

0

The Applications tab in Firefox preferences controls how to play embedded or linked content, not downloaded files. To change the application that opens a specific mime type via download manager, close Firefox then delete the mimeTypes.rdf file from your profile, then open Firefox again and double click the file in the download manager. It will prompt for the application to be used. Choose /usr/bin/smplayer, then tick the option to remember your choice.

2
  • I've already said that I've deleted mimeTypes.rdf. Yet, nothing happens. When i double-click on a file, it just opens with Totem...
    – Pavlos G.
    Jan 6, 2011 at 20:45
  • Have you closed Firefox before deleting mimeTypes.rdf? Jan 6, 2011 at 21:30
0

I know this question is now more than one year old but I had now the same problem with Firefox and found the solution after a long fight with a lot of editing and changing.

And I am so happy about it that I want to share it :)

The solution (im my case) is quite simple:

All files that are downloaded with firefox and opened with a click in the download window seemed to be opend by ??? cuz it was not handled with the firefox settings and not with mimeTypes.rdf ... . It is handled by Nautilus. (although I do not know why)

So just start Nautilus ... look for a filetype that is not handled by firefox correctly - right click on it - properties - open with -> choose the application you want this filestype to be opened with ... done.

From now on Firefox will open all files with the wanted app when clicking on it in the download window of firefox.

0

I realize this question is very old but this is a common experience after more than 10 years. As more recent posts state that the solutions here do not work I am posting this askubuntu answer as a solution tested in 2022 with Kubuntu.

The idea is to make the changes for given file-type in /usr/share/applications/defaults.list.

-1

There is nothing to do with firefox.Because the file is already downloaded. if you want to open downloaded .wmv and .avi files with smplayer you can do it like this. right click on any .wmv file and select 'Open With' --> 'Other Application...' and select your favorite application(In this case smplayer) from the list and check the 'Remember this application for "WMV video" files' check box. do the same for .avi files also. alt text

Or if you want to open files from firefox's save dialog box with your desired application just follow this article: http://support.mozilla.com/en-US/kb/Managing%20file%20types

Hope this helps

2
  • Unfortunately, I've already set the default application through nautilus to 'smplayer' and it works ok there. The problem only happens in firefox. As for the link you gave me, I've already checked it. It's exactly what I'm doing, but it just doesn't work....
    – Pavlos G.
    Jan 4, 2011 at 16:49
  • I've also updated my question so as to be as clear as possible.
    – Pavlos G.
    Jan 4, 2011 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .