mime and freedesktop (was: Desktop Icons)
edscott wilson garcia
edscott at imp.mx
Wed Oct 1 17:14:24 CEST 2003
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.
That's the kind of stuff I use dbh hash files for. But let me look at
the 700K... Yeah, what I thought. The 700K bulk is made of program
descriptions in many languages (although several official languages of
India are missing;). For a treeview exclusive filemanager such as xffm,
that information is not very useful, save for popups (but those popups
would would not pass the Joe Klemmer bloat control test).
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.
What good is it to know that a "*.gra" file is a "Crea gráficas
científicas" if I don't know what program(s) to use?
If I know what program(s) to use, then I'm aware of what the file is
about, so the description is nice eye candy, but redundant.
> 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? Me thinks
that it should not have descriptions if you are going to read the
individual XML files anyway.
> > And there is one thorn drawing blood...
> > If mime info boils down to one file (xml or binary) shared by all
> > desktops, which desktop in a multi-desktop environment, will provide for
> > it?
> GNOME and KDE have agreed to use the common base package (which ROX-Filer
> already uses) here:
You should update the page at
"The specification is fairly stable. The shared package has been used by
ROX-Filer since July 2002. Current issues keeping this as 'draft' are:
*The Desktop Base Directory Specification, which this relies on, is
still a draft.
*Waiting for feedback from KDE implementation of the spec, to make sure
no additional issues turn up."
This implies that K. is undecided and that G. has not even answered
(there is no mention as to what G. has said).
> GTK's FileChooser widget for 2.4 uses this too. Any desktop or application
> can suppliment the database.
> > No trouble exists to make xffm able to read mime info provided by G., K.
> > and B. on the fly.
> 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
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.
> (Incidentally, ROX-Filer now supports icon themes, so displaying the same
> icons in both filers should just be a case of setting the filer's theme to
> 'xfce4', if xffm does it too. GTK 2.4 has icon theme handling code
The problem is that xfce4 has more than one icon theme: the panel has 9
themes and filemanager has 7 (Jasper is always one step ahead).
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.
This could be easily accomplished with a --enable-xfce-mcs-manager
option to the configure script so that non-xfce users could still get
the standalone ROX-filer. It's your call.
More information about the Xfce4-dev