I can't find an existing bug report for this, but anyway. Here's a patch which makes xdg-mime try the mimetype command before file when using the generic method. So that shared-mime-info is used.
Created attachment 42008 [details] [review] xdg-mime-generic-use-mimetype.diff
Good idea. I just found this right after filing #33097... In short, it's a simple additional change: normalize the path using "readlink -f" at the beginning the info_generic method.
Ah, thanks! I had forgot about it. I've submitted a patch to 33097 now which dereferences the symlink before calling any method. So applying that patch will make this one work with symlinks as well.
Thanks! I'm on Ubuntu Lucid (LTS) and had endless problems with Google Chrome and other apps under Fluxbox. With a backported xdg-utils from Ubuntu Maverick plus your two pacthes (slightly adjusted to match), finally these apps behave well even without a desktop environment. I've tested this in my PPA, https://launchpad.net/~danmbox/+archive/ppa I guess we'll have to wait for a new xdg-utils in Natty, to be followed by a backport...
Created attachment 44936 [details] [review] Updated version of the above to work in Gnome The previous patch doesn't run on Gnome systems that have neither gvfs-info or gnomevfs-info installed, which is the case on default Ubuntu Natty. I have extended it in a straightforward way, and it works :)
Imo, a default gnome install without either gvfs-info or gnomevfs-info present is ... not ideal I guess it won't hurt to add this, but what is this 'mimetype' utility mentioned in the patch? I'm not familiar with it.
Ah, corolary to mimeopen, nvm, good! :)
http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=0fe531fd81740c725a99d09593a280e60692600c Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.