Firefox application associations not working in the 'Downloads' window
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.)
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.