Icon / mime association..

Bastian, Waldo waldo.bastian at intel.com
Wed Oct 11 21:35:55 EEST 2006

>Hi List,
>new here, so excuse me if this is wrong place to ask this question.
>I've tried to do my home work, spent some ten hours in the web but I
>not know the answer.
>How do I do file/mime/application associations in the freedesktop.org
>I understand that I create a myapp.xml file in /usr/bin/mime/packages
>then run update-mime-database.
>But as far as I understand this only associates, in practical terms, my
>mime type, a description of the type and file extension together, no
>I then  create a myapp.desktop file and run update-desktop-database
>associates my mime type, executable and icon and a description of the
>Now the part I don't understand:
>The icon in the .desktop file, is that an icon for the application or
>document (mime typed) file? Or both?

It's for the application.

>How can I get a separate icon for the application and document? What if
>application supports several document (mime) types?

This is a bit tricky. You may want to take a look at xdg-utils [1] which
takes part of the hairy parts. Basically, once you have installed
mimetype description(s) you can install for each mimetype (e.g.
text/foobar) an icon with the name major_minor (e.g. "text_foobar") that
will then be used for documents of that mimetype.

See http://portland.freedesktop.org/xdg-utils-1.0/xdg-mime.html for an


[1] http://portland.freedesktop.org/download/xdg-utils-1.0.tgz

More information about the xdg mailing list