Re: Registering MIME types and applications



On Fri, 2004-07-02 at 00:19, Murray Cumming wrote:
> I'm trying to figure out what an application should do to register a new
> MIME type with GNOME 2.6, and to register itself as an application that
> is capable of opening that MIME type.
> 
> I have found the following techniques. Maybe there are more. I'd like to
> know which of these are outdated and which are the new approved
> techniques. Also, should an application register itself with multiple
> (old and new) MIME-type systems?
> 
> 1. Registering the MIME-type by putting a .xml file in 
> <prefix>/share/mime/packages, 
> and running update-mime-database.
> 
> 2. Registering the application by putting an .applications file in 
> <prefix>/share/application-registry/
> 
> 3. Registing the application by putting a .desktop file in 
> <prefix>/share/applications/
> 
> 4. Registering the MIME-type by putting a .mime file in 
> <prefix>/share/mime-info/
> 
> 5. Registering the application by putting a .keys file in 
> <prefix>/share/mime-info/
> 
> I thought that 1, 2, and 3, were the new ways to do this, but it only
> causes Nautilus to show the MIME-type (e.g. application/x-glom), but not
> the MIME-type's name. And it does not know that it should launch glom to
> open that file.

In addition to other peoples comments i'd like to add that we're working
on a new freedesktop.org system that handles the mapping from mime type
to application (in addition to the current common file -> mimetype
system). It will involve something like adding a mimetypes=.... to the
desktop file, and running some updated similar to update-mime-database
to extract this into a global mimetype -> desktop file list.

This is not finalized yet, but I hope it'll be done soon.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a Nobel prize-winning guitar-strumming matador with acid for blood. She's 
a violent blonde queen of the dead with an evil twin sister. They fight crime! 




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