Installing Wine on Debian 10

Chưa phân loại
Wine is a Windows compatibility layer for Linux. It is used to run Windows applications on Linux.  In this article, I am going to show you how to install Wine on Debian 10 and run a Windows application on Debian 10 using Wine. So, let’s get started.

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:

$ sudo dpkg –add-architecture i386

Enabling contrib and non-free Repositories:

Now, to enable the Debian 10 contrib repository, run the following command:

$ sudo apt-add-repository contrib

The contrib repository should be enabled.

Now, to enable the Debian 10 non-free repository, run the following command:

$ sudo apt-add-repository non-free

The non-free repository should be enabled.

Now, update the APT package repository cache with the following command:

$ sudo apt update

The APT package repository cache should be updated.

Installing Wine:

Now, you can install Wine with the following command:

$ sudo apt install wine wine64 wine32 winbind winetricks

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.

$ cd ~/Downloads

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:

$ wine npp.7.7.1.Installer.x64.exe

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.

Starting Notepad++:

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:

$ nautilus ~/.wine

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:

$ wine notepad++.exe

Notepad++ runs. Great!

Now, find the full path to the notepad++.exe executable with the following command:

$ echo "$(pwd)/notepad++.exe" | sed ‘s/ /\ /g’

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:

$ nano ~/.local/share/applications/notepad.desktop

Now, type in the following lines of code in the file.

[Desktop Entry]
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:

$ chmod +x ~/.local/share/applications/notepad.desktop

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.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Setting up Kali Linux on AWS EC2

A penetration tester can quickly set up a Kali Linux instance on the Amazon Cloud and access it at any time for any kind...

Mount and Use Google Drive on Linux Mint

Google Drive is one of the most popular cloud storage services on this planet. Here’s a quick example of how popular...
Chưa phân loại, vps giá rẻ

Install 7Zip Compression Tool on Ubuntu

How to Install 7-zip on Ubuntu and use it to compress and decompress any file or folder When you want to transfer large...