mime and freedesktop (was: Desktop Icons)
edscott wilson garcia
edscott at imp.mx
Thu Oct 2 15:43:58 CEST 2003
On Thu, 2003-10-02 at 05:28, Thomas Leonard wrote:
<snip>
> > 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).
A simple "g_find_program_in_path()" is all that is needed to ignore
applications which are not installed. When somebody does a RH
installation like Chuck once suggested ("install everything"), you end
up with many useful application that you have no idea what they are
good for. The file manager should be able to suggest "open with Gimp" if
Gimp is installed and the users is trying to figure out an .eps file.
And also give other options if available. A core database that could
help out on this would be *very* helpful.
> See the (new) tutorial here:
>
> http://www.freedesktop.org/Standards/AddingMIMETutor
>
Will do.
> 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.
I see. I would rather something like:
<mime-info>
<mime-type type='image/png'>
<application desktop=xfce>display</application>
</mime-type>
</mime-info>
so that if ROX had:
<mime-info>
<mime-type type='image/png'>
<application desktop=rox>gimp</application>
</mime-type>
</mime-info>
It would easy to collect and use the application information from all
desktops, shared or not shared. The icon to use information would also
come in handy, but is not as indispensable.
>
> > > 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.
Good. It did seem rather awkward to do things the other way around ;-)
Although application information is still missing for it to be of use to
xffm.
> >
> > 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.
I'm afraid I don't keep virii around for reference... wait I just got
another one that passed the procmail filter:
Content-Type: audio/x-wav; name="gvjze.exe"
Content-Transfer-Encoding: base64
Content-Id: <kvhkbombi>
Does B.'s mail program fall for it? You bet.
>
> [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?
I believe it's not the same thing, but then I do not know that much
about the mcs manager. You'd have to ask Olivier about that.
>
More information about the Xfce4-dev
mailing list