How to process/update "Mimetype=" entries in .desktop files on install?

Friedrich W. H. Kossebau kossebau at kde.org
Sun Oct 21 16:15:49 UTC 2012


Hi,

(follow-ups please only to kde-devel)

I am looking for a way to deal with the issue that the list of supported 
mimetypes for some programs depends on the installed i/o plugins. E,g, Marble 
and most Calligra programs have this problem.

Simply hardcoding all possibly supported mimetypes only leaves bad 
impressions if a program is started for a file after e.g. a click on the file 
in the file manager, but then gives an error message after starting that it 
cannot read the file.

It is not only about the i/o plugins created at build time. But some 
distributions also tend to put single i/o plugins in different packages, so 
just updating the "Mimetype=" entry in the .desktop file on build-time (by 
generating another .desktop file) before it is installed will not work for 
these.

So how can this problem be solved?

Is it possible to update the installed desktop file of a programs on install 
of another package, like another input plugin?
How would this need to be noted in our sources, so it would happen 
automatically, or that packagers know they have to add something to the post-
install part of the input plugin package?

Cheers
Friedrich


More information about the release-team mailing list