Wine

Related articles
CrossOver
Wine package guidelines
Bottles
Proton
DOSBox
Wine
is a
compatibility layer
capable of running
Microsoft Windows
applications on
Unix-like
operating systems
.
Wine does not use
emulation
,
binary translation
, or
virtualization
to operate. Instead, Wine provides an implementation of the
Win32 API
to applications that require it. As Wine's implementation of the Win32 API will naturally differ from what is provided by Microsoft Windows, applications may suffer behavioral, compatibility, or performance penalties when using Wine.
Warning
Wine is
not isolated
from your system: if
you
can access a file or resource with your user account, programs running in Wine
can too
—see
#Running Wine under a separate user account
and
Security#Sandboxing applications
for possible precautions.
Wine can also run
Malware
—see
Wine FAQ on Malware compatibility
.
Installation
Wine can be installed either through the
wine
(development),
wine-stable
AUR
(stable) or
wine-staging
(testing) package.
Wine Staging
is a patched version of
Wine
, which contains bug fixes and features that have not been integrated into the stable or development branch yet.
Tip
Consider installing
wine-gecko
and
wine-mono
for applications that depend on Internet Explorer and .NET, respectively. These packages are not strictly required as Wine will download the relevant files as needed. However, you should
manage them with pacman
.
If using
wine-stable
AUR
, see
#Using 32-bit Wine builds
for additional requirements.
Optional dependencies
Wine has numerous
optional dependencies
, which may not be required for basic applications, but should be installed to provide functionality such as sounds, 3D graphics, video playback, etc.
Sound
By default sound issues may arise when running Wine applications. Ensure only one sound device is selected in
winecfg
.
MIDI support
MIDI
was a quite popular system for video games music in the 90s. If you are trying out old games, it is not uncommon that the music will not play out of the box.
Wine has excellent MIDI support. However you first need to make it work on your host system, as explained in
MIDI
. Last but not least you need to make sure Wine will use the correct MIDI output, though by default, no extra configuration may be required.
For MIDI tracks to play in-game, install Microsoft's General MIDI DLS Collection, DirectSound and DirectMusic using
winetricks gmdls dsound directmusic
or by searching for them on the dependency manager if using Bottles.
Other dependencies
Some applications may require additional packages
[1]
.
For encryption support install
gnutls
For joystick and gamepad support install
sdl2-compat
For media playback programs install
gst-plugins-base
,
gst-plugins-good
,
gst-plugins-bad
,
gst-plugins-ugly
and
ffmpeg
For
NTLM
authentication install
samba
In-prefix dependencies
Aside from system dependencies, many programs require additional fonts and DLLs to be installed to the Wine prefix
[2]
. To satisfy these dependencies you can use
Winetricks
, a primitive "package manager" where each
verb
either installs something or applies a configuration tweak. There are two ways to use Winetricks:
Through the CLI: Run
winetricks
verb_name
.
Through the GUI: Install
zenity
or
kdialog
then run
winetricks
.
Due to conflicts between dependencies, you may not be able to create the "perfect" Windows installation that can run everything
[3]
[4]
. Rather, you should treat prefixes as disposable (unless they contain important configurations or data) and use separate prefixes for programs with different dependencies. You can use the
#WINEPREFIX
environment variable to control which prefix the verbs act on.
Determining the verbs required by a program needs can require much trial and error. See the
Bottles dependency page
for some of the more common dependencies, as well as the following program-specific resources:
Wine Application Database
. Official resource, but old and may be less maintained than others.
Lutris website
. If you are trying to run a game which happens to be featured on this site, you can click the drop-down menu and then
View install script
to see what Winetricks verbs are used by Lutris.
Bottles program repository
. Smaller, but not just games.
ProtonDB
. Although Proton has different compatibility than Wine (and you should probably just use Proton if you are on this site), the verbs commented by users may be of use.
You can also consult the source for the fast-moving
protonfixes
tool that ships with
proton-ge-custom
, but beware that it assumes the presence of additional Proton and GE patches that fix games.
If you find yourself spending a lot of time managing prefixes for games, it may be easier to use a third-party application that handles it for you.
Third-party applications
These have their own communities and websites, and are
not supported
by the main Wine community. See
Wine Wiki
for more details.
Bottles
— Graphical prefix and runners manager for Wine based on GTK.
https://usebottles.com/
||
bottles
AUR
CrossOver
— Official paid version of Wine which provides a graphical interface and more comprehensive end-user support.
https://www.codeweavers.com/crossover
||
crossover
AUR
Lutris
— Gaming launcher for all types of games, including Wine games (with prefix management), native Linux games and emulators.
https://lutris.net
||
lutris
Play.it
— Creates pacman
packages
for games (also supports
DOSBox
and ScummVM games).
https://www.dotslashplay.it/
||
play.it
AUR
PlayOnLinux
— Graphical prefix manager for Wine. Contains scripts to assist with program installation and configuration.
https://www.playonlinux.com
||
playonlinux
AUR
portproton
— Software for playing Microsoft Windows games and launchers.
https://linux-gaming.ru/
||
portproton
AUR
PyWinery
— Simple graphical prefix manager for Wine.
https://github.com/ergoithz/pywinery
||
pywinery
AUR
Q4Wine
— Graphical prefix manager for Wine. Can export
Qt
themes into the Wine configuration for better integration.
https://sourceforge.net/projects/q4wine/
||
q4wine-git
AUR
WINEgui
— A user-friendly WINE graphical interface.
https://gitlab.melroy.org/melroy/winegui
||
winegui
AUR
Configuration
Configuring Wine is typically accomplished using:
control
— Wine's implementation of the
Windows Control Panel
, which can be started by running
wine control
,
regedit
— Wine's
registry
editing tool, which can be started by running
regedit
—see also
Useful Registry Keys
,
winecfg
— a
GUI
configuration tool for Wine, which can be started by running
winecfg
.
See
Programs
for the full list.
WINEPREFIX
By default, Wine stores its configuration files and installed Windows programs in
~/.wine
. This directory is commonly called a "Wine prefix" or "Wine bottle". It is created/updated automatically whenever you run a Windows program or one of Wine's bundled programs such as
winecfg
. The prefix directory also contains a tree which your Windows programs will see as
C:
(the C-drive).
Note
Wine prefixes are not forward compatible. New versions of Wine will automatically upgrade old prefixes if necessary, at which point they may become broken for old Wine versions.
[5]
You can override the location Wine uses for a prefix with the
WINEPREFIX
environment variable
. This is useful if you want to use separate configurations for different Windows programs. The first time a program is run with a new Wine prefix, Wine will automatically create a directory with a bare C-drive and registry.
For example, if you run one program with
env WINEPREFIX=~/.win-a wine program-a.exe
, and another with
env WINEPREFIX=~/.win-b wine program-b.exe
, the two programs will each have a separate C-drive and separate registries.
Warning
Wine prefixes are not
sandboxes
! Programs running under Wine can still access the rest of the system! (for example,
Z:
is mapped to
/
, regardless of the Wine prefix).
To create a default prefix without running a Windows program or other GUI tool you can use:
$ env WINEPREFIX=~/.customprefix wineboot -u
Fonts
If Wine applications have unreadable or missing fonts, you may not have any fonts installed. To easily link all of the system fonts so they are accessible from wine:
$ cd ${WINEPREFIX:-~/.wine}/drive_c/windows/Fonts && for i in /usr/share/fonts/**/*.{ttf,otf}; do ln -s "$i"; done
Wine uses FreeType to render fonts, and FreeType's defaults changed a few releases ago. Try using the following
environment variable
when running programs in Wine:
FREETYPE_PROPERTIES="truetype:interpreter-version=35"
Another possibility is to
install Microsoft's TrueType fonts
into your wine prefix. If this does not help, try running
winetricks corefonts
first, then
winetricks allfonts
as a last resort.
After running such programs, kill all Wine servers and run
winecfg
. Fonts should be legible now.
If the fonts look somehow smeared, run the following command to change a setting in the Wine registry:
$ wine reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /v ClientSideWithRender /t REG_SZ /d N
For high resolution displays, you can adjust dpi values in winecfg.
See also
Font configuration#Applications without Fontconfig support
.
Enable font smoothing
A good way to improve wine font rendering is to enable cleartype font smoothing.
To enable "Subpixel smoothing (ClearType) RGB":
/tmp/fontsmoothing.reg
REGEDIT4

