Wine – Running Windows applications in the Fedora GUI

Héctor H. Louzao Pozueco, Ankur Sinha, Akshata Khedekar Версія unknown Last review: 2022-10-03
Wine is an open source implementation of the Windows API on top of X and OpenGL.

Wine emulates the Windows runtime environment by translating Windows system calls into POSIX-compliant system calls, recreating the directory structure of Windows systems, and providing alternative implementations of Windows system libraries, system services through wineserver.

Packages

Fedora’s Wine packages are split up to allow for smaller installations. The wine meta package will bring with it the most important components of Wine. Expert users may want to pick specific components from the list here. The current versions of the Wine packages can also be seen on the Fedora packages application.

Configurations files

The default wine configuration files is stored in your $HOME directory:

$HOME/.wine
Different prefixes can be used as descibed in the wine prefix section lower in this document.

Wine desktop files

Wine respects the XDG Base Directory Specification. $XDG_DATA_HOME defines the base directory relative to which user-specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, it defaults to $HOME/.local/share.

Wine stores its desktop files in $XDG_DATA_HOME/applications/wine.

GUI for configuring the Wine registry (winecfg)

winecfg is a GUI configuration tool for Wine, designed to make life a little easier than editing the registry.

This utility is provide by the wine-common package. It allows you to:

  • set the Windows version

  • change the default libraries (DLLs) Wine loads

  • modify graphics settings

  • modify desktop integration related settings

  • modify drive mappings

  • change sound/audio settings

Some applications do not work with the default Windows version which Wine offers. E.g.: Amazon Kindle Desktop Edition.

Gui Wine script (winetricks)

Winetricks is a helper script to download and install various redistributable runtime libraries needed to run some programs in Wine. These may include replacements for components of Wine using closed source libraries.

It is provided by the winetricks package:

sudo dnf install winetricks

It can download and install applications and libraries needed to run some programs in Wine, e.g., Adobe Digital Edition.

Wine prefix

A Wine prefix is a folder that contains all of the Wine configurations as well as all of the Windows pieces that Wine uses for compatibility, including libraries and a registry.

Some applications need a 32 or 64 wine prefix, this can be done in the following way:

  • Create a clean wine32/64 prefix:

WINEPREFIX="$HOME/<directory>" WINEARCH=winxx wine wineboot
  • Where xx is 32 or 64 bits

  • <directory> is the directory which you can store the wine environment

To use a wine prefix created before:

export WINEPREFIX=$HOME/<directory>

Install some basics/utils applications

How to install the follow applications under wine?

  1. Adobe Digital Edition 4.5

    • use winetricks as descibed before and select install application in the menu "What you do you want to do?"

    • in "Which package(s) would you like to install?" select adobe_diged4

  2. Kindle Desktop Edition

    • download from → Amazon Kindle

    • install it

    • use winecfg to change the default windows version so is 7 to a higher version

Bugs and problems

Before reporting bugs against Wine please make sure your system is fully up to date.

dnf upgrade

Also check if a newer version is available in the updates-testing repository.

dnf --enablerepo=updates-testing update wine

If you are using the proprietary graphics drivers please remove them from your system and try again, as they are known to cause problems.

When debugging Wine, your goal is to determine if the issue is one of code functionality or packaging in Fedora.

Check the Wine Application Database to see if your application is supported, or if there are known issues that match yours. Anything that falls into this category is a bug in upstream code functionality.

The next step is to see if the problem persists with a clean ~/.wine folder. To try this without losing your old configuration:

mv ~/.wine ~/.wine-save

Afterwards try to trigger the bug again. Your original wine folder can be restored with:

rm -fr ~/.wine; mv ~/.wine-save ~/.wine

If your application still does not work but has been working in a previous version of wine it is probably a regression. Consider filling a bug in the upstream Wine-staging bug tracking system.

Do not file bugs in the Winehq.org bugzilla unless told to do so.

If you really think that your bug is Fedora-related, file a bug against the Wine component in Fedora’s bug tracking system.