Web Browser – Downloads Only Open Target Folders

file associationfirefoxmime-type

After installing xubuntu packages in order to check xfce, I reverted back to gnome2.
During the first login, I noticed that thunar was now selected as the default file manager.

Preferred applications menu is also missing now, so I could not set nautilus as the default.
I removed all the xubuntu packages (including thunar) and then when I tried to open a folder, I was asked to select the default file manager – that's how I got nautilus back.

The next problem I'm now facing has to do with the downloaded files from web browsers:

Open and Open containing folder options produce exactly the same result.
If I double-click on a file, it'll just open the containing folder, instead of opening the file with it's associated application (e.g. libreoffice writer for .doc,.odt, smplayer for .avi,.wmv, etc).

The problem happens both in Firefox and Chrome.

Through nautilus, all files open correctly.

Up until now I've tried the following:

  • Delete/recreate mimeTypes.rdf in my FF
  • Create a new profile in FF
  • Delete/recreate ~/.local/share/applications/mimeapps.list
  • Already checked this similar article

None of them worked.

Any ideas on the issue would be appreciated.

Best Answer

Try removing the following files:

~/.local/share/applications/mimeapps.list  #You already did this
~/.local/share/mime                        #This whole folder needs to be deleted or moved

Removing these folders will remove any file assosiations with Wine, if you use it.

Also, if you want the Preferred Applications tool back, just install the capplets-data package.

If that doesn't work, there might be a .desktop file in ~/.local/share/applications preventing that menu item from showing. To remove it, run:

grep -r "Preferred Applications" ~/.local/share/applications 2>&1 | sed 's/:.*$//g' | xargs rm -vf

The command won't do anything if it can't find a file in ~/.local/share/applications that contains the text Preferred Applications.

Hope this helps :)