How to properly register a program in KDE/GNOME
Hello,
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]
Version=1.0
Encoding=UTF-8
Name=FreeMind
Exec=/usr/bin/freemind
Terminal=false
Icon=/usr/share/pixmaps/FreeMindWindowIcon.xpm
Type=Application
MimeType=application/x-freemind
Categories=Application;Office;
GenericName=FreeMind
Comment=A free mind mapping tool
$ 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="<map" offset="0"/>
</magic>
</mime-type>
</mime-info>
(the magic thing is needed to make the difference with troff files)
$ cat /usr/lib/mime/packages/freemind
application/x-freemind; /usr/bin/freemind '%s'; test=test -n "$DISPLAY";
description="FreeMind MindMap file"; textualnewlines; nametemplate=%s.mm
$ cat /usr/share/menu/freemind
?package(freemind):needs="X11" section="Applications/Office"\
icon="/usr/share/pixmaps/FreeMindWindowIcon.xpm"\
title="FreeMind" command="/usr/bin/freemind"
$ file New\ Mindmap.mm
New Mindmap.mm: Freemind document
I'm using CDBS for my package, but konqueror continues to interpret
FreeMind files as text file, without proper icon and without FreeMind
automatic opening. From users' feedbacks, I understand that it's the
same problem under GNOME.
I haven't it yet in my package but I tried to call "update-mime-database
/usr/share/mime" by hand, without noticeable effect...
Any idea what I'm missing?
Thanks, Eric
Reply to: