Skip to main content

With the release of Wine 8, the Windows replica for Linux has matured again and enables more Windows programs. In most cases, however, additional work is necessary to set up Windows programs.

Wine is not an emulator like Qemu or a virtualization environment like Virtualbox, but a runtime environment that aims to emulate the Windows API on Linux. This API mapping is not complete, but it is comprehensive enough for many Windows programs to run on the Linux desktop.

Wine began as a hobby project 30 years ago at the time of Windows 3.1 with its 16-bit API. After a simple “Hello World” program, it quickly succeeded in getting Solitaire to run. With Windows 95, Wine had to support the new 32-bit API and soon showed impressive partial success, so Corel invested in further development of Wine from 1999 to 2000 to use it for the then popular Wordperfect.

In the meantime, further development disintegrated into commercial branches, which scared off many open-source developers and hindered progress. Wine was revived by Google in 2006, because at that time Wine served as a compatibility layer for the Linux version of Picasa. Google thus saved itself a complete porting of Picasa to Linux.

Nicht taufrisch, aber mit Wine 8 zufrieden: Ältere Windows-Programme laufen unter Wine meist besser als ganz neue Versionen. Installationsanleitungen helfen bei der Wine-Konfiguration.
Not as fresh as new, but happy with Wine 8: Older Windows programs usually run better under Wine than completely new versions. Installation instructions help with Wine configuration.

Today, the gaming scene and especially Valve with its Wine-based compatibility layer Proton is the driving force behind Wine. After all, Microsoft’s office package MS Office is no longer in focus now that a cloud variant, Office 365, runs in the browser — even under Linux. This does not apply to games — and that is why the development of Wine continues undaunted.

Progress of Wine 8

The now available version 8 of Wine marks a milestone in the development and supports more current programs and games again. This is made possible by the conversion of the Wine modules to the format of “portable executables,” which some games require. In addition, Wine can now run 32-bit programs in its 64-bit environment without having to install all the required libraries in 32-bit on the host system.

This article therefore shows how to set up a current Wine edition in Ubuntu 22.04/23.04 and the first steps to configure this environment for Windows programs. Today, Wine simulates all Windows versions from XP to 11, although the emulation of Windows 10/11 has not yet matured in all details.

Appdb: Does a Windows program work?

Simple applications run immediately and without problems after installation with little preparation, complex programs often need some manual configuration. For difficult candidates such as Adobe Photoshop, which in version CS6 also runs well under Linux with Wine 8, there are alternatives and installation aids. Even though the progress made by Wine developers is astonishing, in practice there are still a number of programs that require special rules for the libraries used.

Whether a Windows program runs in Wine does not have to be determined empirically by trial and error. It is always worth taking a look at the searchable application database http://appdb.winehq.org before installing and working with Wine.

It shows how good or bad the support is for certain programs. Applications are given a status according to the categories platinum, gold, silver, bronze, or rubbish, depending on the reports of Wine users who are keen to experiment and share their results. All applications categorized below Gold status usually run only after a few pull-ups or under Wine alternatives such as Crossover. After clicking on “Show,” many entries show a mini-guide with installation instructions, which can sometimes be demanding. It is always important to know the version number of Wine, because many programs will only run with newer versions such as 7 or 8.

Crossover: For difficult cases

A utility based on Wine, which major Wine developers are also working on, is the commercial Crossover from Codeweavers. This is not simply a fork of the original Wine source code, but an extension. It is always close to the current Wine, but has a few more libraries on board for improved compatibility with Windows programs.

Blick in die Programmdatenbank von Crossover: Was in Wine nicht befriedigend funktioniert, lauft eventuell in diesem erweiterten, aber kommerziellen Wine- Ableger.
A look at the program database of Crossover: What does not work satisfactorily in Wine may run in this extended, but commercial Wine offshoot.

Crossover specializes in typical office applications such as Microsoft Office. It offers a graphical interface for installing and managing Windows programs. Crossover is not open source, but a commercially distributed program that starts at $74 euros. A 14-day evaluation version allows a free test (after registration with a mail address).

Codeweavers provides a suitable binary package as RPM and DEB for the various Linux distributions. After the simple installation via the package manager, a graphical user interface takes over the further setup, for example for the required Truetype fonts. The search at www.codeweavers.com/compatibility shows which programs in particular really work with Crossover. The developers point out that Crossover 22.x is still based on Wine 7.7 (Wine 8 is the impetus for Crossover 23, which is to appear at the end of 2023).

Ubuntu: Install the latest Wine

In Ubuntu (and Linux Mint) of all places, Wine is only available in an outdated version in the standard package sources. We want to settle for nothing less than the latest Wine here, direct from the developers. The first step towards this is to include 32-bit package sources, because Wine 8 still requires a whole lot of libraries for best compatibility:

sudo dpkg --add-architecture i386

A directory for the signatures of the Wine packages is created by the command:

sudo mkdir -p /etc/apt/keyrings

and

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

downloads the keychain for verifying the packages. The inclusion of the package sources in Ubuntu is done by specifying the codename of the Ubuntu version, “jammy” for Ubuntu 22.04 LTS and also for Linux Mint:

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.source

Ubuntu 23.04 (from April 2023) asks for “lunar” instead of “jammy.” The two commands then install:

sudo apt update
sudo apt install --install-recommends winehq-stable

will install the latest stable Wine version.

Configure Wine environment

Ersetzt einzelne Windows-Bibliotheken: Einige Programme erfordern über winecfg den Austausch der mitgelieferten Wine-Bibliotheken mit originalen Windows- DLLs.
Replaces individual Windows libraries: Some programs require winecfg to replace the supplied Wine libraries with original Windows DLLs.

IDG

After installing Wine, the first step is to start the winecfg configuration program. The program creates an environment for Wine in the hidden folder “.wine” in the home directory. There it creates an image of the Windows registry in the form of text files as well as the application files of future installed programs in the subdirectory “~/.wine/drive_c”. In addition, winecfg checks the runtime environment for completeness and offers, for example, to install the .NET runtime Wine-Mono, which must be confirmed in a dialogue.

In this way, winecfg creates the first standard configuration on its own and then displays the further Windows-style settings dialogue. Here, the most important options for fine-tuning are available — for example, to adjust the display, to select an audio device for the sound output, or to add original Windows libraries. An important point is the assignment of virtual drive letters to directories, which is done under “Drive.” This point may be necessary if a Windows program asks for an inserted setup CD for installation or start-up.

Winetricks: Important settings

However, the winecfg tool only represents a small part of the settings and many options can only be edited directly in Wine’s configuration files. A handy script called “winetricks” relieves users of frequently needed tasks and adjustments via simple, graphic menus. The script is distribution-independent, but requires the packages “zenity” and “cabextract,” which are retrofitted in Ubuntu/Mint with:

sudo apt install zenity cabextract

in Ubuntu/Mint.

It is best to install the script in its current version directly from the developers’ server. In the shell, enter

wget http://winetricks.org/winetricks

in the shell to download the script file “winetricks” into the current directory, where you can then start it by means of

sh winetricks

to start it.

After asking whether actions for statistical evaluation should be sent to the Wine developers, the important options are available via the item Select default Wine prefix. The following menu allows the installation of frequently needed DLLs and fonts, as the installation instructions of the Appdb database state in each case. For a shortcut, however, “winetricks” can also be started with command line parameters.

Tips: Most Windows programs require the standard fonts, which are available for installation under Install font > corefonts. In addition, further Wine parameters can be edited via Change Wine settings. It is recommended to activate fontsmooth=gray here, because this significantly improves the display of fonts in Windows programs.

Ohne die „corefonts“ geht wenig: Einige Anpassungen im grafischen Konfigurationstool winecfg sind für Windows- Programme in Wine essenziell. Auch Original-DLLs sind hier installierbar.
Without the “corefonts” little is possible: Some adjustments in the graphic configuration tool winecfg are essential for Windows programs in Wine. Original DLLs can also be installed here.

IDG

Own environments for programs

Windows programs that need many libraries and settings of their own can in turn be dangerous for other functioning applications in Wine. Wine therefore offers the possibility of several independent environments with their own directories (“prefix”). To create a new Wine environment, for example as “.wine-test”, use this call in the terminal window:

The directory “~/.wine-test” is automatically created and equipped with a standard configuration. To ensure that this alternative environment is also used for further configuration with winecfg or “winetricks,” it must be specified when calling up the tools:
env WINEPREFIX=~/.wine-test sh winetricks

The prefix is also important for executing setup programs or Windows applications:

env WINEPREFIX=~/.wine-test wine /media/cdrom/setup.exe

In the case of automatically created program starters for an installed application, Wine automatically adds the appropriate prefix as a start parameter.

A prefix is also used to create separate environments for 32-bit under 64-bit systems. Winecfg creates a 64-bit environment for Wine by default, under which some 32-bit programs do not run — not even in the latest Wine 8. To specifically create a 32-bit environment in the folder “~/.wine32” for older Windows software, use the following command:

WINEPREFIX=~/.wine32 WINEARCH='win32' winecfg

Winetricks must also be started with the prefix in order to install fonts or DLLs here or to set options:

WINEPREFIX=~/.wine32 WINEARCH='win32' winecfg

Tips: For experimentation, it is always advisable to install programs in their own Wine prefixes so as not to interfere with other Windows applications. If a program refuses to work, simply delete the directory with the respective prefix from the data carrier. A directory can also be backed up as a whole or transferred to another Linux computer running Wine, because the Wine prefix always contains all settings and files.

Borrowings: Retrofitting original DLLs

For licensing reasons, Wine is not allowed to deliver Windows components. However, some Windows programs have special requirements that the API does not meet, even with Wine 8. They require original Windows libraries.

Winetricks offers a series of libraries via the submenu Install Windows DLL and in most cases downloads an update package from the Microsoft servers. If a program requires a very special DLL, the library can also be copied from an existing Windows system into the Wine directory “~/.wine/drive_c/windows/system32”. Then go to the configuration of winecfg and select the desired library under Libraries > New override for. The item Set creates a new rule, which you can then change with Edit. The setting Native uses the existing, original Windows DLL in the subfolder system32 instead of the built-in library of Wine 8. The script “winetricks” creates these rules on its own when installing DLLs.

Playonlinux: Installation help

Another option for setting up a selection of particularly popular Windows programs in Wine is the front-end Playonlinux. It provides installation aids to persuade even difficult candidates with many adjustments to run. Playonlinux takes care of the necessary Wine settings on its own and installs individual applications in their own Wine environments (prefix). Unfortunately, the development of Playonlinux has been lying idle for a while. Only in Ubuntu and Linux Mint is it still included in the standard sources and can be installed via the software center or the command line with: