[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to properly register a program in KDE/GNOME

Am Samstag, den 21.11.2009, 08:33 +0100 schrieb Eric Lavarde:

> I'm trying to get FreeMind files to be properly opened with FreeMind 
> within KDE/GNOME (and probably other freedesktop compatible desktops), 
> e.g. click in Konqueror on a FreeMind file (shown with the FreeMind 
> icon) and FreeMind is opened with the file.
> I'm quite at the end of my knowledge and I haven't found a documentation 
> that explains it all.
> I have the following:
> $ cat /usr/share/applications/freemind.desktop
> [Desktop Entry]

The Encoding key and the "Application" category are deprecated. The
MimeType line misses the semicolon after the MIME type. JFTR: The icon
field should not contain a path nor a file suffix.

> $ cat /usr/share/mime/packages/freemind.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info";>
>      <mime-type type="application/x-freemind">
>          <comment xml:lang="cs">FreeMind Mapa</comment>
> [...]
>          <comment xml:lang="zh">FreeMind 心智圖</comment>
>          <glob pattern="*.mm"/>
>          <magic priority="65">
>                  <match type="string" value="&lt;map" offset="0"/>
>          </magic>
>      </mime-type>
> </mime-info>
> (the magic thing is needed to make the difference with troff files)

Is application/x-freemind a subtype of application/octet-stream - some
binary format? If not you *must* add a proper sub-class-of element (e.g.
of text/plain, application/xml, ...). From the magic it looks like an
XML format:

<sub-class-of type="application/xml"/>

You can test the result with the tools gvfs-info, kmimetypefinder and
xdg-mime. Please check the results and post them if necessary.

Regards, Daniel

Reply to: