Difference between revisions of "Wine"

From ArchWiki
Jump to: navigation, search
(Fonts: Adding note about winetricks)
(Installation: Why the inconsistent bolding?)
Line 6: Line 6:
== Installation ==
== Installation ==
Wine is constantly updated and available in the [community] repository for i686 and in '''[multilib] for x86_64'''.
Wine is constantly updated and available in the [community] repository for i686 and in [multilib] for x86_64.
  # pacman -S wine
  # pacman -S wine

Revision as of 05:31, 15 June 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Wine is a compatibility layer capable of running Microsoft Windows applications on Unix-like operating systems. Windows programs running in Wine act as native programs would, running without the performance or memory usage penalties of an emulator, with a similar look and feel to other applications on your desktop environment.


Wine is constantly updated and available in the [community] repository for i686 and in [multilib] for x86_64.

# pacman -S wine

You may also require wine_gecko if your applications make use of internet explorer (such as the classic steam interface)

# pacman -S wine_gecko


Make sure you have enabled the [multilib] repository in Template:Filename. If you are running on a x86_64 system, you will also want to install other lib32 packages if the Windows application needs it, such as lib32-mpg123 for mp3 support:

# pacman -S lib32-mpg123 lib32-libxml2 lib32-openal lib32-libpng

Architectural differences

Wine in Arch Linux on i686 is packaged just like expected. It includes a standard 32-bit Wine installation and is unable to execute any 64-bit Windows applications. However, the x86_64 Wine package includes both, a 32-bit and a 64-bit Windows compatibility layer in one.

This so called WoW64 allows the user to use 32-bit and 64-bit Windows programs concurrently and even in the same WINEPREFIX with a win64 WINEARCH. The current support for this in Wine itself is limited and users are recommended to use a win32 WINEPREFIX. See Wine#Using_WINEARCH for more information on this.

To clarify the above, the i686 package Wine will work exactly like a x86_64 package Wine with a win32 WINEPREFIX with no ill effects.

Running Windows Applications

Warning: Do not run or install Wine applications as root! See http://wiki.winehq.org/FAQ#run_as_root for more details.

To run a 32-bit windows application:

$ wine <path to exe>

To run a 64-bit windows application on a x86-64 system:

$ wine64 <path to exe>

To install using an MSI installer, use the included msiexec utility:

$ msiexec installername.msi



To create configuration files run:

$ winecfg

Review the settings and click OK to save. Some options are not present in winecfg, however they are accessible in the Wine registry. To change the Wine registry via a graphical editor:

$ regedit

Also you can import/export text data into/from the Wine registry. In the graphical editor do "File/Import registry file…" and "File/Export registry file…". In command line there is a bunch of commands, see:

$ regedit /?

The wine directory with config files resides in


and by default C:\ will be mapped to


You've done the basic configuration. Now try to run something using:

$ wine /path/to/something.exe
Note: If you're having trouble getting DirectX applications to run properly, try appending the -opengl flag:
$ wine /path/to/3d_game.exe -opengl


If you are using wine from [multilib], you will notice that winecfg will get you a 64-bit wine environment by default. You can change this behavior using the WINEARCH environment variable. Rename your ~/.wine directory and create a new wine environment by running:

$ WINEARCH=win32 winecfg 

This will get you a 32-bit wine environment. Not setting WINEARCH will get you a 64-bit one.

You can combine this with WINEPREFIX to make a separate win32 and win64 environment:

$ WINEARCH=win32 WINEPREFIX=~/win32 winecfg 
$ WINEPREFIX=~/win64 winecfg

Note that a win64 WINEARCH is meant to be able to run 32-bit Windows applications as well as 64-bit ones. However, support for this is limited in Wine and users are encouraged to use a win32 WINEPREFIX for the time being until support improves.

You can also use winetricks and WINEARCH in one command for installing something from winetricks like this (using Steam as an example):

env WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/steam winetricks steam

Note: you do not have create the steam subdirectory in the wineprefixes directory, it will create for you. See the Bottles section below for more information.

32-bit Graphics Card Drivers

You should install these if you don't want crippled 3D performance on a x86-64 system. Note that you need to have [multilib] repository enabled if you want to install them using pacman. You can also try to search the AUR. A good sign that you need one of those libraries is the error "Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly" when you try to run an exe binary from the commandline.

    # pacman -S lib32-nvidia-utils
    For older lib32-nvidia-utils (e.g. nvidia-96xx drivers), see here. If you still have graphic problems with NVIDIA cards, you should try to install all lib32 packages by "pacman -S lib32", this fixes some issues.
  • Intel:
    # pacman -S lib32-intel-dri
    Run Wine with
  • AMD/ATI:
    # pacman -S lib32-ati-dri

Binary ATI drivers, then install lib32-catalyst-utils # binary from AUR

Note: You might need to restart after having installed the correct library!


By default sound issues may arise when running Wine applications. Ensure only one sound device is selected in winecfg. Currently, the alsa driver is the most supported.

Those using PulseAudio can use an AUR package called Template:Package AUR that compiles Wine with 3 patches that bring PulseAudio sound support.


If wine applications are not showing easily readable fonts, you may not have Microsoft's Truetype fonts installed. See MS Fonts. If this doesn't help, try running winetricks allfonts.

After running such programs, kill all wine servers and run winecfg. Fonts should be legible now.

If the fonts look somehow smeared, import the following text file into the Wine registry:

[HKEY_CURRENT_USER\Software\Wine\X11 Driver]


