mime and freedesktop (was: Desktop Icons)

Thomas Leonard tal00r at ecs.soton.ac.uk
Thu Oct 2 12:28:38 CEST 2003


On Wed, 01 Oct 2003, edscott wilson garcia wrote:
> On Wed, 2003-10-01 at 04:20, Thomas Leonard wrote:
> <snip about MIME>
> > No, there are two parts:
> > 
> > file      -> MIME-type
> > MIME-type -> Comment, etc
> > 
> > The first is done with a few binary(ish) files so that you don't have to
> > read in the whole database just to find out that foo.html is a text/html
> > file. We found that reading 700K of XML at startup was slow.
[...]
> Unfortunately the most important part of MIME is missing. M.'s MIME type
> allows a web browser to figure out what *application* to use to open the
> data being received over the wire. A merged database from G. and K.
> should tell me *what* applications are available.

That depends what applications are installed. The core database doesn't
depend on any applications, and so doesn't list any. Like I say, any
application can extend the database (eg, Gimp can add the information that
it can edit image/png files).

See the (new) tutorial here:

	http://www.freedesktop.org/Standards/AddingMIMETutor

Note that the actual format for extending the database in this way hasn't
been decided yet, although the tutorial shows how it may look. If XFCE
isn't interested in sharing this information with other desktops (as is
the case currently) then you can just add XFCE-specific stuff. Eg, drop
this file:

<mime-info>
  <mime-type type='image/png'>
    <xfce:can-open-with>gimp</xfce:open-with>
  </mime-type>
  ...
</mime-info>

into mime/packages/xffm.xml to add your extensions to the DB.

> > Once you've got a MIME type, you just load the XML files for that type
> > (text/html.xml) to get a description in the appropriate language (if you
> > want it).
> 
> Then what's the use for the 700K freedesktop.org.xml file?

That's what the text/html.xml file is generated from. Only the
update-mime-database reads files in the packages directory.

> > I already merged GNOME and KDE's databases into the shared database above.
> > But anyway, you can't just combine everything because the point of a
> > shared MIME system is that everyone uses the same name for a type. DnD,
> > icon themes, etc don't work if one desktop uses text/x-perl and one uses
> > application/x-perl...
> 
> AFAIK, the application receiving the drop checks for the mime type too.
> In fact, should: I'm sure you have received emails with attachments
> catalogued as "application/x-audio", which inferior mail programs
> believe, with funny consequences.

Well, that type doesn't seem to exist (surely it would be in audio/*?),
but I'd expect by emailer to present attachments using their listed types
unless the type is obviously wrong or unknown, as in this case.

[themes]
> ROX-filer would need to be linked with the xfce mcs manager library so
> that changing the icon theme in ROX-filer would change the one in xffm
> and vice versa. That would make ROX-filer and xffm appear as a single
> coordinated application: pretty cool.

I'm assuming the filer would use a normal XSetting so that it followed
nautilus and konqueror (see the xdg list archives). Surely xffm will do
the same thing, once the setting's name has been decided?


-- 
Thomas Leonard			http://rox.sourceforge.net
tal00r at ecs.soton.ac.uk	tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1



More information about the Xfce4-dev mailing list