After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 129792 - extended attributes support for mime types
extended attributes support for mime types
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Alexander Larsson
gtkdev
Depends on:
Blocks:
 
 
Reported: 2003-12-21 17:52 UTC by Allison Karlitskaya (desrt)
Modified: 2013-02-05 03:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
my (bad) patch (against 2.5.3) (1.63 KB, patch)
2003-12-21 17:57 UTC, Allison Karlitskaya (desrt)
needs-work Details | Review

Description Allison Karlitskaya (desrt) 2003-12-21 17:52:01 UTC
hello.

linux has a feature on many of its filesystems (ext2 and ext3, at least)
called 'extended attributes'.  this is how POSIX ACLs are implimented, but
it's a rather generic interface.  it allows, for example, setting of
user-specified attributes of arbitrary names and types on a per-file basis.
(attributes of the form user.___)

the attr(5) man page, as an example, makes mention of using the
user.mime_type attribute to specify the mime type of a file.

i believe gnomevfs should support and honour this attribute.  i've made a
patch (which is little more than proof of concept).  i know that it won't
compile on machines that don't have xattr support (because i don't know how
to use autoconf).

is there any interest for this sort of feature?

perhaps it would be better to impliment a more generic extended attribute
interface in gnomevfs and then impliment the mime type lookup through that
new interface.  perhaps this is a bit heavy, though, and something better
left to nautilus (ie: you can view/set attributes in the file properties
dialog and gnomevfs only knows or cares about user.mime_type)

just some ideas.  it would be nice if this was supported in some way for
the future, though (maybe even in 2.6!)  thanks.
Comment 1 Allison Karlitskaya (desrt) 2003-12-21 17:57:59 UTC
Created attachment 22618 [details] [review]
my (bad) patch (against 2.5.3)
Comment 2 Christophe Fergeau 2004-01-04 20:44:21 UTC
For the record,
http://mail.gnome.org/archives/nautilus-list/2004-January/msg00003.html
has another proof of concept patch about gnome-vfs and EAs.
Comment 3 Alexander Larsson 2004-01-15 10:18:36 UTC
There has been lots of discussion about mime types recently, and some
changes has been made. I'm not sure doing mime types with EAs like
this is the right thing. Its pretty slow for one, and the EA can
become stale etc.
Comment 4 alexander.winston 2004-01-25 00:00:59 UTC
Adding the PATCH keyword.
Comment 5 Sebastian Rittau 2004-07-26 00:49:49 UTC
I'm personally very interested in EA support for gnome-vfs. I think that EA is
the only viable long-term solution for determining MIME types. Determining MIME
types by file name extension is error-prone and ugly. (I for one don't use file
extensions on all my files, for example.) Determining MIME types by file content
is also error-prone and slow. Keeping the type with the file is the best
solution IMO.

If there is interest in a solution, I am willing to write a proper patch. Both
patches supplied in this bug have their strengths, but are also missing stuff.
Comment 6 Allison Karlitskaya (desrt) 2005-05-01 18:15:28 UTC
Sebastian: please see and comment on/modify http://live.gnome.org/GnomeVFSMetadata
Comment 7 Alexander “weej” Jones 2006-06-12 09:25:21 UTC
There is an apache module, mod_mime_xattr (http://0pointer.de/lennart/projects/mod_mime_xattr/) that has settled on using user.mime_type as their MIME-type hinter.

I think GNOME-VFS should honour this EA if it is present. Otherwise it can fall back to the old methods.

That live.gnome.org page is dead. As is this bug, apparently. Can we drum up some more interest in this, please? Filename extensions suck.
Comment 8 Alexander “weej” Jones 2006-06-12 17:52:44 UTC
How feasible is it to re-invent the wheel (a bit) and add more integrated support for file type into our file systems?

How does this work on Mac OS X?
Comment 9 Joel Parker 2006-11-14 01:46:39 UTC
This would be very useful to me as a general user, and would go a long way towards letting me clean up my desktop even more. I run across MIME errors quite frequently, especially with MATLAB scripts being detected as Objective C source files and data files (.dat) being opened with Totem.
Comment 10 André Klapper 2008-09-06 18:54:29 UTC
gnome-vfs has been deprecated and superseded by gio/gvfs since GNOME 2.22, hence mass-closing many of the gnome-vfs requests/bug reports. This means that gnome-vfs is NOT actively maintained anymore, however patches are still welcome.

If your reported issue is still valid for gio/gvfs, please feel free to file a bug report against glib/gio or gvfs.

@Bugzilla mail recipients: query for
      gnome-vfs-mass-close
to get rid of this notification noise all together.


General further information: http://en.wikipedia.org/wiki/GVFS 
Reasons behind this decision are listed at http://www.mail-archive.com/gnome-vfs-list@gnome.org/msg00899.html
Comment 11 Matthias Clasen 2013-02-05 03:22:13 UTC
Lets just close this for now.