Installation

Warning: If you can access a file or resource with your user account, programs running in Wine can too. Wine prefixes are not sandboxes. Consider using virtualization if security is important.

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:

# pacman -S wine_gecko

or Mono for .NET applications: you can download the installer (.msi) from the Wine Sourceforge project and save it in /usr/share/wine/mono. Alternatively you can use the package wine-monoAUR from the AUR, which should build it from the sources.

Architectural differences

The default Wine is 32-bit, as is the i686 Arch package. As such, it is unable to execute any 64-bit Windows applications (which are still fairly rare at this point anyway).

The Wine package for x86_64, however, is currently built with --enable-win64. This activates the Wine version of WoW64.

In Windows, this complicated subsystem allows the user to use 32-bit and 64-bit Windows programs concurrently and even in the same directory.

In Wine, the user will have to make separate directories/prefixes. The support for this feature in Wine is currently experimental and users are recommended to use a win32 WINEPREFIX. See Wine64 for specific information on this.

To summarize, using the Arch 64-bit Wine package with WINEARCH=win32 should have the same behaviour as using the i686 Wine package.

Note: If you run into problems with winetricks or programs with a 64-bit environment, try creating a new 32-bit WINEPREFIX. See below: #Using_WINEARCH

Configuration

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:\ (C-drive)

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.

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 separate "C:\" and registries.

To create a default prefix without running a Windows program or other GUI tool you can use:

$ env WINEPREFIX=~/.customprefix wineboot -u

Configuring Wine is typically accomplished using:

winecfg is a GUI configuration tool for Wine. You can run it from a console window with: $ winecfg, or $ WINEPREFIX=~/.some_prefix winecfg.

control.exe is Wine's implementation of Windows' Control Panel which can be accessed with: $ wine control

Using WINEARCH

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:

Note: During prefix creation, the 64-bit version of wine treats all folders as 64-bit prefixes and will not create a 32-bit in any existing folder. To create a 32-bit prefix you have to let wine create the folder specified in WINEPREFIX.

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

Tip: You can make variables like WINEPREFIX or WINEARCH constant by using ~/.bashrc.

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.

Graphics Drivers

For most games, Wine requires high performance accelerated graphics drivers. This likely means using proprietary binary drivers from Nvidia or Amd/ATI. Intel drivers should mostly work as well as they are going to out of the box.

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

Desktop Launcher Menus

By default, installation of Wine does not create desktop menus/icons for the software which comes with Wine (e.g. for winecfg, winebrowser, etc). However, installing Windows programs with Wine, in most cases, should result in the appropriate menu/desktop icons being created. For example, if the installation program (e.g. setup.exe) would normally add an icon to your Desktop or "Start Menu" on Windows, then Wine should create corresponding freedesktop.org style .desktop files for launching your programs with Wine.

Tip: If menu items were not created while installing software or have been lost, winemenubuilder may be of some use.

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:

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:

Icon[en_US]=wine-winecfg
Icon=wine-winecfg

Uninstall Programs launcher:

Icon[en_US]=wine-uninstaller
Icon=wine-uninstaller

Browse C:\ launcher:

Icon[en_US]=wine-winefile
Icon=wine-winefile

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. Copy them into ~/.local/share/applications/wine/.

Wait a second, they are not in the menu yet! There is one last step. Create the following text file:

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

Remove Wine Launcher Menus in Gnome3

System wide launcher menus are located in /usr/share/applications/. Remove the program's ".desktop" entry to remove the launcher system wide.

If this does not solve the problem, it is likely the wine launchers are located in
~/.local/share/applications/wine/Programs/. In the directories corresponding to the program files are the ".desktop" launcher files. Remove these files to remove the launchers. Remove the entire program's directory to easily remove the launcher files.

Test the Setup

Now try to run a Windows program:

chmod 755 exefile.exe
./exefile.exe

If all went well, exefile.exe should run.

Wineconsole

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.

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.

Third-party interfaces

CrossOver

PlayOnLinux/PlayOnMac

PlayOnLinux is a graphical Windows and DOS program manager. It contains scripts to assist the configuration and running of programs, it can manage multiple Wine versions and even use a specific version for each executable (eg. because of regressions). If you need to know which Wine version works best for a certain game, try the Wine Application Database. You can find the playonlinux package in community.

PyWinery

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.

Q4wine

Q4Wine is a graphical wine-prefix manager which allows you to manage configuration of prefixes. Notably it allows exporting QT themes into the wine configuration so that they can integrate nicely. You can find the q4wine package in multilib.