Description of problem: Mathematica (10) provides a set of mime info files. If they're installed on Fedora 23, they don't actually do the job you expect, and the reason is that the entry in freedesktop.org.xml overrides the vendor supplied ones, so the wrong image icon is chosen, and notebook files are detected as having mime type application/mathematica rather than application/vnd.wolfram.nb, which is what is expected by the vendor supplied .desktop file. In summary, the mathematica entry in freedesktop.org.xml should be removed. It's broken, and breaks installations of mathematica.
Created attachment 1116959 [details] Vendor provided mime info for .nb files For reference I'm attaching the upstream mime and .desktop files.
Created attachment 1116960 [details] Vendor supplied .desktop file
Created attachment 1117208 [details] Patch to reduce priority and weight of mime matches for mathematica .nb files The attached patch should fix the issue by down weighting the shipped mathematica .nb mime definitions, such that if the vendor supplied definitions are present, they're used in preference. However, for some reason, with this patch, the results are inconsistent: $ xdg-mime query filetype exercise3.nb application/mathematica $ mimetype exercise3.nb exercise3.nb: application/vnd.wolfram.nb The first result is wrong, the second result is right. Nautilus also gets it wrong. gvs-info output: $ gvfs-info exercise3.nb display name: exercise3.nb edit name: exercise3.nb name: exercise3.nb type: regular size: 10917 uri: file:///home/jgu/Teaching/PHAS1449/2015-2016/Lecture%203/exercise3.nb attributes: standard::type: 1 standard::name: exercise3.nb standard::display-name: exercise3.nb standard::edit-name: exercise3.nb standard::copy-name: exercise3.nb standard::icon: application-mathematica, x-office-document standard::content-type: application/mathematica standard::fast-content-type: application/vnd.wolfram.nb [snip] So I dunno... something is very broken with mime matching currently I think. Or I've done something dumb.
With that patch applied, /usr/share/mime/globs2 contains: 50:application/vnd.wolfram.nb:*.nb [snip] 30:application/mathematica:*.nb so, any .nb file really should be recognized as application/vnd.wolfram.nb, so I am totally confused as to why that's not happening.
Even more interestingly, with the patch installed: $ kmimetypefinder junk.nb application/vnd.wolfram.nb (accuracy 100) So, seems there's actually a bug in gvfs. Anyway, to close this bug, applying the patch attached should be all that's needed.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.