How to Install WINE for Windows Compatibility on OpenSUSE

29/12/2020
Chưa phân loại
Wine is a “compatibility layer” (not emulator) for POSIX-compliant systems (Linux, BSD, and macOS) to run Windows applications. It’s not an emulator. Instead, it directly converts the Win32 API calls into POSIX calls on-the-fly. Thus, Wine offers far less performance impact than classic virtualization.

While Wine can run many Windows applications, not all will run smoothly. That’s why I recommend keeping your expectations low when it comes to using Wine.

In this article, I’ll be demonstrating how to install and use Wine on openSUSE.

Why use Wine

Wine has been a hot debate among the Linux community for quite a long time. Some think it’s great, others (especially hardcore Linux enthusiasts) think like Wine is “not important” or, it’s “the last thing Linux needs”. However, the bigger picture tells the opposite.  Windows is still a fairly dominant desktop OS. Even including Apple products, Windows occupies a hefty percentage of the desktop market. Have a look at GlobalStats on the worldwide market share of desktop OS.

Because so many people use Windows, it’s only natural for developers to create apps for Windows platforms and in many cases, overlook other platforms. Let’s take Adobe for example. Adobe products are only available for Windows and macOS. As of now, Adobe isn’t likely to support Linux anytime soon.

That’s why we need Wine.

  • Users can enjoy the strong points of UNIX (stability, flexibility, performance, remote administration etc.) while still having access to the Windows apps they depend on.
  • In the case of scripting, UNIX scripts can use Wine to call Windows apps and make the most out of the UNIX environment.

Installing Wine on openSUSE

At first, let’s add the openSUSE repo for WINE. Add the repo according to your openSUSE version.

Leap 15

$ sudo zypper ar -r https://download.opensuse.org/repositories/
Emulators:/Wine/openSUSE_Leap_15.0/Emulators:Wine.repo

Leap 42.3

$ sudo zypper ar -r https://download.opensuse.org/repositories/Emulators:
/Wine/openSUSE_Leap_42.3/Emulators:Wine.repo

Leap 42.2

$ sudo zypper ar -r https://download.opensuse.org/repositories/Emulators:
/Wine/openSUSE_Leap_42.2/Emulators:Wine.repo

Tumbleweed

$ sudo zypper ar -r https://download.opensuse.org/repositories/Emulators:
/Wine/openSUSE_Tumbleweed/Emulators:Wine.repo

If you’re running any other version of openSUSE, check out the openSUSE wiki for the respective repo URL.

Once the repo is added, refresh the repo cache of zypper. When prompted whether to trust the new repo key, enter “a”.

$ sudo zypper ref

Now, tell zypper to install WINE.

$ sudo zypper in wine

Check Wine Version

To check the current version of WINE installed on your system, run this command.

$ wine –version

Wine configuration

Before running any Windows app with Wine, it’s recommended to run the Wine configuration tool first. Running this tool will map out all the necessary drivers for WINE and create a “.wine” file on the home directory.

$ winecfg

Under the “Drives” tab, you can configure all the drives that Windows applications can see.

Under the “Graphics” tab, you can configure the “Window settings” and “Screen resolution” of Windows apps.

Winetricks

Using Winetricks, you can install some common Windows programs like Win32 Firefox, Apple QuickTime, various multimedia codecs, TrueType fonts, and runtime DLLs like Visual C++ runtimes etc.

Before running any application, we’ll be using Winetricks to install some critical Windows components to ensure an enhanced and more stable Wine environment. Run Winetricks.

$ winetricks

When running Winetricks for the first time, Wine will search and install the necessary packages it needs to run Windows programs smoothly. From the “Wine Mono Installer”, click “Install”.

Once the installation is complete, the “Wine Gecko Installer” will pop up. Click “Install” to continue.

Winetricks should start the GUI. If it doesn’t start, run this command.

$ winetricks –gui

From the window, check the option “Select the default wineprefix”.

From the list, select the option “Install a Windows DLL or component” and click “OK”.

Install all that are marked in the following screenshots.

Once selected, click “OK”.

Wait until all the components are download and installed. It may take a long time, so grab a cup of coffee! In some cases, the installation may require user interaction.

Running a Windows program

This is the primary function of WINE, right? As a demo, let’s try running some lightweight applications.

First up, let’s install Notepad++. It’s a modern, free and open-source text editor. Get Notepad++.

Once downloaded, run the following command to start the Notepad++ installer.

$ wine npp.7.8.2.Installer.exe

The installation will start. If you didn’t install Wine Gecko and other components previously, Wine will install them first. After that, the installation will start.

First up, the language selection. Select your suitable language and click “Next”.

From the welcome page, click “Next”.

At the license agreement page, click “I Agree”.

Choose the desired install location and click “Next”. You can manage the drives from Winecfg.

Select the components of Notepad++ and click “Next”.

Click “Install”.

Voila! Installation is complete! Click “Finish” to complete the installation process.

Final thoughts

Application compatibility is a big part of Wine, right? Use the Wine Application Database (AppDB) to check out whether your desired app is compatible with Wine. It’s a community-driven database that keeps track of compatibility for thousands of apps. As of now, there’re more than 25,000 apps in the database! Apps are marked as Platinum (fully compatible, no tweaks required), Gold (fully compatible, minor tweaks required), and Silver (slight compatibility issue).

PlayOnLinux is another interesting tool you should check out. The goal here is to make the installation of numerous apps and games easier. It works in conjunction with Wine.

Enjoy!

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 and Use QEMU on Debian 9

QEMU is a fast processor emulation technology. QEMU does not depend on any hardware features. It does not need any kernel...
29/12/2020

Hướng dẫn cài đặt MacOS trên AWS EC2

Step 1: Configure MacOS Amazon Machine Image Let’s start creating an AWS EC2 Instance. Go to AWS console and navigate to...
28/12/2020

Bash Echo Examples

Multiple built-in functions exist in bash to print the output into the terminal. ‘echo’ is one of the most used...
29/12/2020