No way to define mime association priority in .desktop files
Submitted by exc
Assigned to Allison Lortie @desrt
Description
I've installed handbrake video converter on kde desktop with smplayer video player. The result: all the video files are opened by click with handbrake. It's unacceptable: i need to return ready for use laptop soon, but before i need to check file associations and fix them.
Quick workaround (replacing existing user associations):
sed -n 's/^MimeType=//p' /usr/share/applications/smplayer.desktop | \
grep -o '[^;]\+' | \
awk 'BEGIN {print "[Added Associations]"} /video/{print $1 "=smplayer.desktop"}' \
> .local/share/applications/mimeapps.list
(same with [Default Applications] somehow didn't work with kubuntu 14.04, but it's another problem).
There is no way to define MimeType association priorities in .desktop files. It greatly affects out-of-box user expirence requiring user to sort applications manually for every mime type separately.
The proposed way to handle application priority, mimeapps.list, is not sufficient to solve this: this file cannot be bundled with every application package and requires post-install manipulations to append it, which can lead to bloating it in windows-way.
I suppose, there is a need to separate associations by classes: — recommended (-10): (image viewers, audio players); — default (0): (image editors, video players for audio files); — auxiliary (10): (converters, service tools, etc). Classes can be allowed to use like this: MimeType[class]=application/x-something;
Please consider adding it to specification, users of my desktops really suffer from mess in file associations after installations of service software.
PS: I've found deprecated SortOrder key, which can partially solve the issue (it can't handle specialization), but didn't found why it was deprecated.