After installation of wine, there will likely be no menu in your desktop environment. After installing a program using Wine, it will create a menu with your installed applications automatically. If you wish to add on to the menu to create an Ubuntu-like Wine sub-menu, then follow these instructions:

Creating Menu Entries

First, install a Windows program using Wine to create the base menu. After the base menu is created, you can start to add the menu entries. In GNOME, right-click on the desktop and select "Create Launcher...". The steps might be different for KDE/Xfce. Make three launchers using these settings:

Type: Application
Name: Configuration
Command: winecfg
Comment: Configure the general settings for Wine
Type: Application
Name: Uninstall Programs
Command: wine uninstaller
Comment: Uninstall Windows programs under Wine properly
Type: Application
Name: Browse C:\ Drive
Command: wine winebrowser c:\\
Comment: Browse the files in the virtual Wine C:\ drive

Now that you have these three launchers on your desktop, it is time to put them into the menu. But, first you should change the launchers to dynamically change icons when a new icon set is installed. To do this, open the launchers that you just made in your favorite text editor. Change the following settings to these new values: Configuration launcher:


Uninstall Programs launcher:


Browse C:\ Drive launcher:


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.

Now that you have the launchers fully configured, now it is time to put them in the menu. Plop them into "~/.local/share/applications/wine/" using a terminal or file browser.

Wait a second, they aren't in the menu yet! There is one last step. Copy the following text into a text file named "~/.config/menus/applications-merged/wine-utilities.menu".

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
	<Filename>wine-Browse C:\ Drive.desktop</Filename>
	<Filename>wine-Uninstall Programs.desktop</Filename>

Go check in the menu and there should be the minty fresh options waiting to be used!

KDE 4 Menu Fix[1]

The Wine menu items may appear in "Lost & Found" instead of the Wine menu for KDE 4. This is because kde-applications.menu is missing the MergeDir option.

Edit /etc/xdg/menus/kde-applications.menu

At the end of the file add <MergeDir>applications-merged</MergeDir> after <DefaultMergeDirs/>, it should look like this:


Alternatively you can create a symlink to a folder that KDE does see:

ln -s ~/.config/menus/applications-merged ~/.config/menus/kde-applications-merged

This has the added bonus that an update to KDE won't change it, but is per user instead of system wide.

Tips and tricks

These tools will assist in the installation of typical Windows components. In most cases they should be used as a last effort, as it may severely alter your wine configuration.

Wine Bottles

The best practice for running wine apps is creating a different WINEPREFIX for every game so you can set different 3D settings, dependencies.

mkdir ~/.wineprefix

Now cd to your installer folder and run the setup application:

WINEPREFIX=~/.wineprefix/YOURGAME wine setup.exe 

Or if you need to install something or run something using winetricks:

WINEPREFIX=~/.wineprefix/YOURGAME winetricks vcrun

Then to run the game, replace the "run.exe" with your game's executable file:

WINEPREFIX=~/.wineprefix/YOURGAME wine run.exe


Winetricks is a quick script that allows one to install base requirements needed to run some Windows programs. Installable components includes DirectX 9.x, msxml (required by Microsoft Office 2007 and Internet Explorer), visual runtime libraries and many more.

You can install winetricks via pacman.

# pacman -S winetricks

Then run winetricks as a normal user:

$ winetricks

WineTools assistant

Note: This tool is currently slightly outdated, but working.

Winetools is a script that facilitates in the installation of some core components for wine in order to install other programs. Note this is not necessary for wine, but does help if you want to get Internet Explorer running.

Note: Microsoft policy is that you must have a license for IE6 in order to install DCOM98 or Internet Explorer 6. If you've ever owned a copy of Windows, you should be fine.

You can download the PKGBUILD script and see AUR for instructions to build and install.


PlayOnLinux is a graphical Windows and DOS program manager. It contains many scripts to assist the configuration and running of progams. You can find the PKGBUILD in AUR.

PlayOnLinux can also manage multiple Wine versions and use a specific version for each executable because of regressions. If you need to know what Wine version works best for a certain game, try the Wine Application Database.


PyWinery is a graphical and simple wine-prefix manager which allows you to launch apps and manage configuration of separate prefixes, also have a button to open winetricks in the same prefix, to open prefix dir, winecfg, application uninstaller and wineDOS. You can install PyWinery from AUR. It is especially useful for having differents settings like DirectX games, office, programming, etc, and choose which prefix to use before you open an application or file.

It's recommended using winetricks by default to open. exe files, so you can choose between any wine configuration you have.

Using Wine as an interpreter for Win16/Win32 binaries

It is also possible to tell the kernel to use wine as an interpreter for all Win16/Win32 binaries. First mount the binfmt_misc filesystem:

# mount -t binfmt_misc none /proc/sys/fs/binfmt_misc

Or you can add this line to your Template:Filename:

none /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0

Then, tell the kernel how to interpret Win16 and Win32 binaries:

echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register

You can add this line to Template:Filename to make this setting permanent. In this case you may want to ignore stderr to avoid error messages when changing runlevels:

{ echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null

Now try to run a Windows program:

chmod 755 exefile.exe
Note: The .exe extension may not be required, as the kernel doesn't identify the file by its extension.


Often you may need to run .exes 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.

Alternatives to Win16 / Win32 binaries

  • Cedega - Aimed at gamers
  • Codeweavers - Codeweavers' Crossover Office; Aimed at Office Users

External Resources