Re: The status of Freedesktop.org MIME support?
- From: Hongli Lai <h lai chello nl>
- To: gnome-vfs-list gnome org
- Subject: Re: The status of Freedesktop.org MIME support?
- Date: Thu, 27 May 2004 15:46:01 +0200
Christophe Fergeau wrote:
- If I run update-mime-database ~/.local/share/mime, gnome-vfs doesn't
detect changes until I restart the entire application (Nautilus)!
Yeah, that's something I would have expected.
Will this change in the future? In my opinion it is unacceptable to
expect users to restart Nautilus every time an app has installed a new
MIME type.
As far as I know, MIME sniffing works, see for example the problems we
had with .xls files being identified as .doc files because the .doc
sniffing pattern was buggy. Nautilus only sniffs a file when you click
on it though (and if it's local). Maybe that's what you are seeing ?
To be more specific: gnome-vfs "prefers" to use
/etc/gnome-vfs-mime-magic. I have a MIME file that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-mytest">
<comment>Testing MIME override</comment>
<magic priority="51">
<match type="string" value="\x89PNG" offset="0"/>
</magic>
<glob pattern="*.png"/>
</mime-type>
</mime-info>
I put this in ~/.local/share/mime/packages, run update-mime-database
~/.local/share/mime and restart Nautilus. Nautilus detects *.png files
are application/x-mytest... until you click on them. Then they change
back to image/png.
I fiddled with the priority number but there is *no way* to override
gnome-vfs-mime-magic.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]