Freedesktop Application Icon / magic database (Debian)
Felix Natter
fnatter at gmx.net
Wed May 1 04:41:19 PDT 2013
hi,
I am in the process of packaging "Freeplane" 1.2.x/1.3.x for Debian
(Testing/"wheezy") and am having problems with the icons being displayed under
GNOME3 (classic, nautilus 3.4.2).
Freeplane >=1.2.x uses the file extension *.mm and the magic information
(XML prefix) '<map version="freeplane' (which distinguishes it from
freemind that also uses *.mm).
This works for the right-click menu and the command executed from
nautilus 3.4.2 (GNOME): The freeplane icon is displayed in the right-click
menu if and only if the *.mm file starts with '<map version="freeplane'.
However, the icon that is configured (see next section)
is not displayed (I see a blank white icon).
The package installs /usr/share/mime/packages/freeplane.xml
(which is the basis for the other files in /usr/share/mime):
-------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-freeplane">
<comment xml:lang="cs">Freeplane Mapa</comment>
[...]
<icon name="/usr/share/icons/hicolor/scalable/apps/freeplane.svg" />
<glob pattern="*.mm" />
<magic priority="66">
<match type="string" value="<map version="freeplane" offset="0" />
</magic>
<sub-class-of type="text/plain" />
</mime-type>
</mime-info>
-------------------------------------
/usr/share/icons/hicolor/scalable/apps/freeplane.svg does exist and can
be opened in eog.
I also tried <icon name="freeplane.svg"/>, <icon name="freeplane"/> and
<icon name="freeplane.png"/> (by changing
/usr/share/mime/packages/freeplane.xml and running update-mime-database
/usr/share/mime) but see no change.
'file' does not detect the correct mime type, but I don't think this
is related to my problem [1] (since it works with the right-click menu):
$ file --mime freeplane.mm
freeplane.mm: application/x-freemind; charset=us-ascii
/usr/share/file/magic.mgc does not contain "freeplane", only "freemind".
I read this: http://wiki.debian.org/MimeTypesSupport, but apart from
this there is not much Debian documentation about mime types.
Of course I read the spec, but don't yet understand this:
icon: [...] "This element is not used in the system database, but only
used in the user overridden database"
[1] OT: can this be fixed by editing /usr/lib/mime/packages/freeplane?
Shall I submit Freeplane magic information to
http://www.darwinsys.com/file/?
Thank you!
Best Regards,
--
Felix Natter
More information about the xdg
mailing list