[Suggestion] grand unification of file-type associations, mimeapps.list vs defaults.list, gnome vs xfce vs...

Asked by tbp on 2010-03-28

Once again i've been fighting those silly file-type associations.
I hate the concept and it's, to say the least, extremely poorly implemented and there's no interoperability (both/either/none mimeapps.list and defaults.list may be read, perhaps from /etc/xdg, /usr/share/applications, /usr/local/share/applications depending on phase of the moon).

Anyway, the lowest common denominator is to have both defaults.list and mimeapps.list in ~/.local/share/applications. It's rather easy to derive defaults.list from mimeapps.list which ubuntu-tweak has a convenient interface for.

But it would make my life much easier if ubuntu-tweak had an option to produce a full mimeapps.list (generating one from the collection of mime types is rather involved) instead of what i think is a kind of delta.
Then i could conveniently make a defaults.list out of it (or perhaps that could be yet another option).

PS: i've given the source code a cursory look, but python is not my forte and, if i remember, it's using gio as a backend; so instead of a patch you get a question :)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Tweak Edit question
Assignee:
No assignee Edit question
Solved by:
Ding Zhou
Solved:
2010-03-30
Last query:
2010-03-30
Last reply:
2010-03-30
Best Ding Zhou (tualatrix) said : #1

The mimetype and file-type association is complex. It will take much time to learn it.

So I only use GIO interface to do that, to keep it simple.

Currently there's no plan to improve the file-type manager.

tbp (tbp) said : #2

Doesn't my life easier but, fair enough.

For the sake of documentation, my current global mime-type taming process:
1. regenerate /usr/share/applications/mimeinfo.cache (a Gnome only thingy, but with the required information)
2. mangle it into a mimeapps.list
3. tinker with that via ubuntu-tweak or something
4. produce a defaults.list out it.

tbp (tbp) said : #3

Thanks TualatriX, that solved my question.