Wine is a Linux program that lets you run Windows software.
The versions in the Linux repositories tend to be way out-of-date. In 2018 Mint was still offering version 1 when the current one was 3 and in 2020 Debian Stretch still was, even though version 5 was the latest by then. Normally I'd say this is no bad thing as software is as likely to get worse with 'advances' as better but this isn't the case with Wine. Each new version brings real improvements and no detriments; I'm even starting to suspect that it does a better job of running Windows programs than Windows does itself.
The best way to install it is straight from WineHQ. There are three versions of Wine available: Stable, Development and Staging. Wine Stable is the latest finished version and is updated every January. Wine Development is the Stable version with up-dates applied every couple of weeks and will become the next Stable version. Wine Staging is only of interest to developers as that contains the very latest code which may not yet work properly. The general advice is to use Stable but if that doesn't do what you want to try Development as that may already have a fix; this is more likely to be the case the later in the year that it is.
There's a bit of a complication with Debian Buster though. Wine depends on libfaudio0 and that isn't in the official Buster repositories. It is however available as a backport from here.
If you're on 64-bit scroll down and click on amd64 then choose a mirror to download from. This will give you a .deb file you can install.
Next open a terminal and run:--
The versions in the Linux repositories tend to be way out-of-date. In 2018 Mint was still offering version 1 when the current one was 3 and in 2020 Debian Stretch still was, even though version 5 was the latest by then. Normally I'd say this is no bad thing as software is as likely to get worse with 'advances' as better but this isn't the case with Wine. Each new version brings real improvements and no detriments; I'm even starting to suspect that it does a better job of running Windows programs than Windows does itself.
The best way to install it is straight from WineHQ. There are three versions of Wine available: Stable, Development and Staging. Wine Stable is the latest finished version and is updated every January. Wine Development is the Stable version with up-dates applied every couple of weeks and will become the next Stable version. Wine Staging is only of interest to developers as that contains the very latest code which may not yet work properly. The general advice is to use Stable but if that doesn't do what you want to try Development as that may already have a fix; this is more likely to be the case the later in the year that it is.
There's a bit of a complication with Debian Buster though. Wine depends on libfaudio0 and that isn't in the official Buster repositories. It is however available as a backport from here.
If you're on 64-bit scroll down and click on amd64 then choose a mirror to download from. This will give you a .deb file you can install.
Next open a terminal and run:--
sudo dpkg --add-architecture i386
Now download and install the i386 version of libfaudio0 AS WELL. Both are needed as so much Windows software is 32-bit.
If you're running a 32-bit OS you only need the i386 version.
Failure to install libfaudio0 will result in misleading error messages when installing Wine and have you tearing your hair out.
You can now install Wine from WineHQ.
As usual I found a few tweaks were needed to get things set-up as I like.
I had great trouble setting things up so that if I double-clicked a .DOC file it would open in Word instead of Libre Office. There were many solutions to be found on-line but most of them didn't work.
Eventually I found a solution which did work which is to write a script thus:--
If you're running a 32-bit OS you only need the i386 version.
Failure to install libfaudio0 will result in misleading error messages when installing Wine and have you tearing your hair out.
You can now install Wine from WineHQ.
As usual I found a few tweaks were needed to get things set-up as I like.
I had great trouble setting things up so that if I double-clicked a .DOC file it would open in Word instead of Libre Office. There were many solutions to be found on-line but most of them didn't work.
Eventually I found a solution which did work which is to write a script thus:--
PROGRAM="[Path and program to open]"
FILE=`winepath -w "$*"`
wine start /max "$PROGRAM" "$FILE"
exit 0
For example mine for Word is:--
#!/bin/bash
#
# Script to open Word documents via 'Open with...' Menu.
#
PROGRAM="c:\\Program Files\\Microsoft Office\\Office\\WINWORD.EXE"
FILE=`winepath -w "$*"`
wine start /max "$PROGRAM" "$FILE"
exit 0
To write this open a text editor and copy the above into it making the changes you need to suit your situation; what PROGRAM is will depend on the version of MS-Office that you are using. What you call the script and where you put it is up to you; I called mine MS-Word and put it in ~/.wine. If you can't find the .wine directory press Ctrl-h as that will make hidden files and directories visible.
The next thing is to make it executable. You can either do it from a terminal by typing:--
The next thing is to make it executable. You can either do it from a terminal by typing:--
sudo chmod u+x {Your Script}
eg:--
sudo chmod u+x ~/.wine/MS-Word
or via the Caja file manager. Right-click in the directory where your script is, then 'Open as Administrator'. After entering your password, right-click on your script and then click on 'Properties' then 'Permissions' and click the 'Allow executing file as program' box.
Now find a file that you wish to open with your Wine program. Right click on it and select 'Open with Other Application.' Now click 'Use a custom command.' Browse to your script and double-click it, remember you may need to press Ctrl-h to see it. Hopefully thereafter when you double-click a file of that type it will open with the Wine program you wanted.
Now find a file that you wish to open with your Wine program. Right click on it and select 'Open with Other Application.' Now click 'Use a custom command.' Browse to your script and double-click it, remember you may need to press Ctrl-h to see it. Hopefully thereafter when you double-click a file of that type it will open with the Wine program you wanted.