how to recover file associations?

hello, all.

after installing mate, my file associations broke. e.g. gimp opens pdf and ‘show in folder’ chrome command fires vlc.
i tried uninstalling mate, reinstalling kde. but no good.

if i try to edit associations in file properties window, after i click ‘apply’ button, everything reverts back. same in kde settings.

experimenting with pdf filetype gave me the following:
when there were only gimp and okular available, the priority change was reverted back (gimp first).
but after i’ve installed qpdfvuew, and it appeared 3rd option in the list, i was able to make it 2nd, but not first. if i try to make something the first option, gimp always reverts back after applying the changes. but it is possible to swap 2nd and 3rd positions.

This is in Plasma5?

Delete ~/.config/mimeapps.list and it should work again, or use Mate’s settings to change the associations.

(Likely) cause of the problem: Mate probably writes the file associations to ~/.config/mimeapps.list, the newly defined standard location for that config. Plasma (the version in Leap 42.1 at least) still writes to the old location (~/.local/share/applications/mimeapps.list), but respects both (with ~/.config/ taking precedence) as per the freedesktop.org specifications.

KDE’s file associations editor has been “fixed” recently to also write to ~/.config/, but that change is not in Leap yet.

it helped! thank you!

That’s this bug btw, fixed in Plasma 5.6…
https://bugs.kde.org/show_bug.cgi?id=354179
Another workaround is mentioned there too:

A workaround on the user side is to merge $HOME/.local/share/applications/mimeapps.list to $HOME/.config/mimeapps.list, and create a symbolic link to $HOME/.config/mimeapps.list at $HOME/.local/share/applications. Systemsettings then works fine.

That’s probably advisable if you do want to use a current Mate (or GNOME, and probably others as well) in parallel to Plasma 5.5 (or lower, including KDE4)…