4

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

4
  • 2
    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, 2019 at 17:34
  • Should your title say "How can I use Wine..." rather than "mime"?
    – CentaurusA
    Jan 21, 2019 at 2:22
  • 2
    @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, 2019 at 18:15
  • 1
    @CentaurusA - I have simply edited the title to make things clear.
    – user47206
    Jan 30, 2019 at 18:52

2 Answers 2

2

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

2
  • 1
    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, 2019 at 19:03
  • For some reason, WINE is not an option. I have version 6.0, as this is the latest version I can get from the repos.
    – Caleb Hawn
    Nov 23, 2023 at 3:21
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.

1
  • There are some typos here. ~.local should be ~/.local, and application should be applications.
    – Caleb Hawn
    Nov 23, 2023 at 3:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .