7

I have Wine installed and several Windows applications installed there run fine, if I start them using the right mouse menu "Open with Wine program loader". But if I try starting an .exe file by just double clicking instead, the archive manager tries to open the executable.

How do I fix that?

And something like a bonus question as a former Windows user: Can this be done easily for a single file I currently see in the file manager (similar to the "Open with..." context menu in Windows) and for many file types together (like in Windows, using the menu "Folder settings" in the Explorer)?

12

Right-click, select Properties, open the "Open With" tab, and make Wine the default application for EXE files.

  • Thanks. Works fine now. I'm still wondering why the archive manager was assigned to executables in the first place. Maybe to read executable zip files? – Bananeweizen Aug 30 '10 at 17:28
  • That's my guess too: self-extracting archives (not necessarily zip, rar has those too IIRC). – Marius Gedminas Sep 9 '10 at 14:29
2

The reason why this occurs is in this bug report, which I provided a patch for about 2 years ago: https://bugs.launchpad.net/ubuntu/+source/file-roller/+bug/351429

Regardless, the workaround I generally use is to just right click the application and select open with Wine.

  • Thanks for the info. That's exactly what I suspected, but were not able to find out with my limited knowledge. – Bananeweizen Sep 29 '10 at 17:11
2

From 17.04, the wine packages have become wine-stable and wine-development. These are coinstallable, so the wine.desktop file is not installed in /usr/share/applications by either of these packages to avoid conflicts. Hence, Wine does not have an entry in the Open With menu. From /usr/share/doc/wine-stable/README.Debian.gz:

To enable system-wide support for .exe files execute the following command (replace /usr/share/doc/wine with /usr/share/doc/wine-development if you use wine-development):

$ sudo cp /usr/share/doc/wine/examples/wine.desktop /usr/share/applications/

To support this only for your current user execute:

$ cp /usr/share/doc/wine/examples/wine.desktop ~/.local/share/applications/

To remove these native file type associations again execute the following commands:

$ sudo rm -f /usr/share/applications/wine.desktop
$ sudo update-desktop-database
$ rm -f ~/.local/share/applications/wine.desktop
$ rm -f ~/.local/share/applications/wine-extension-*
$ update-desktop-database ~/.local/share/applications/

This is slightly mistaken, it's /usr/share/doc/wine-stable, not /usr/share/doc/wine.

sudo cp /usr/share/doc/wine-stable/examples/wine.desktop /usr/share/applications/

And Wine should start showing up in the Open With lists for selection.

-1

That does not always work. Some settings for file type handling can be found in

.local/share/applications/mimeapps.list

In that file, I found the follow line:

application/x-ms-dos-executable=file-roller.desktop;wine.desktop;

and changed it to

application/x-ms-dos-executable=wine.desktop;

After saving the file the result is active immediately.

  • If this answer is intended as a comment on someone else's answer (i.e. Marius Gedminas) you should add information to your answer about whose answer you are referring to. – karel Jul 27 '13 at 8:38
  • wine.desktop is no more from 17.04 – Khurshid Alam Oct 12 '17 at 6:05

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.