Enable 32-Bit Support:
In order to run Wine, you need to enable 32-bit support on Debian 10.
To enable 32-bit support on Debian 10, run the following command:
Enabling contrib and non-free Repositories:
Now, to enable the Debian 10 contrib repository, run the following command:
The contrib repository should be enabled.
Now, to enable the Debian 10 non-free repository, run the following command:
The non-free repository should be enabled.
Now, update the APT package repository cache with the following command:
The APT package repository cache should be updated.
Now, you can install Wine with the following command:
To confirm the installation, press Y and then press <Enter>.
APT package manager will download and install all the required packages from the internet.
If you want WINS support, then, select <Yes>. Otherwise, select <No>. If you don’t know what it is, just select <yes>. Then, press <Enter>.
Wine should be installed.
Installing Windows Programs Using Wine:
I’ve downloaded 64-bit version of Notepad++ EXE installer from the official website of Notepad++. I will be showing you how to install this program using Wine in this section. You should be able to install other Windows applications the same way. Not every Windows applications work. So, you will have to try and see what works and what does not.
First, navigate to the directory where you have your EXE installer file. In my case, it’s the ~/Downloads directory.
The Notepad++ installer file (npp.7.7.1.Installer.x64.exe) is here as you can see.
Now, to start the installer, run the following command:
As you can see, the Notepad++ installer has started. Now, you can install Notepad++ the same way you install it on Windows. Click on OK.
Click on Next >.
Click on I Agree.
Click on Next >.
Click on Next >.
Click on Install.
Notepad++ is being installed.
Once the installation is complete, uncheck Run Notepad++ checkbox (optional) and click on Finish.
Now that you’ve installed Notepad++, it should automatically be listed in the Application Menu of Debian 10 as you can see in the screenshot below. Just click on the Notepad++ icon to start it.
As you can see, Notepad++ is running correctly.
Some apps may not be accessible from the Debian 10 Application Menu. In that case, you have to start it manually.
Wine keeps all the files in the ~/.wine directory. To open the ~/.wine directory with nautilus file manager, run the following command:
In the ~/.wine directory, there should be a drive_c/ directory. This is the virtual C:/ drive for the windows apps you’ve installed using Wine.
In the drive_c/ directory, you have your usual Program Files/ and Program Files (x86)/ windows directories. 64-bit software will be installed on the Program Files/ directory and 32-bit software will be installed on the Program Files (x86)/ directory unless specified during the installation.
The Notepad++ app I’ve installed is a 64-bit program. So, it’s available under Program Files/ directory as you can see.
In the Notepad++/ directory, the notepad++.exe is available. This is the main executable file responsible for starting the Notepad++ program.
Now, open a terminal in this directory by Right Mouse Clicking on the directory and selecting Open in Terminal.
Now, to verify whether notepad++.exe can start Notepad++, run the following command:
Notepad++ runs. Great!
Now, find the full path to the notepad++.exe executable with the following command:
NOTE: Replace notepad++.exe with the program name that you’re trying to run.
Note the output of this command as you will need it shortly.
Now, create a desktop shortcut file notepad.desktop in the ~/.local/share/applications directory with the following command:
Now, type in the following lines of code in the file.
Comment=Simple Text Editor
Exec=wine /home/shovon/.wine/drive_c/Program Files/Notepad++/notepad++.exe
NOTE: Don’t forget to replace the bold text with the output of the command that I told you to note earlier.
The final notepad.desktop file looks as follows. Now, save the file by pressing <Ctrl> + X followed by Y and <Enter>.
Now, add executable permission to the notepad.desktop file with the following command:
Now, you should be able to find a new desktop entry in the Application Menu of Debian 10. Click on it to start your desired program.
As you can see, Notepad++ starts as usual.
So, that’s how you install Wine on Debian 10 and install Windows application using Wine on Debian 10. Thanks for reading this article.