Nautilus should open .msi files with msiexec

Bug #229062 reported by TAC one
6
Affects Status Importance Assigned to Milestone
shared-mime-info
Fix Released
Medium
nautilus (Ubuntu)
Invalid
Undecided
Unassigned
shared-mime-info (Baltix)
Fix Released
Undecided
Unassigned
shared-mime-info (Ubuntu)
Fix Released
Undecided
Unassigned
wine (Ubuntu)
Fix Released
Medium
Scott Ritchie

Bug Description

Double clicking a .msi installer in nautilus shuold trigger msiexec if wine is installed.

How to reproduce:
Double click a .msi file in nautilus

What happens:
an error box shows ( "Couldn't display xxx.msi. There is no application for this type of file" ).

Desidered behaviour:
"msiexec /i xxx.msi" is launched and installation begins. After a while you're using a windows application on linux via wine and your soul is lost.

Tags: wishlist
Revision history for this message
Scott Ritchie (scottritchie) wrote :

wine start foo.msi might be a better idea, but you're definitely right that double clicking should install.

Changed in wine:
assignee: nobody → scottritchie
status: New → Confirmed
Changed in wine:
importance: Undecided → Medium
Revision history for this message
Scott Ritchie (scottritchie) wrote :

So, Wine 1.0.0 from intrepid now has an application/x-msi mime type entry for Wine. This presents an "open with Wine" option in Firefox for downloading .msi files, however double clicking them still gives the same error.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

This bug seems to be in nautilus now, not Wine.

When I download SteamInstall.msi, nautilus doesn't identify it as an application/x-msi type, but instead as "OLE2 compound document storage"

.msi files are that internally, however it seems strange that nautilus isn't respecting Wine's association with the file's proper mime type (/etc/mime.types identifies .msi files as application/x-msi).

What's the best fix for this? Is this a libmagic1 issue or a nautilus one?

Revision history for this message
A. Walton (awalton) wrote :

MSI files here have the content-type "application/x-ole-storage", and "application/x-msi" is entirely unregistered. It's a shared-mime-data problem.

Changed in nautilus:
status: New → Invalid
Revision history for this message
A. Walton (awalton) wrote :

A patch like this gets Nautilus and such working (patch against shared-mime-info-0.40/freedesktop.org.xml.in)

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Originally found on launchpad:

https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/229062

There's a patch there as well, which looks correct. It would be very useful to have mime info for .msi files. Thank you.

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

Do you have a minimal test file available somewhere?

Could you please also attach the patch here (minus the dup glob, they're case insensitive...)

Changed in shared-mime-info:
status: New → Confirmed
Changed in wine:
status: Confirmed → Fix Released
Changed in shared-mime-info:
status: Unknown → Confirmed
Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Created an attachment (id=17361)
Adds application/x-msi as a sub-type of application/x-ole-storage

Here is the patch, I hope it applies cleanly to the latest.

Sorry I do not have a test case, I've never dealt with this source code before and don't really know how to make one.

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

(In reply to comment #2)
> Sorry I do not have a test case, I've never dealt with this source code before
> and don't really know how to make one.

A small MSI file will do just fine. Apparently there is some magic available, and I'd like to be able to test it as well.

Revision history for this message
In , A. Walton (awalton) wrote :
Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Any updates? I'm worried this will fall by the wayside due to me not finding a small test msi file.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

here is a slightly better patch that doesn't include the duplicate glob files.

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

2008-07-21 Bastien Nocera <email address hidden>

 * freedesktop.org.xml.in: Add MSI (Windows Installer) mime-type,
 including magic, based on work from Scott Ritchie
 <email address hidden> (Closes: #16495)
 * tests/list:
 * tests/test.msi: add test case for the above

Changed in shared-mime-info:
status: Confirmed → Fix Released
Revision history for this message
Scott Ritchie (scottritchie) wrote :

My patch is now committed upstream. I'm unsure when upstream intends to do another release; before Intrepid we should update Ubuntu's shared-mime-info to the latest CVS that includes my patch.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Fixed in Intrepid. Hooray!

Changed in shared-mime-info:
status: Confirmed → Fix Released
Revision history for this message
TAC one (tacone) wrote :

Thanks !

Revision history for this message
In , Felix Möller (felix-derklecks) wrote :

This patch causes the detecten of ms-word documents to fail, see https://bugzilla.novell.com/show_bug.cgi?id=430389

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

This is a bug in kmimetypefinder, which only shows you the first matching mime-type, instead of the highest matching one (see the accuracy number).

KDE doesn't use the xdgmime code, which works fine with this.

Reopen a new bug if you have proof this is a shared-mime-info bug.

Revision history for this message
In , Stanislav Brabec (sbrabec-suse) wrote :

Created an attachment (id=19663)
shared-mime-info-msi-no-magic.patch

The patch here is correct, but actual freedesktop.org.xml.in in 0.51 is incorrect, as it assigns generic OLE magic to both application/x-ole-storage and application/x-msi. It causes match for many Microsoft Word Document files.

The magic attached to application/x-msi is a generic magic for application/x-ole-storage. Both matches have the same priority, but the match string for application/x-ole-storage is a substring of application/x-msi. This may cause prefix clash security warning, kmimetypefinder decides to prefer application/x-msi. This behavior is not in contradiction with spec as well.

Proposed patch reverts version 0.51 back to the version proposed in previous patch. I am not a Microsoft OLE expert, I cannot provide a real application/x-msi specific magic.

Revision history for this message
In , Stanislav Brabec (sbrabec-suse) wrote :

As proposed in comment 8, I opened new bug 18072 for the new problem.

Revision history for this message
In , David Faure (faure) wrote :

For the record (replying to comment 8) : kmimetypefinder does NOT show the first match, it does show the highest match. The bug is in the msi magic, see bug 18072.

Przemek K. (azrael)
Changed in shared-mime-info (Baltix):
status: New → Fix Released
Changed in shared-mime-info:
importance: Unknown → Medium
Changed in shared-mime-info:
importance: Medium → Unknown
Changed in shared-mime-info:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.