[conspire] myopen(1)

Don Marti dmarti at zgp.org
Thu Mar 26 19:35:09 PDT 2009


begin Eric De Mund quotation of Thu, Mar 26, 2009 at 02:40:48AM -0700:

> 4a. There doesn't appear to be any agreement on how developers (of GIMP,
>     of evince, of xpdf, to speak of PDF-capable programs, for example)
>     should be touching mimeinfo.cache. Is it a complete free-for-all? Is
>     any program allowed to edit mimeinfo.cache, and put itself first in
>     line, as the preferred handler for a particular type of file?

Have you looked at /etc/mailcap?  There's a whole
convention on how that gets built and updated by
the package manager (at least under Debian -- other
distributions must have something similar.)

> 4b. Even if there are freedesktop.org project guidelines for applica-
>     tions on how and when they're to touch mimeinfo.cache, there doesn't
>     appear to be any way for me, the user, to weigh in with a standing
>     declaration of "If an entry (i.e. an application or a list of appli-
>     cations) for file type 'application/foo' appears in the file, please
>     append rather than prepend yourself to that entry/list." Again, not
>     rocket science.

You can make your own ~/.mailcap file to override the
system one -- see man mailcap and the "run-mailcap"
utility.

Another useful trick for getting MIME types from
files is "file -ib".

  file -ib hifi.m3u

-- 
Don Marti                                 +1 510-332-1587 mobile
http://zgp.org/~dmarti/
dmarti at zgp.org
See you at OpenSource World: August 11-13, 2009 in San Francisco




More information about the conspire mailing list