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

Re: adding new mime-types



Am Freitag, den 09.09.2005, 12:54 +0200 schrieb vud1:
> Hi all.
> 
> I am doing a debian-package for a program that i am writing. My program
> is an diagram-tool that saves files *.cgt (xml files that i have
> invented specially for my application).
> 
> I would like to integrate my program with gnome, so i would like to make
> a deb package that would insert the new mime-types and asociated the
> *.cgt extension with my program.
> 
> At this moment i have create a program.keys and a program.mime files in 
> /usr/share/mime-info

Obsolete since GNOME 2.8 (really used only for GNOME <= 2.4) and AFAIK
not longer used. To associate your program with your MIME-type you need
to create a .desktop-file and install it into /usr/share/applications.
See [1].

> I have create too a program file in 
> /usr/lib/mime/packages

You need to create a new entry for the shared-mime-info database
in /usr/share/mime/packages. See [2]. The above mentioned directory
contains the entries for metamail's /etc/mimecap.

> but the system dont recognize my *.cgt files yet... When i right-click
> over my *.cgt file nautilus said me that this is a text/xml content, and
> not application/x-program :(

Did you run update-mime-database (to recognize the new MIME type) and
update-desktop-database (to update the MIME<->Application database)?

> So.. i think that a need any more configurations.. I have reeding
> documentation and i think that i must use the update-mime comand in my
> debian/postinst script.. but it is not enought.

The postinst script is ok, but you run update-mime-database without
installing the necessary entry to /usr/share/mime/packages.

[1] http://standards.freedesktop.org/desktop-entry-spec/latest/
[2] http://standards.freedesktop.org/shared-mime-info-spec/latest/

Regards, Daniel



Reply to: