wine as default interpreter for exe files?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Michael Renner

wine as default interpreter for exe files?

Post by Michael Renner »

Moin,

is there a way to configure bash in a way that all exe files are executed by
wine, not direct? E.g. ./sol.exe should result in wine ./sol.exe anyhow.

Thanks
--
|Michael Renner E-mail: [email protected] |
|D-81541 Munich Germany ICQ: #112280325 |
|Germany Don't drink as root! ESC:wq
perryh

wine as default interpreter for exe files?

Post by perryh »

Michael Renner <[email protected]> wrote:
is there a way to configure bash in a way that all exe files are
executed by wine, not direct? E.g. ./sol.exe should result in wine
./sol.exe anyhow.
AFAIK, no. You would have to add a special-case hack somewhere in
either bash or kernel source code, somewhat along the lines of how
#! files are handled, but triggered by detecting the "MZ" signature
of a .exe file**. It's probably easier to add a script (or alias,
or shell function) for each program of interest, along the lines of
(untested):

$ ls -l notepad
-r-xr--r-- 1 perryh perryh 63 Aug 24 01:30 notepad

$ cat notepad
#!/bin/bash
cd ~/.wine/drive_c/windows
exec wine ./notepad.exe

This way, you don't even have to type the .exe :)

----------

** or, perhaps, the .exe part of the name -- but looking for a
signature within the file is more in keeping with the way
Unix/Linux normally operate.
Locked