GNOME Bugzilla – Bug 315595
Nautilus thinks it is MS WIndows
Last modified: 2005-09-09 15:13:57 UTC
Version details: 2.10.1-4 Distribution/Version: debian sid It is up to an application to handle its files securely. Nautilus should not prohibit opening of a file with a specified applications just because it is confused. See attached screenshot of an error dialog obtained when clicking on a mathematica file. I marked the severity as major because it is now impossible for our users to open mathematica files by clicking on them.
Created attachment 51995 [details] screenshot of error dialog
Hrm I wonder where the MIME type definition for "Mathematica document" comes from. "Mathematica Notebook" (application/mathematica) is from the freedesktop.org MIME definitions. Maybe you could grep in /usr/share/mime/packages for "Mathematica document" and tell us what file provides this?
mathematica.xml seems to provide it. The whole content of the file is: <?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-mathematica"> <comment xml:lang="en">Mathematica document</comment> <glob pattern="*.nb" /> </mime-type> </mime-info> steiner:/usr/share/mime/packages# ls -l mathematica.xml -rw-r--r-- 1 root root 295 2004-08-30 16:04 mathematica.xml Chances are that this is a leftover from some early configuration for Mathematica before Gnome was using the freedesktop mime database. Of course the mime type application/x-mathematica specified in that file is what used to be suggested for Mathematica and so many web sites serve mathematica filesunder that mime-type.
Bug 309862 is a "security dialog" message rant as well, so I'm marking this as dup. On the Mathematica-specific bug: I've filed a bug report [1] against shared-mime-info requesting that the relation between "application/mathematica" and "application/x-mathematica" should be reflected in the freedesktop.org.xml file you can find in /usr/share/mime/packages. [1] https://bugs.freedesktop.org/show_bug.cgi?id=4403 *** This bug has been marked as a duplicate of 309862 ***
I have read 309862 and see that in future versions of nautilus there may be hope of having this kind of problem cropping up less often but unfortunately the decision appears to be that nautilus will still prevents users to open some files by (double) clicking with this useless dialog even if it should clearly be teh application's responsibility to handle any such file securely. SInce our users will simply need to told, "well nautilus sucks here, just specify the app directly" the applications will need to do that anyways. I guess we'll add this to "yet another reason to finally switch from GNOME".
Well, when I remove the mathematica.xml file, I don't get the above dialog anymore but I also loose the ability to open Mathematica Notebooks at all since now nautilus does not know anymore that mathematica is associated with these Mathematica Notebooks.
There is no need for removing the Mathematica XML file. You can either add an <alias type="application/x-mathematica"/> tag to /usr/share/applications/freedesktop.org.xml below the <mime-type> node of "application/mathematica", or alternatively associate the mathematica.desktop file with the "application/mathematica" MIME type by appending ";application/x-mathematica" to the MimeType key. To be honest my impression is and was the dialog was added to debunk bugs in the MIME database, and it does its job pretty well at that, although it horribly bugs users.
/usr/share/applications/freedesktop.org.xml should have been /usr/share/mimefreedesktop.org.xml.