Hi,
I have a package that provides an executable (/usr/bin/ib) for data files with the extension .ibv. How can I associate the executable /usr/bin/ib with the extension (.ibv) via package? Should I install a mimetype file in the directory /usr/share/mime? If yes, what should the file contain? If I look at e.g. /usr/share/mime/application/x-zoo.xml it does not really seem to link an extension with an executable.
Hopefully someone can shine some light on this topic.
Richard Bos rbos@opensuse.org writes:
Hi,
I have a package that provides an executable (/usr/bin/ib) for data files with the extension .ibv. How can I associate the executable /usr/bin/ib with the extension (.ibv) via package? Should I install a mimetype file in the directory /usr/share/mime? If yes, what should the file contain? If I look at e.g. /usr/share/mime/application/x-zoo.xml it does not really seem to link an extension with an executable.
have a look at /usr/share/mime/packages/ and http://www.freedesktop.org/wiki/Standards/shared-mime-info-spec /usr/share/doc/packages/shared-mime-info/README
linux/unix file types are determined by file content matching (called 'magic') or alternatively file extension matching (called 'glob'). The content match is preferrable as it's more robust to user errors.
After you've set up the file below /usr/share/mime/packages/, you run /usr/bin/update-mime-database, from %post...
hth?
S.
buildservice@lists.opensuse.org