[opensuse-buildservice] How to associate an extention with an executable via package?
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. -- Tia, Richard -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
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. -- Susanne Oberhauser +49-911-74053-574 SUSE -- a Novell Business OPS Engineering Maxfeldstraße 5 Processes and Infrastructure Nürnberg SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Richard Bos
-
Susanne Oberhauser