[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
$ WINE=${WINE:-wine} WINEPREFIX=${WINEPREFIX:-$HOME/.wine} $WINE regedit /tmp/fontsmoothing.reg 2> /dev/null
If you have installed
winetricks
, there is a simpler way to do this:
winetricks fontsmooth=rgb
For more information, check
the original answer
Desktop launcher menus
When a Windows application installer creates a shortcut Wine creates a
.desktop
file instead. The default locations for those files in Arch Linux are:
Desktop shortcuts are put in
~/Desktop
Start menu shortcuts are put in
~/.local/share/applications/wine/Programs/
Note
Wine does not support installing Windows applications for all users, so it will not put
.desktop
files in
/usr/share/applications
. See WineHQ bug
11112
Tip
If menu items were
not
created while installing software or have been lost,
wine winemenubuilder
may be of some use.
Creating menu entries for Wine utilities
By default, installation of Wine does not create desktop menus/icons for the software which comes with Wine (e.g. for
winecfg
,
winebrowser
, etc). This can be achieved by installing
wine-installer
AUR
or
wine-installer-git
AUR
meta-package (the latter has no additional dependencies), otherwise these instructions will add entries for these applications.
First, install a Windows program using Wine to create the base menu. After the base menu is created, you can create the following files in
~/.local/share/applications/wine/
:
wine-browsedrive.desktop
[Desktop Entry]
Name=Browse C: Drive
Comment=Browse your virtual C: drive
Exec=wine winebrowser c:
Terminal=false
Type=Application
Icon=folder-wine
Categories=Wine;
wine-uninstaller.desktop
[Desktop Entry]
Name=Uninstall Wine Software
Comment=Uninstall Windows applications for Wine
Exec=wine uninstaller
Terminal=false
Type=Application
Icon=wine-uninstaller
Categories=Wine;
wine-winecfg.desktop
[Desktop Entry]
Name=Configure Wine
Comment=Change application-specific and general Wine options
Exec=winecfg
Terminal=false
Icon=wine-winecfg
Type=Application
Categories=Wine;
And create the following file in
~/.config/menus/applications-merged/
:
wine.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
  <Name>Applications</Name>
  <Menu>
    <Name>wine-wine</Name>
    <Directory>wine-wine.directory</Directory>
    <Include>
      <Category>Wine</Category>
    </Include>
  </Menu>
</Menu>
If these settings produce a ugly/non-existent icon, it means that there are no icons for these launchers in the icon set that you have enabled. You should replace the icon settings with the explicit location of the icon that you want. Clicking the icon in the launcher's properties menu will have the same effect. A great icon set that supports these shortcuts is
gnome-colors-icon-theme
AUR
.
Removing menu entries
Menu entries created by Wine are located in
~/.local/share/applications/wine/Programs/
. Remove the program's
.desktop
entry to remove the application from the menu.
In addition to remove unwanted extensions binding by Wine, execute the following commands:
[6]
$ rm ~/.local/share/mime/packages/x-wine*
$ rm ~/.local/share/applications/wine-extension*
$ rm ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
$ rm ~/.local/share/mime/application/x-wine-extension*
Sometimes you should also remove
wine-*.menu
files from
/.config/menus/
to completely remove items from Wine submenu in KDE.
Appearance
A similar to XP-looking theme can be
downloaded
. To install it, see
this upstream wiki article
. Lastly, use
winecfg
to select it.
Note
The theme linked above can only be installed on 32-bit prefixes with Windows XP as the prefix version. To install it on 64-bit prefixes, you might want to create a temporary 32-bit prefix, install the theme and copy the
Zune
folder and
Zune.theme
files from
drive_c/Windows/Resources/Themes
in that prefix to the same location in your usual prefix.
Wine staging users may instead want to try enabling the option
Enable GTK3 Theming
under the Staging section of
winecfg
for a theme that matches the current GTK theme.
Printing
In order to use your installed printers (both local and network) with wine applications (e.g. MS Word), install the
libcups
package, reboot wine (
wineboot
) and restart your wine application.
Networking
After installation, the
gnutls
package may need to be
installed
for applications making TLS or HTTPS connections to work.
For ICMP (ping), Wine may need the network access as described in the
WineHQ FAQ
:
# setcap cap_net_raw+epi /usr/bin/wine-preloader
If issues arise after this (such as an unhandled exception or privileged instruction), remove via:
# setcap -r /usr/bin/wine-preloader
Usage
Warning
Do not run or install Wine applications as root! See
Wine FAQ
for details.
See
Wine User's Guide
for general information on Wine usage.
See
Wine Application Database (AppDB)
for additional information on specific Windows applications in Wine.
Wayland
The
Wayland
graphics driver is enabled by default, but the
X11
driver still takes precedence if both are available
[7]
.
To force using the Wayland driver in that case, make sure that the
DISPLAY
environment variable is unset:
$ env -u DISPLAY wine example.exe
To force Wayland prefix-wide, add a string value with name
Graphics
and data
wayland
in
HKEY_CURRENT_USER\Software\Wine\Drivers
Stop running Wine
Stopping started executables,
wine
with Ctrl+Z or
wineconsole
with Ctrl+C, might leave processes running in the background. See for example:
$ ps -xo pid,cmd
    PID CMD
    297 -bash
    933 /usr/bin/wineserver
    939 C:\windows\system32\services.exe
    942 C:\windows\system32\winedevice.exe
    950 C:\windows\system32\explorer.exe /desktop
    954 C:\windows\system32\winedevice.exe
    965 C:\windows\system32\plugplay.exe
    977 C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted
    984 C:\windows\system32\rpcss.exe
    997 mbserver.exe
   1017 start.exe /exec
   1019 C:\windows\system32\conhost.exe --unix --width 169 --height 40 --server 0x10
   1021 Z:\home\wineuser\mbserver.exe
   1030 ps -xo pid,cmd
All running
wine
and
wineconsole
processes are stopped at once using the
wineserver -k
command. For example:
$ wineserver -k 15
This command is
WINEPREFIX
-dependent, so when using a custom Wine prefix, run:
$ WINEPREFIX=~/wine/my-prefix wineserver -k
An equivalent command to gracefully finish both executables in the above example is:
$ kill 997 1021
32-bit Windows applications
Upstream Wine supports three ways of running 32-bit Windows applications on a 64-bit system:
WINEARCH=win32
which runs Wine as a 32-bit Linux application in a 32-bit prefix.
"Old WoW64", which runs Wine as a 32-bit Linux application in a 64-bit prefix. This allows 32-bit and 64-bit applications to coexist in the same prefix.
"New WoW64". which runs Wine as a 64-bit Linux application in a 64-bit prefix. 32-bit Windows applications are supported via thunking to 64-bit Wine code. This is most similar to
WoW64
on Windows.
Since Wine
10.8-2
, Arch Linux enables the new WoW64 mode. Most 32-bit Windows applications will install and run without any additional steps needed.
Using 32-bit Wine builds
While the new WoW64 mode will work for most applications, it has a few limitations:
Any existing 32-bit
WINEPREFIX
will no longer work, and should be recreated as 64-bit. Then 32-bit applications can be installed into it.
A known limitation of the new WoW64 mode is reduced performance for 32-bit applications that use OpenGL directly. (
Bug report
).
A few 32-bit Windows applications do not work correctly in WoW64 mode (under either wine or Windows).
As a workaround,
wine32
AUR
is an alternate wine package that provides 32-bit builds of wine. The
wine-stable
AUR
package also currently provides a 32-bit build. These packages require the host system to have 32-bit versions of libraries installed for Wine to be able to run 32-bit applications. Some common 32-bit libraries are listed below. When installing other libraries listed on this page (e.g. those listed in
#Other dependencies
), you should also install the corresponding
lib32-
package if you are running a 32-bit application.
Graphics drivers
You need to install the 32-bit version of your
OpenGL graphics driver
.
A good sign that your drivers are inadequate or not properly configured is when Wine reports the following in your terminal window:
Direct rendering is disabled, most likely your OpenGL drivers have not been installed correctly
Note
You might need to restart
Xorg
after having installed the correct library.
Sound
Install the correct packages for the audio driver you want to use:
For
ALSA
install
lib32-alsa-lib
and
lib32-alsa-plugins
For
PulseAudio
install
lib32-libpulse
For
PipeWire
install
lib32-pipewire
and either:
pipewire-pulse
and
lib32-libpulse
to use PulseAudio as a frontend.
pipewire-alsa
,
lib32-alsa-lib
, and
lib32-alsa-plugins
to use ALSA as a frontend.
For
OSS
install
lib32-alsa-oss
If
winecfg
still fails to detect the audio driver (
Selected driver: (none)
),
configure it via the registry
. For example, to provide full access to the sound hardware (sound playback and mic): open
regedit
, look for the key
HKEY_CURRENT_USER > Software > Wine > Drivers
, add a string called
Audio
and give it the value
alsa
. Also, it may help to
recreate the prefix
.
WINEARCH
Note
Setting
WINEARCH
no longer works with the
wine
or
wine-staging
packages, only
wine-stable
AUR
and
wine32
AUR
.
If supported, you can use
WINEARCH
with
WINEPREFIX
to make separate
win32
and
win64
(old WoW64) environments:
$ WINEARCH=win32 WINEPREFIX=~/win32 winecfg
$ WINEPREFIX=~/win64 winecfg
You can also use
WINEARCH
in combination with other Wine programs, such as
winetricks
(using Steam as an example):
WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/steam winetricks steam
In order to see the architecture of an existing prefix you can check its registry file. The command below reads the system registry of the
~/.wine
prefix and returns
#arch=win32
or
#arch=win64
depending on the architecture type:
$ grep '#arch' ~/.wine/system.reg
Tips and tricks
Wineconsole
Often you may need to run
.exe'
s to patch game files, for example a widescreen mod for an old game, and running the
.exe
normally through Wine might yield nothing happening. In this case, you can open a terminal and run the following command:
$ wineconsole cmd
Then navigate to the directory and run the
.exe
file from there.
Winetricks
Winetricks
is a script to allow one to install base requirements needed to run Windows programs. Installable components include DirectX 9.x, MSXML (required by Microsoft Office 2007 and Internet Explorer), Visual Runtime libraries and many more.
Install
the
winetricks
package (or alternatively
winetricks-git
AUR
). Then run it with:
$ winetricks
For using GUI you can
install
either
zenity
(GTK) or
kdialog
(Qt).
Performance
CSMT
CSMT is a technology used by Wine to use a separate thread for the OpenGL calls to improve performance noticeably. Since Wine 3.2, CSMT is enabled by default.
Note that CSMT may actually hurt performance for some applications - if this is the case, disable it by running
wine regedit
and set the DWORD value for
HKEY_CURRENT_USER -> Software > Wine > Direct3D > csmt
to 0x00 (disabled).
Further information:
Phoronix Forum discussion
with the CSMT developer Stefan Dösinger
Force OpenGL mode in games
Some games might have an OpenGL mode which
may
perform better than their default DirectX mode. While the steps to enable OpenGL rendering is
application specific
, many games accept the
-opengl
parameter.
$ wine
/path/to/3d_game.exe
-opengl
You should of course refer to your application's documentation and Wine's
AppDB
for such application specific information.
DXVK
DXVK
is an implementation of DirectX 8, 9, 10, and 11 over Vulkan. It beats the WineD3D driver in performance and compatibility for most games. It does not support DirectX 12, see
#VKD3D-Proton
instead. DXVK and VKD3D-Proton can and should be installed alongside each other to be able to support all DirectX versions.
To install the latest version, use
#Winetricks
:
$ WINEPREFIX=
your-prefix
winetricks dxvk
You can also specify a version to install. For example, to install a DXVK version with
relaxed requirements
, use:
$ WINEPREFIX=
your-prefix
winetricks dxvk1103
Alternatively, install
dxvk-mingw
AUR
or
dxvk-bin
AUR
. Then run the following command to activate it in your Wine prefix (by default
~/.wine
):
$ WINEPREFIX=
your-prefix
setup_dxvk install --symlink
While using DXVK with a dual graphics setup, Wine prefers the dedicated GPU. On laptops for power saving, this can be overridden:
$ VK_DRIVER_FILES=/usr/share/vulkan/icd.d/
your_driver
.json wine
executable
VKD3D-Proton
VKD3D-Proton
is a fork of
VKD3D
which aims to implement the full Direct3D 12 API using Vulkan. The project serves as the development effort for Direct3D 12 support in Proton improving performance and compatibility for DirectX 12 games.
Tip
Despite having Proton in its name, the DLLs work perfectly with the normal version of Wine and function alongside
#DXVK
.
To install the latest version, use
#Winetricks
:
$ WINEPREFIX=
your-prefix
winetricks vkd3d
Alternatively, install
vkd3d-proton-mingw
AUR
or
vkd3d-proton-bin
AUR
. Then run the following command to activate it in your Wine prefix (by default
~/.wine
):
$ WINEPREFIX=
your-prefix
setup_vkd3d_proton install --symlink
Tip
For
AMDGPU
users
only
: when paired with
Gamescope
, DXVK v2.1+ offers support for
HDR10
displays. See
HDR monitor support
for details.
Synchronization primitives
Some games heavily use Windows synchronization objects to run multi-threaded workloads. Wine provides a user-space implementation through
wineserver
, but it usually worsens performance in CPU-bound scenarios. There are 3 alternative implementations—
NTSync
,
FSync
, and
ESync
—that improve performance, but you should use only one of them at a time.
Tip
Stick to NTSync unless an application behaves in a problematic way with it enabled.
Note
The Wine developers have no plans to add ESync or FSync because since Wine 10.16 the full version of NTSync has been added and enabled by default.
When using either ESync or FSync, some performance degradations—compared to NTSync—might happen in some applications (mainly games).
MangoHud
can be used to check the status of current synchronization method with the option
winesync
enabled in its configuration file.
NTSync
NTSync
is an in-kernel implementation of synchronization primitives.
Compared to ESync and FSync, NTSync more closely translates the behavior of the Microsoft Windows NT kernel implementation, with performance on par with FSync or smoother. NTSync is more accurate than ESync or FSync without performance degradation.
Available if you use a kernel version
starting from 6.14
.
NTSync
was implemented in Wine 10.16
, but not included in
Proton
, because Proton's latest version is based on Wine 10.0 stable, which did not yet include NTSync.
Proton-GE
(
proton-ge-custom-bin
AUR
) can be used if you want a Proton version with NTSync. Alternatively,
Proton-TKG
can be used.
NTSync does not require setting an environment variable; instead, it will automatically be used if the
ntsync
kernel module
is loaded.
wine
,
wine-staging
and
proton-ge-custom-bin
AUR
ship with a file to
load the module at boot
. If you are using a custom version of Wine or Proton, you can manually create the following file:
/etc/modules-load.d/ntsync.conf
ntsync
FSync
FSync is an in-kernel Futex2-based implementation of synchronization primitives.
It should generally have better performance than ESync.
Available if you use a kernel version
starting from 5.16
.
Not included in
wine
; you will need a patched version.
Enabled by default in
Proton
.
To enable FSync,
export
the following
environment variable
before running patched Wine:
WINEFSYNC=1
ESync
ESync is a user-space eventfd-based synchronization.
Not included in
wine
; you will need a patched version.
Enabled by default in
Proton
, unless FSync is available.
To enable ESync,
export
the following
environment variable
before running patched Wine:
WINEESYNC=1
Unregister existing Wine file associations
By default, Wine takes over as the default application for a lot of formats. Some (e.g.
vbs
or
chm
) are Windows-specific, and opening them with Wine can be a convenience. However, having other formats (e.g.
gif
,
jpeg
,
txt
,
js
) being opened via Wine may not be desired.
Wine's file associations are set in
~/.local/share/applications/
as
wine-extension-
extension
.desktop
files. Delete the files corresponding to the extensions you want to unregister.
Alternatively, to remove all Wine extensions:
$ rm -f ~/.local/share/mime/packages/x-wine*
$ rm -f ~/.local/share/applications/wine-extension*
$ rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
$ rm -f ~/.local/share/mime/application/x-wine-extension*
Afterwards, update the cache:
$ update-desktop-database ~/.local/share/applications/
$ update-mime-database ~/.local/share/mime/
Note
Unless the
relevant option is disabled
, Wine will still create new file associations if the application sets the file associations again.
Prevent Wine from creating filetype associations
Note
This has to be done for each Wine prefix which should not update file associations unless you opt to change
/usr/share/wine/wine.inf
.
This method prevents the creation of filetype associations but retains the creation of XDG .desktop files (that you might see e.g. in menus).
If you want to stop wine from creating filetype associations via winecfg you have to uncheck the "Manage File Associations" checkbox under the Desktop Integration tab. See
Wine FAQ
To make the same change via registry add the string
Enable
with value
N
under:
HKEY_CURRENT_USER\Software\Wine\FileOpenAssociations
You might have to create the key
FileOpenAssociations
first!
To make this change via the command-line, run the following command:
$ wine reg add "HKEY_CURRENT_USER\Software\Wine\FileOpenAssociations" /v Enable /d N
If you want to apply this by default for new Wine prefixes, edit
/usr/share/wine/wine.inf
and add this line for example under the
[Services]
section:
HKCU,"Software\Wine\FileOpenAssociations","Enable",2,"N"
To prevent a package upgrade from overriding the modified file, create a pacman hook to make the change automatically:
/etc/pacman.d/hooks/stop-wine-associations.hook
[Trigger]
Operation = Install
Operation = Upgrade
Type = Path
Target = usr/share/wine/wine.inf

[Action]
Description = Stopping Wine from hijacking file associations...
When = PostTransaction
Exec = /bin/sh -c '/usr/bin/grep -q "HKCU,\"Software\\\Wine\\\FileOpenAssociations\",\"Enable\",2,\"N\"" /usr/share/wine/wine.inf || /usr/bin/sed -i "s/\[Services\]/\[Services\]\nHKCU,\"Software\\\Wine\\\FileOpenAssociations\",\"Enable\",2,\"N\"/g" /usr/share/wine/wine.inf'
See
Pacman#Hooks
for more information.
Execute Windows binaries with Wine implicitly
The
wine
package installs a
binfmt
file which will allows you to run Windows programs directly, e.g.
./myprogram.exe
will launch as if you had typed
wine
./myprogram.exe
. Service starts by default on boot, if you have not rebooted after installing Wine you can
start
systemd-binfmt.service
to use it right away.
Note
Make sure the Windows binary is
executable
, otherwise the binary will not run.
Dual Head with different resolutions
Installing
libxinerama
might fix dual-head issues with wine (for example, unclickable buttons and menus of application in the right most or bottom most monitor, not redrawable interface of application in that zone, dragging mouse cursor state stucked after leaving application area).
Burning optical media
To burn CDs or DVDs, you will need to load the
sg
kernel module
.
Proper mounting of optical media images
Some applications will check for the disc to be in drive. They may check for data only, in which case it might be enough to configure the corresponding path as being a CD-ROM drive in
winecfg
.
However, other applications will look for a name and/or a serial number, in which case the image has to be mounted with these special properties.
Some virtual drive tools do not handle these metadata, like fuse-based virtual drives (Acetoneiso for instance).
CDemu
will handle it correctly.
Show FPS overlay in games
Wine features an embedded FPS monitor which works for all graphical applications if the environment variable
WINEDEBUG=fps
is set. This will output the framerate to stdout. You can display the FPS on top of the window thanks to
osd_cat
from the
xosd
package. See
winefps.sh
for a helper script.
Running Wine under a separate user account
Warning
This is not a proper sandboxing solution and will only protect your home directory using filesystem permissions. If you want a sandbox you should use something like
firejail
or
bubblewrap
, which do not come with the downsides of requiring rootful Xorg or having audio issues.
It may be desirable to run Wine under a specifically created user account in order to reduce concerns about Windows applications having access to your home directory.
First, create a
user account
for Wine:
# useradd -m -s /bin/bash wineuser
Now switch to another TTY and start your X WM or DE as you normally would or keep reading...
Note
The following approach only works when enabling root for Xorg. See
Xorg#Rootless Xorg
for more information on how to execute the
xhost
command under your main user.
Afterwards, in order to open Wine applications using this new user account you need to add the new user to the X server permissions list:
$ xhost +SI:localuser:wineuser
Finally, you can run Wine via the following command, which uses
env
to launch Wine with the environment variables it expects:
$ sudo -u wineuser env HOME=/home/wineuser USER=wineuser USERNAME=wineuser LOGNAME=wineuser wine
arguments
It is possible to automate the process of running Windows applications with Wine via this method by using a shell script as follows:
/usr/local/bin/runaswine
#!/bin/sh
xhost +SI:localuser:wineuser
sudo -u wineuser env HOME=/home/wineuser USER=wineuser USERNAME=wineuser LOGNAME=wineuser wine "$@"
Wine applications can then be launched via:
$ runaswine
"C:\path\to\application.exe"
In order to not be asked for a password each time Wine is run as another user the following entry can be added to the sudoers file:
mainuser
ALL=(wineuser) NOPASSWD: ALL
. See
Sudo#Configuration
for more information.
It is recommended to run
winecfg
as the Wine user and remove all bindings for directories outside the home directory of the Wine user in the "Desktop Integration" section of the configuration window so no program run with Wine has read access to any file outside the special user's home directory.
Keep in mind that audio will probably be non-functional in Wine programs which are run this way if
PulseAudio
is used. See
PulseAudio/Examples#Allowing multiple users to share a PulseAudio daemon
for information about allowing the Wine user to access the PulseAudio daemon of the principal user.
Temp directory on tmpfs
To prevent Wine from writing its temporary files to a physical disk, one can define an alternative location, like
tmpfs
. Remove Wine's default directory for temporary files and creating a symlink:
$ rm -r ~/.wine/drive_c/users/$USER/Temp ~/.wine/drive_c/windows/temp
$ ln -s /tmp/ ~/.wine/drive_c/users/$USER/Temp
$ ln -s /tmp/ ~/.wine/drive_c/windows/temp
Prevent installing Mono/Gecko
If Gecko and/or Mono are not present on the system nor in the Wine prefix, Wine will prompt to download them from the internet. If you do not need Gecko and/or Mono, you might want to disable this dialog, by  setting the
WINEDLLOVERRIDES
environment variable
to
mscoree=d;mshtml=d
.
Remove Wine file bindings
For security reasons it may be useful to remove the preinstalled Wine bindings so Windows applications cannot be launched directly from a file manager or from the browser (Firefox offers to open EXE files directly with Wine!). If you want to do this, you may add the following
NoExtract
lines in
/etc/pacman.conf
:
NoExtract = usr/lib/binfmt.d/wine.conf
NoExtract = usr/share/applications/wine.desktop
Wine is setting its own applications as defaults
Every time Wine creates (or updates) a prefix it will set its own bundled apps like Notepad and Winebrowser as the default text editor and web browser accordingly.
A way to work around this undesirable behavior is by using this
environment variable
:
$ WINEDLLOVERRIDES=winemenubuilder.exe=d ...
WineASIO
If you need
professional audio
support under Wine you can use
wineasio
AUR
which provides an
Audio Stream Input/Output
(ASIO) interface for Wine that you can then use with
JACK
.
In order to use WineASIO you must
install
the
realtime-privileges
package and add yourself to the
realtime
user group
.
Next you need to register WineASIO in your desired
Wine prefix
. Register the 32-bit:
$ regsvr32 /usr/lib32/wine/i386-windows/wineasio32.dll
and/or 64-bit version:
$ wine64 regsvr32 /usr/lib/wine/x86_64-windows/wineasio64.dll
Disable starting explorer.exe
If you run a text mode (
Command User Interface
) executable without X installed, these errors might appear while starting the executable:
0060:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0060:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0060:err:systray:initialize_systray Could not create tray window
This is because
wine
by default starts explorer.exe. Even
wineconsole
starts
explorer.exe /desktop
according to
ps
output.
Starting explorer including systray can be disabled with this environment setting:
$ WINEDLLOVERRIDES="explorer.exe=d" wine program.exe
Depending on your CUI program, you might be able to use it with lowest memory footprint by disabling services.exe too:
$ WINEDLLOVERRIDES="explorer.exe,services.exe=d" wine program.exe
Troubleshooting
See
Wine User's Guide
and
Wine FAQ
(especially its
Troubleshooting
section) for general tips.
Also refer to the
Wine AppDB
for an advice on specific applications.
General installation issues
Each
Wine prefix
has a lot of persistent state, between the installed programs and the registry. The first step to troubleshooting issues with program installation should be to either create an isolated prefix, or clear the default prefix via
rm -rf ~/.wine
. The latter will delete any of the programs and settings you have added to the default prefix.
Error loading libc.so.6
You might get the following error when running wine:
$ wine cmd
/usr/bin/wine: error while loading shared libraries: libc.so.6: cannot create shared object descriptor: Operation not permitted
This is caused by the syscall to
mmap2
failing:
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EPERM (Operation not permitted)
This is a known
bug in the kernel
.
Changing the
vm.mmap_min_addr
sysctl
value from the default of
65536
seems to fix the problem:
# sysctl -w vm.mmap_min_addr=32768
Xwayland problems
If you use Wine under
Xwayland
, you can activate the option for "Emulating a virtual desktop" in the Graphics Tab in winecfg, to avoid problems with:
flickering;
wrong window location;
wrong mouse cursor location and clicks;
keyboard detection.
If disabling the Virtual Desktop left you unable to interact with the winecfg window with mouse & keyboard anymore, you can explicitly start winecfg on a Virtual Desktop anyway and reenable it with:
$ wine explorer /desktop=name,800x600 winecfg
When starting GUI windows (eg. winecfg) with Wayland and none are displayed with these errors in console:
$ wine winecfg
Authorization required, but no authorization protocol specified

008c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
008c:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
008c:err:systray:initialize_systray Could not create tray window
You may try setting the
DISPLAY
variable to
:1
:
$ DISPLAY=:1 wine winecfg
Keyboard input not working
This could be caused by the window manager not switching focus. In the
Graphics
tab of
winecfg
, disable the 'Allow the window manager...' options, or set windowed mode with 'Emulate a virtual desktop'.
Some suggest to toggle all the
Window settings
, click
Apply
, then change them back. If that does not work, try the above.
If the keyboard does not work after unfocusing the application, try editing the registry:
Under
HKEY_CURRENT_USER\Software\Wine\X11 Driver
, add a string value
UseTakeFocus
and set it to
N
.
Alternatively, you can use winetricks to set the value:
$ winetricks usetakefocus=n
or use wine reg
$ wine reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /t REG_SZ /v UseTakeFocus /d N /f
Application fails to start
Some older games and applications assume that the current
working directory
is the same as that which the executable is in. Launching these executables from other locations will prevent them from starting correctly. Use
cd
path_containing_exe
before invoking Wine to rule this possibility out.
EA App fails to launch games
If the total size of the
environment variable
block exceeds ~32768 characters, when attempting to launch any game from the EA App, an error popup will appear instead (the message has changed through the versions: usually it's a generic "Failed to launch game", but other times it's been "The game hasn't released yet").
This is an issue with the application itself, not Wine. The only way to work around this issue is to unset the large environment variables in your system so that the total size doesn't exceed the threshold. Note that Wine intentionally does not import some environment variables, which alleviates the issue.
[8]
It is also possible to prevent specific environment variables from being imported by setting an environment variable with the same key prefixed with
WINE_HOST_
.
[9]
See also
Wine Homepage
Wine Wiki
Wine Application Database (AppDB)
- Information about running specific Windows applications (Known issues, ratings, guides, etc tailored to specific applications)
Wine Forums
- A great place to ask questions
after
you have looked through the FAQ and AppDB
Gentoo:Wine
Darling
- a similar project for MacOS software