Mime/Icon association

Bastien Nocera hadess at hadess.net
Tue Mar 2 06:35:17 PST 2010


On Tue, 2010-03-02 at 15:26 +0100, Kai-Uwe Behrmann wrote:
> Hello,
> 
> I am searching for a way to tell filemanagers about a certain mime type 
> and a according icon. What I could do is to install the mime type xml file 
> in the style described here:
> http://www.freedesktop.org/wiki/Specifications/AddingMIMETutor
> 
> Additional I have added a <generic-icon name="oyranos_logo"/> element. But 
> this seems to have no effect (dolphin and nautilus). In fact this icon is 
> provided as PNG in:
> ~/.local/share/icons/hicolor/128x128/apps/oyranos_logo.png   and
> $(prefix)/share/pixmaps/oyranos_logo.png
> The icons in that paths are used for applications just fine, e.g. 
> inkscape.
> 
> Is my mime xml file somehow wrong (attached)?

Yes. Generic icons are just that. They're there to make sure that all
data types have icons. For most image, audio and video documents, that
would already be part of the mime-type (so a image/foobar mime-type
would already know to use the generic image icon if no image-foobar icon
was available).

> Is on freedesktop.org a tutorial on how to install a application including 
> a own data format?

The page you mentioned looks fine to me.

> I must admit the spec pages on freedesktop.org is somewhat confusing.
> There are even specs which do not have a date inside, especially the 
> "Shared MIME-info Database" spec.
> 
> Perhaps the generic-icon element is simply not yet implemented?

No. You should be installing a application-x-icc icon in your icon theme
instead. Note that ICC profiles are already in shared-mime-info.

The icon theme specification has the explanations on how to install
icons for mime-types:
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

The shared-mime-info specification only carry information for when it's
impossible to guess the generic icon from the mime-type itself.

Cheers



More information about the xdg mailing list