Proposal for a MIME mapping spec

David Faure dfaure at
Thu Jul 8 13:54:08 EEST 2004

On Thursday 08 July 2004 11:12, Mark McLoughlin wrote:
> Hi Jonathan,
> 	Proposal looks good, just some random comments :-)
> On Wed, 2004-07-07 at 22:22, Jonathan Blandford wrote:
> > Each application installs a .desktop file that lists the MIME Types that
> > it can support.  A program is then run which caches a mapping of MIME
> > Types to desktop files.  
> 	I'm a tiny bit concerned about us continually overloading .desktop
> files and that perhaps an app might want to be added to the mime mapping
> but not the menus. Not a huge concern, its probably the best thing to do
> overall.

That's what NoDisplay=true is for.

PS: has a broken link to

> > Every application installs a .desktop file as described in the current
> > spec.  The 'MimeType' field in that desktop file includes a list of
> > every MIME Type that that application can handle.  For example, a PDF
> > viewer could have the following entry:
> > 
> > MimeType: application/pdf
Obviously s/: /=/, as per the desktop entry spec.

> > Applications that can handle multiple MIME Types would list all of the
> > ones it can handle in a ';' separated list.  
> 	All other lists in .desktop files must be terminated with a ';' AFAIR.

That's an old KDE-1 thing, I suggest we drop it. It's not necessary anymore.

> > There is also a preference list to determine preferred application of a
> > given MIME Type.  It defines the 'default' application to handle a given
> > MIME-Type.  It has the same format as the cache list, except that each
> > entry is limited to only one item:
> > 
> > mime/type:file.desktop
> 	Is it entirely necessary to keep the .desktop suffix? Something like:
> application/pdf: gpdf
> 	feels marginally more sane than:
> application/pdf: gpdf.desktop

> 	OTOH, though, it could lead to the expectation that its a mime type to
> executable mapping rather than mime type to .desktop file mapping.
Yes, it would be confusing.
People will think it's the executable name that has to be listed, but it's not.
E.g. the desktop file for kmail is KMail.desktop (for no particular reason, but it is),
so the above should say "KMail.desktop"

In case we still support subdirs (do we?) it also allows foo/bar.desktop

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the xdg mailing list