Installing Wine on Debian 10

29/12/2020
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]
Name=Notepad++
Categories=Development
Comment=Simple Text Editor
Encoding=UTF-8
Exec=wine /home/shovon/.wine/drive_c/Program Files/Notepad++/notepad++.exe
StartupNotify=false
Terminal=false
Type=Application
Version=1.0

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

How to install VLC 2.2.6 Media Player VideoLAN on CentOS, RHEL

VLC Media Player 2.2.6 recently released, is a free and open source cross-platform multimedia player and framework that...
28/12/2020

How to Extract RAR Files in Ubuntu Linux

When it comes to handling zip files, Windows users have always had the advantage with WinRAR that automatically helps to...
29/12/2020

Find Package Name of Installed Ubuntu Package

The user can install and uninstall any software in Ubuntu by using Ubuntu Software Center or command line. Many commands...
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

mua Proxy riêng ở đâu, và nó đem lại lợi ích gì cho người sử dụng
22/11/2022

Hướng dẫn sử dụng Proxy Helper Fakeip khi thuê proxy
21/11/2022

PROXY NUÔI TÀI KHOẢN FACEBOOK – KINH NGHIỆM FAKE IP – THUÊ PROXY GIÁ RẺ
14/11/2022

Mua Proxy Nuôi Zalo Giá Rẻ Tại Onet.com.vn
14/11/2022

BẢNG GIÁ MUA PROXY VIỆT NAM và PROXY US Onet.com.vn
14/11/2022