Re: linking binfmt_misc with mime-types
On Wed, 6 Oct 1999, Brian May wrote:
> >> What I really would like is a filesystem that can store a mime-type for
> >> every file... That way no magic databases are required. In addition, the
> >> kernel could be configured to assign default mime-types for different
> >> file extensions, or something.
> >Apples MacOS does nearly that (not really MIME types, but a proprietary
> >code with the same intention). First I liked the idea, but after some time
> >the whole thing started to suck deadly and when I work on a Mac now, one
> >of the most important utilities I use is named 'Set its type!'.
> Where Macintosh fails, IMHO, is due to
> - No easy way to change the file type.
> - The information it proprietary, and not used anywhere else.
Part of the problem. Mapping works well with WWW downloads, but bad with
floppies from other OSes.
> - I am not very familar with the operating system, so there might
> be more points that I have missed. Perhaps there are difficulties
> loading a file for one application inside another application?
Most programs are AppleThink and refuse to open files of types they don't
know. A few try to determine the type based on the contents. The rest
(development tools or very tiny programs mostly) bluntly ignores the type
and tries to open anything.
> - AFAIK, Macintosh doesn't really store "file type" but rather "which
> application is this file associated with". So if you have multiple
> programs that deal with the same file type, the file has to be
> associated with *exactly one* application. (not sure about this)
It stores 'type' and 'creator'. Creator is the default application.
> - just curious: what other times do you need to change this file type?
Seldom, but the one problem is sufficiently ennerving.
> I am not proposing any "click it and wait for the magic" type think
> here, that was more related to the binfmt_misc proposal, where executing
> a file would automatically open the file with the correct program.
Sorry, then. I understood it that way.
> However, this is already done with WWW, and I don't see any problems
> there (except misconfigured MIME types on some servers - something
> that would benifit from my proposal, at least for HTTP).
The problem I see is that the same file can be a lot of different things
at the same time. Take a C header file. Sometimes you want it to be a
text file. Sometimes you want it to be a C header file (I know I can say
text/C-header which makes MIME better than MacOS, but read on). Sometimes
you want it to be a C++ header file. Perhaps it is also an icon saved by
a program that chose to save icons so that they can be easily included as
arrays into C programs. To make things even more amusing the file could be
So there may be moments the MIME type won't do the right things for you. I
admit it DOES very often. Just carry a MIME type with the file is, of
course, no problem.
If it is used to determine possible actions on a file, it may get in your
way. If Netscape or pine or something won't do the right thing, I can go
and save the file and do with it whatever I want. If my OS starts do do
the same strange stuff as Netscape, I have to start kinda hacking until it
If the type is never used, what's it good for? It makes life easier for
Bj"orn Brill <firstname.lastname@example.org>
Frankfurt am Main, Germany
P.S.: I hope you did not feel offended by my previous posting, as that was
not my intention. I just wanted to report some non-Linux experience on
problems caused by the (too?) systematic use of a system similar to MIME.