Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
[shared-mime-info] update from 1.2-2 to 1.3-1 "breaks" .iso files (.txt file icon / behavior).
This is an issue that is out there for quite a while (31 May 2014) although I have just recently noticed it.
shared-mime-info update from 1.2-2 to 1.3-1 "breaks" .iso files (.txt file icon / behavior).
pacman -Qi shared-mime-info
Name : shared-mime-info
Version : 1.3-1
Description : Freedesktop.org Shared MIME Info
Architecture : i686
URL : http://freedesktop.org/Software/shared-mime-info
Licenses : GPL2
Groups : None
Provides : None
Depends On : libxml2 glib2
Optional Deps : None
Required By : akonadi cmake fceux gtk2 gtk3 kdelibs libreoffice-common virtualbox
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 4104.00 KiB
Packager : CENSORED for privacy purposes.
Build Date : Sat 31 May 2014 19:16:25 IST
Install Date : Mon 30 Jun 2014 15:33:46 IST
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
All You have to do is upgrade as usual (at least in Arch Linux). Open lets say Dolphin file manager. Browse to any folder that contains lets say Arch Linux iso. You will notice that the iso has a .txt file icon. Also if You right click on it and choose "Open With" You will get text editors.
Bump priority for ISO images glob matchingTo work-around file managers that cannot use magic to differentiatemime-types.https://bugs.freedesktop.org/show_bug.cgi?id=80877
Yes. It has already been patched and provided for download.
I used "mc" (midnight commander) to view the openSUSE ISO for Tumbleweed.
The following was viewed at the beginning of the ISO:
<--- snip -----------------------------------------------------
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: openSUSE-Tumbleweed-DVD-x86_6400
Volume set id:
Publisher id: SUSE LINUX GmbH
Data preparer id: KIWI - http://opensuse.github.com/kiwi
Application id: openSUSE-Tumbleweed-DVD-x86_64-Build0002-Media
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 2257732
El Torito VD version 1 found, boot catalog is in sector 20
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
Eltorito validation header:
Hid 1
Arch 0 (x86)
ID 'SUSE LINUX GmbH'
Key 55 AA
<--- snip -----------------------------------------------------
Does the Eltorito validation header key "55 AA" provide additional information to identify this iso? Can it be added?
When using GNOME's Nautilus filemanager. Does it use magic to differentiate mime-types?
I have kept our Bugzilla apprised of the date of your patch.
Our "shared-mime-info" package was available several days after your patch was applied to the shared-mime-info master.
The openSUSE 13.2 update version number is shown below:
shared-mime-info 1.4-2.4.1 rpm package
Build date: Fri 20 Feb 2015 07:55:28 AM EST
I would recommend to users still experiencing this problem to check their distro for an update. It should have been available in the first quarter of 2014.
Or you can manually add this line below to the x-cd-image entry to the file freedesktop.org.xml.
``
In openSUSE 13.2 and Tumbleweed:
The file name can be found in /usr/share/mime/packages/freedesktop.org.xml
Note:
Depending on the distro a slightly different file name may be used.
Bastien: you say "There is a conflict. The file manager is supposed to use the magic to differentiate the mime-types.".
My code in Qt and KDE certainly does that, as per the spec.
The problem is, there is no magic for application/x-cd-image.
So what should we do in such a case?
Sounds like Nautilus will reject the other two candidates because their magic doesn't match, and then fallback to the mimetype without magic?
That seems to be against the spec, which says
"...start by doing a glob match of the filename. Keep only globs with the
biggest weight. [...] If the glob matching fails or results in multiple
conflicting mimetypes, read the contents of the file and do magic sniffing on
it. If no magic rule matches the data (or if the content is not available), use
the default type of application/octet-stream for binary data, or text/plain for
textual data. [...]"
We are in the "no magic rule matches" case here, aren't we?
The correct solution for the *.iso issue would be to give all types the same glob weight and, most importantly, also "magic" patterns that can be used to detect them, including application/x-cd-image.
Hi
The behavior described in the following link is still happening on Arch Linux running shared-mime-info 1.10-1 and Dolphin 18.08.2 file manager.
https://bugs.kde.org/show_bug.cgi?id=387068
Can anyone confirm if such behavior is related to the issue reported here please?
Thanks.
Still a bug to today with a recently compiled system.
I guess a question a lot of people would like to know, why does this seem to be specifically broken by following the spec, and why doesn't gnome or whatever is holding this back fix their bug to actually follow the spec as well?
I don't think there's any way we can express a solution to this problem in shared-mime-info. *.iso files have a mime-type, the *.iso glob for application/x-cd-image has more weight than other globs for other mime-types, and a well-formed *.iso that isn't one of the other mime-types will not match them.
I don't really see what else can be fixed on the shared-mime-info database side, short of update the specification. @faure?
Second, the big question is whether we are indeed in the "no magic rule matches the data" case. Any mimetype with any matching magic messes up the situation. On my system with shared-mime-info 1.9, this resulted in model/x.stl-binary for some iso files, because that mimetype used to have far-too-unspecific magic (3 nul bytes), fixed in commit 7c7f84e2.
After upgrading to shared-mime-info git master, it actually works:
$ kmimetypefinder5 /tmp/maui-0.5.1-x86_64.iso says application/x-cd-image
@overminddl1, can you do the same test on that same file? If it works for you, can you provide a file (or URL) which fails for you, using kmimetypefinder5?