Mime/Icon association

Kai-Uwe Behrmann ku.b at gmx.de
Tue Mar 2 07:15:07 PST 2010


Am 02.03.10, 14:35 -0000 schrieb Bastien Nocera:
> 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).

I thought that is expressed in this mime xml file.

>> 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.

Except it does not tell about this special relationship I am intressted 
in (icon to MIME assigment in the xml file).

>> 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

Its not included here - shared-mime-info-0.60-2.2.x86_64 openSUSE-11.2 .

> instead. Note that ICC profiles are already in shared-mime-info.

Ah, you mean it need the naming convention
icon name + file ending == mime name (?)

No it does not help. So I assume the missing association to be a bug with 
both Gnome and KDE. (After updating with xdg-user-dirs-update)

> 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

I tried in ~/.icon but it's confusing as the above paths already worked 
for apps. No help eigther.

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

Yes that would be fine.

Anyway, thanks for your quick response.


kind regards
Kai-Uwe Behrmann
-- 
developing for colour management 
www.behrmann.name + www.oyranos.org



More information about the xdg mailing list