This is interesting. Here I am trying to figure this out by reading the various files in /usr/share/mime and /etc/mimetype
I think you are right, the xml files in /usr/share/mime just defines an mimetypes without specifying how to identify it from the filename (e.g. using some regexp match). And in /etc/mimtetypes, there are lines such as
Code:
application/vnd.oasis.opendocument.text odt
That seems to do such thing. I am not so clear on what responsibilities are delegated to each configuration files
On the other hand, suppose I now give up on system-wide configuration. If I ask GNOME or KDE to use say xpdf to open an application/pdf file, where is this configuration information stored? In some plain text (xml??) file or in binary form. It is sometimes interesting and necessary to be able to mess with such file by hand...
EDIT: I finally found the answer to my original question. Check the file
/usr/share/applications/mimeinfo.cache