How to ensure Wine does not auto run .exe files?

As far as I know, wine does NOT execute .exe files by default, based on my experience so far with Wine on Ubuntu 13.04.

I'm not sure if previous Ubuntu/Wine versions allowed it automatically run executables, but at least you can be fairly certain that that is not currently the case.


Wine does not run files automatically (poor wording choice on your part).

However, if you want exe files to open with something else by default, you need to change the associated program for exe files to something other than Wine (you can do this from the properties window in Nautilus).

To run your program, you can create a .desktop file or simply use "Open With" from the context menu.


When you install the wine package, it registers itself so that .exe files, if run from the command line, will "auto run via wine" if they match a specific signature and have executable bit set (like via chmod +x).

To prevent accidental direct execution of exes from console like

/path/to/program.exe

you can setup binfmt_misc kernel module with the following command:

sudo update-binfmts --disable wine

This will disable support for direct execution of files with magic MZ.

CAVEAT: this appears to be undone on restart or Wine upgrade.

If you really want to get rid of it (until wine upgrade!), run

 sudo update-binfmts --package wine --remove wine /usr/bin/wine

Tags:

Security

Wine