2

I have wine installed. But how can I set it default for running exe files?

  • 1
    If wine is installed correctly, double click an executive file will open that file using wine by default. Please edit your question and provide more details, such as the version of Ubuntu, how did you install wine, what happens when you double click on an executive file? – user68186 Jan 20 at 17:34
  • Should your title say "How can I use Wine..." rather than "mime"? – CentaurusA Jan 21 at 2:22
  • 1
    @user68186 - In Kubuntu 18.04 I had the same problem with the stable wine version installed, had to create a desktop file as indicated in my answer below. – user47206 Jan 30 at 18:15
  • @CentaurusA - I have simply edited the title to make things clear. – user47206 Jan 30 at 18:52
1

When you right-click on the .exe file, you go to "Open with application with", then you select WINE.

  • In case exe files are not run as expected on (double) click (case implied by the OP, otherwise the question makes no sense), it might also be that no "Wine" program appears when trying to select it from "Open with". – user47206 Jan 30 at 19:03
1

Normally simply executing the exe file with (double) click in the file manager should run it through Wine. If for some reason that doesn't happen (beside trying to re-install Wine in order to get the expected behavior) you could do the following:

In terminal run wine path_to_file.exe.


In order to run it with (double) click: create a ~/.local/share/application/wine.desktop file with the lines like

[Desktop Entry]
Exec=wine %f
Name=Run in Wine
Mimetype=application/x-dosexec
Categories=System;Settings;

then make Run in Wine the default "application" for exe files (in Dolphin: Properties > (tab) General > Add).


Alternatively, create a ~.local/share/kservices5/ServiceMenus/run_wine.desktop like

[Desktop Entry]
Actions=wine
Mimetype=application/x-dosexec
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel

[Desktop Action wine]
Exec=wine %f
Name=Run in Wine
Icon=wine

in order to have a right-click context menu option ("Service Menu") in Dolphin.


I cannot test now, as I don't use Wine as we speak, but konsole -e wine %f or sh -c 'wine %f' might be needed for the Exec line.

If someone can confirm Exec=wine %f works, please comment.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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