Difference between revisions of "Wine"

From ArchWiki
Jump to: navigation, search
(Using Wine as an interpreter for Win16/Win32 binaries: Add systemd info)
(Installing Microsoft Office)
(18 intermediate revisions by 10 users not shown)
Line 20: Line 20:
  
 
== Installation ==
 
== Installation ==
{{Warning| If you can access a file or resource with your user account, programs running in Wine can too. Wine prefixes are not [[wikipedia:Sandbox_%28computer_security%29|sandboxes]].  Consider using [[wikipedia:Virtualization|virtualization]] if security is important.}}
+
{{Warning|If you can access a file or resource with your user account, programs running in Wine can too. Wine prefixes are not [[wikipedia:Sandbox (computer security)|sandboxes]].  Consider using [[wikipedia:Virtualization|virtualization]] if security is important.}}
  
Wine is constantly updated and available in the <nowiki>[</nowiki>[[community]]] repository for i686 and in <nowiki>[</nowiki>[[multilib]]] for x86_64:
+
Wine can be [[pacman|installed]] with the package {{Pkg|wine}}, available in the [[official repositories]]. If you are running a 64-bit system, you will need to enable the [[Multilib]] repository first.
  
# pacman -S wine
+
You may also want to install {{pkg|wine_gecko}} and {{pkg|wine-mono}} for applications that need support for Internet Explorer and .NET, respectively.  These packages are not strictly required as Wine will download the relevant files as needed.  However, having the files downloaded in advance allows you to work off-line and makes it so Wine does not download the files for each WINEPREFIX needing them.
 
+
You may also require {{pkg|wine_gecko}}, if your applications make use of Internet Explorer:
+
 
+
# pacman -S wine_gecko
+
 
+
or [http://wiki.winehq.org/Mono Mono] for .NET applications. The package {{AUR|wine-mono}} available in the [[AUR]], which will place the installer in {{ic|/usr/share/wine/mono/}} for Wine to autodetect (thus preventing Wine from redownloading the installer for every new prefix).
+
  
 
'''Architectural differences'''
 
'''Architectural differences'''
Line 42: Line 36:
 
To summarize, using the Arch 64-bit Wine package with {{ic|1=WINEARCH=win32}} should have the same behaviour as using the i686 Wine package.
 
To summarize, using the Arch 64-bit Wine package with {{ic|1=WINEARCH=win32}} should have the same behaviour as using the i686 Wine package.
  
{{Note| If you run into problems with {{ic|winetricks}} or programs with a 64-bit environment, try creating a new 32-bit {{ic|WINEPREFIX}}. See below: [[#Using_WINEARCH]]}}
+
{{Note|If you run into problems with {{ic|winetricks}} or programs with a 64-bit environment, try creating a new 32-bit {{ic|WINEPREFIX}}. See below: [[#Using WINEARCH]]}}
  
 
== Configuration ==
 
== Configuration ==
Line 69: Line 63:
 
  $ WINEPREFIX=~/win64 winecfg
 
  $ WINEPREFIX=~/win64 winecfg
  
{{Note|During prefix creation, the 64-bit version of wine treats all folders as 64-bit prefixs 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 {{ic|WINEPREFIX}}.}}
+
{{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 {{ic|WINEPREFIX}}.}}
  
 
You can also use winetricks and {{ic|WINEARCH}} in one command for installing something from winetricks like this (using Steam as an example):
 
You can also use winetricks and {{ic|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
 
  env WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/steam winetricks steam
 +
{{Tip| You can make variables like WINEPREFIX or WINEARCH constant by using [[Bash#Shell_and_environment_variables|~/.bashrc]]. }}
 
{{Note|You do not have create the steam subdirectory in the {{ic|wineprefixes}} directory, it will create for you. See the Bottles section below for more information.}}
 
{{Note|You do not have create the steam subdirectory in the {{ic|wineprefixes}} directory, it will create for you. See the Bottles section below for more information.}}
  
=== Graphics Drivers ===
+
=== Graphics drivers ===
For most games, Wine requires high performance accelerated graphics drivers. This likely means using proprietary binary drivers from [[Nvidia]] or [[ATI|Amd/ATI]]. [[Intel]] drivers should mostly work as well as they are going to out of the box.
+
 
 +
For most games, Wine requires high performance accelerated graphics drivers. This likely means using proprietary [[NVIDIA]] or [[AMD Catalyst]] drivers. [[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:
 
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
 
  Direct rendering is disabled, most likely your OpenGL drivers have not been installed correctly
  
For x86-64 systems, additional 32-bit [multilib] or [[AUR]] packages are required:
+
For x86-64 systems, additional [[multilib]] or [[AUR]] packages are required:
  
* '''NVIDIA''': {{ic|# pacman -S lib32-nvidia-utils}} For older cards search the AUR for [https://aur.archlinux.org/packages.php?K=lib32-nvidia-utils lib32-nvidia-utils] (e.g. -173xx).
+
* '''NVIDIA''': {{Pkg|lib32-nvidia-libgl}} For older cards search the AUR for '''lib32-nvidia-utils''' (e.g. -173xx).
 
+
* '''NVIDIA (open driver)''': {{Pkg|lib32-nouveau-dri}}.
* '''NVIDIA (using nouveau-dri)''': {{ic|# pacman -S lib32-nouveau-dri}}  
+
* '''Intel''': {{Pkg|lib32-intel-dri}}. Run Wine with: {{ic|1=LIBGL_DRIVERS_PATH=/usr/lib32/xorg/modules/dri}}.
 
+
* '''AMD/ATI''': {{Pkg|lib32-catalyst-utils}}.
* '''Intel''': {{ic|# pacman -S lib32-intel-dri}} Run Wine with: {{ic|1=LIBGL_DRIVERS_PATH=/usr/lib32/xorg/modules/dri}}
+
* '''AMD/ATI (open driver)''': {{Pkg|lib32-ati-dri}}.
 
+
* '''AMD/ATI''': {{ic|# pacman -S lib32-ati-dri}} For ATI's proprietary drivers: {{ic|# pacman -S {{Pkg|lib32-catalyst-utils}}}}. <s>install {{AUR|lib32-catalyst-utils}} from the AUR</s>
+
  
 
{{Note|You might need to restart X after having installed the correct library.}}
 
{{Note|You might need to restart X after having installed the correct library.}}
  
 
=== Sound ===
 
=== Sound ===
 +
 
By default sound issues may arise when running Wine applications. Ensure only one sound device is selected in {{ic|winecfg}}. Currently, the [[Alsa]] driver is the most supported.
 
By default sound issues may arise when running Wine applications. Ensure only one sound device is selected in {{ic|winecfg}}. Currently, the [[Alsa]] driver is the most supported.
  
Line 114: Line 109:
 
For encryption support on x86_64 you need to install {{Pkg|lib32-gnutls}}.
 
For encryption support on x86_64 you need to install {{Pkg|lib32-gnutls}}.
  
===Fonts===
+
=== Fonts ===
  
 
If Wine applications are not showing easily readable fonts, you may not have Microsoft's Truetype fonts installed. See [[MS Fonts]]. If this does not help, try running {{ic|winetricks allfonts}}.
 
If Wine applications are not showing easily readable fonts, you may not have Microsoft's Truetype fonts installed. See [[MS Fonts]]. If this does not help, try running {{ic|winetricks allfonts}}.
Line 124: Line 119:
 
  "ClientSideWithRender"="N"
 
  "ClientSideWithRender"="N"
  
=== Desktop Launcher Menus ===
+
=== Desktop launcher menus ===
 +
 
 
By default, installation of Wine does not create desktop menus/icons for the software which comes with Wine (e.g. for {{ic|winecfg}}, {{ic|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. {{ic|setup.exe}}) would normally add an icon to your Desktop or "Start Menu" on Windows, then Wine should create corresponding freedesktop.org style {{ic|.desktop}} files for launching your programs with Wine.
 
By default, installation of Wine does not create desktop menus/icons for the software which comes with Wine (e.g. for {{ic|winecfg}}, {{ic|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. {{ic|setup.exe}}) would normally add an icon to your Desktop or "Start Menu" on Windows, then Wine should create corresponding freedesktop.org style {{ic|.desktop}} files for launching your programs with Wine.
  
Line 131: Line 127:
 
If you wish to add on to the menu to create an Ubuntu-like Wine sub-menu, then follow these instructions:
 
If you wish to add on to the menu to create an Ubuntu-like Wine sub-menu, then follow these instructions:
  
==== Creating Menu Entries ====
+
==== 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 {{ic|"Create Launcher..."}}. The steps might be different for KDE/Xfce. Make three launchers using these settings:
 
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 {{ic|"Create Launcher..."}}. The steps might be different for KDE/Xfce. Make three launchers using these settings:
 
  '''Type''': Application
 
  '''Type''': Application
Line 184: Line 181:
 
Go check in the menu and there should be the minty fresh options waiting to be used!
 
Go check in the menu and there should be the minty fresh options waiting to be used!
  
==== Remove Wine Launcher Menus in Gnome3 ====
+
==== Remove Wine launcher menus in Gnome3 ====
 +
 
 
System wide launcher menus are located in {{ic|/usr/share/applications/}}. Remove the program's ".desktop" entry to remove the launcher system wide.
 
System wide launcher menus are located in {{ic|/usr/share/applications/}}. Remove the program's ".desktop" entry to remove the launcher system wide.
  
Line 190: Line 188:
 
{{ic|~/.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.
 
{{ic|~/.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.
  
==== KDE 4 Menu Fix[https://bugs.launchpad.net/ubuntu/+source/wine/+bug/263041] ====
+
==== KDE 4 menu fix ====
The Wine menu items may appear in {{ic|"Lost & Found"}} instead of the Wine menu in KDE 4. This is because {{ic|kde-applications.menu}} is missing the {{ic|MergeDir}} option.
+
 
 +
The Wine menu items [https://bugs.launchpad.net/ubuntu/+source/wine/+bug/263041 may appear] in {{ic|"Lost & Found"}} instead of the Wine menu in KDE 4. This is because {{ic|kde-applications.menu}} is missing the {{ic|MergeDir}} option.
  
 
Edit {{ic|/etc/xdg/menus/kde-applications.menu}}
 
Edit {{ic|/etc/xdg/menus/kde-applications.menu}}
Line 213: Line 212:
 
This has the added bonus that an update to KDE won't change it, but is per user instead of system wide.
 
This has the added bonus that an update to KDE won't change it, but is per user instead of system wide.
  
== Running Windows Applications ==
+
== Running Windows applications ==
 +
 
 
{{Warning|Do not run or install Wine applications as root! See [http://wiki.winehq.org/FAQ#run_as_root Running Wine as root] for the official statement.}}
 
{{Warning|Do not run or install Wine applications as root! See [http://wiki.winehq.org/FAQ#run_as_root Running Wine as root] for the official statement.}}
 
To run a windows application:
 
To run a windows application:
Line 221: Line 221:
 
  $ msiexec installername.msi
 
  $ msiexec installername.msi
  
== Tips and Tricks ==
+
== Tips and tricks ==
 +
 
 
{{Tip|In addition to the links provided in the beginning of the article the following may be of interest:
 
{{Tip|In addition to the links provided in the beginning of the article the following may be of interest:
 
* [http://appdb.winehq.org/ The Wine Application Database (AppDB)] - Information about running specific Windows applications (Known issues, ratings, guides, etc tailored to specific applications)
 
* [http://appdb.winehq.org/ The Wine Application Database (AppDB)] - Information about running specific Windows applications (Known issues, ratings, guides, etc tailored to specific applications)
Line 230: Line 231:
  
 
=== Installing Microsoft Office ===
 
=== Installing Microsoft Office ===
 +
 +
UPDATE: 09-Apr, 2013: With Wine 1.5.27, none of the below "tweaks" are necessary. Ensure winbind is installed (the samba package has it). Then
 +
 +
$ export WINEPREFIX="<path to a writable folder on your home directory>"
 +
$ export WINEARCH="win32"
 +
$ wine /path/to/office_cd/setup.exe
 +
 +
You could also put the above exports into your bashrc.
 +
Once installation completes, open Word or Excel to activate over the internet. Once done, close the application. Then run '''winecfg''', and set riched20 (under libraries) to Native (Windows). This will enable Powerpoint to work.
 +
(tested with Office Home/Student 2010 and wine 1.5.27. Activation over Internet also works)
  
 
A small tweak is needed to install the office suite. Follow these steps to accomplish it:
 
A small tweak is needed to install the office suite. Follow these steps to accomplish it:
Line 241: Line 252:
 
For additional info, see the [http://appdb.winehq.org/appview.php?iVersionId=4992 WineHQ] article.
 
For additional info, see the [http://appdb.winehq.org/appview.php?iVersionId=4992 WineHQ] article.
  
=== OpenGL Modes ===
+
{{note|{{Pkg|playonlinux}} provides custom installer scripts that make the installation of Office 2003, 2007 and 2010 an ease. You just have to provide the setup.exe or ISO and the installer will guide you seamlessly through the installation procedure. You do not have to deal with the underlying Wine at all.}}
 +
 
 +
=== OpenGL modes ===
 +
 
 
Many games 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 {{Ic|-opengl}} parameter.
 
Many games 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 {{Ic|-opengl}} parameter.
 
  $ wine /path/to/3d_game.exe -opengl
 
  $ wine /path/to/3d_game.exe -opengl
Line 248: Line 262:
  
 
=== Using Wine as an interpreter for Win16/Win32 binaries ===
 
=== 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 {{ic|binfmt_misc}} filesystem:
 
# mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
 
Or you can add this line to your {{ic|/etc/fstab}}:
 
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
 
  
The way to make this setting permanent depends on whether you use [[systemd]] or [[initscripts]].
+
It is also possible to tell the kernel to use wine as an interpreter for all Win16/Win32 binaries.
Systemd users can create a configuration file in {{ic|/etc/tmpfiles.d}} with the following contents:
+
The process for setting this up depends on whether you boot using [[systemd]] or [[initscripts]].
 +
 
 +
==== Systemd ====
 +
 
 +
Tell the kernel how to interpret Win16 and Win32 binaries:
 +
echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
 +
To make the setting permanent, create a configuration file in {{ic|/etc/tmpfiles.d}} with the following contents:
 
{{hc|/etc/tmpfiles.d/enable-doswin-exe.conf|
 
{{hc|/etc/tmpfiles.d/enable-doswin-exe.conf|
 
w /proc/sys/fs/binfmt_misc/register - - - - :DOSWin:M::MZ::/usr/bin/wine:}}
 
w /proc/sys/fs/binfmt_misc/register - - - - :DOSWin:M::MZ::/usr/bin/wine:}}
 +
 +
Note that, in contrast to initscripts,
 +
systemd will automatically mount {{ic|/proc/sys/fs/binfmt_misc}} on use by default.
 +
Thus adding the tmpfiles rule should be sufficient for most users.
 +
 
For more info on tmpfiles, see [[Systemd#Temporary_files]].
 
For more info on tmpfiles, see [[Systemd#Temporary_files]].
  
Initscript users can add this line to {{ic|/etc/rc.local}} to make the setting permanent. In this case you may want to ignore stderr to avoid error messages when changing runlevels:
+
==== Initscripts ====
 +
 
 +
First mount the {{ic|binfmt_misc}} filesystem:
 +
# mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
 +
Or you can add this line to your {{ic|/etc/fstab}}:
 +
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 {{ic|/etc/rc.local}} 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
 
  { echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null
 +
 +
==== Test the setup ====
  
 
Now try to run a Windows program:
 
Now try to run a Windows program:
 
  chmod 755 exefile.exe
 
  chmod 755 exefile.exe
 
  ./exefile.exe
 
  ./exefile.exe
 +
 +
If all went well, exefile.exe should run.
  
 
=== Wineconsole ===
 
=== Wineconsole ===
Line 277: Line 309:
  
 
=== Winetricks ===
 
=== Winetricks ===
 +
 
[http://wiki.winehq.org/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.
 
[http://wiki.winehq.org/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.
  
Line 283: Line 316:
  
 
== Third-party interfaces ==
 
== Third-party interfaces ==
 +
 
These have their own sites, and are not supported in the Wine forums.
 
These have their own sites, and are not supported in the Wine forums.
 +
 
=== CrossOver ===
 
=== CrossOver ===
 +
 
[http://www.codeweavers.com/about/ CrossOver] Has its own [[CrossOver|wiki page]].
 
[http://www.codeweavers.com/about/ CrossOver] Has its own [[CrossOver|wiki page]].
 +
 
=== PlayOnLinux/PlayOnMac ===
 
=== PlayOnLinux/PlayOnMac ===
 +
 
[http://www.playonlinux.com/ 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 [http://appdb.winehq.org/ Wine Application Database]. You can find the {{Pkg|playonlinux}} package in [[community]].
 
[http://www.playonlinux.com/ 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 [http://appdb.winehq.org/ Wine Application Database]. You can find the {{Pkg|playonlinux}} package in [[community]].
  
 
=== PyWinery ===
 
=== PyWinery ===
 +
 
[http://code.google.com/p/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, {{ic|winecfg}}, application uninstaller and wineDOS. You can install [https://aur.archlinux.org/packages.php?ID=48382 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.
 
[http://code.google.com/p/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, {{ic|winecfg}}, application uninstaller and wineDOS. You can install [https://aur.archlinux.org/packages.php?ID=48382 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 {{ic|.exe}} files, so you can choose between any wine configuration you have.
+
It's recommended using winetricks by default to open '''.exe''' files, so you can choose between any wine configuration you have.
  
 
=== Q4wine ===
 
=== Q4wine ===
 +
 
[http://q4wine.brezblock.org.ua/ 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 {{Pkg|q4wine}} package in [[multilib]].
 
[http://q4wine.brezblock.org.ua/ 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 {{Pkg|q4wine}} package in [[multilib]].
  
== External Resources ==
+
== See also ==
* [http://www.winehq.com/ Official Wine Website]
+
 
* [http://appdb.winehq.org/ Wine Application Database]
+
* [http://www.winehq.com/ Official Wine website]
 +
* [http://appdb.winehq.org/ Wine application database]
 
* [http://linuxgamingtoday.wordpress.com/2008/02/16/quick-tips-to-speed-up-your-gaming-in-wine/ Advanced configuring your gfx card and OpenGL settings on wine; Speed up wine]
 
* [http://linuxgamingtoday.wordpress.com/2008/02/16/quick-tips-to-speed-up-your-gaming-in-wine/ Advanced configuring your gfx card and OpenGL settings on wine; Speed up wine]
 
* [http://wiki.gotux.net/code:perl:fileinfo FileInfo] - Find Win32 PE/COFF headers in EXE/DLL/OCX files under linux/unix environment.
 
* [http://wiki.gotux.net/code:perl:fileinfo FileInfo] - Find Win32 PE/COFF headers in EXE/DLL/OCX files under linux/unix environment.

Revision as of 13:14, 16 June 2013

Summary help replacing me
Wine is a compatibility layer capable of running Microsoft Windows applications on Unix-like operating systems. Programs running in Wine act as native programs would, without the performance/memory penalties of an emulator.
Related
Steam
CrossOver

See the official project home and wiki pages for longer introduction.

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 can be installed with the package wine, available in the official repositories. If you are running a 64-bit system, you will need to enable the Multilib repository first.

You may also want to install wine_gecko and wine-mono for applications that need support for Internet Explorer and .NET, respectively. These packages are not strictly required as Wine will download the relevant files as needed. However, having the files downloaded in advance allows you to work off-line and makes it so Wine does not download the files for each WINEPREFIX needing them.

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:

$ WINEARCH=win32 WINEPREFIX=~/win32 winecfg 
$ WINEPREFIX=~/win64 winecfg
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):

env WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/steam winetricks steam
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 NVIDIA or AMD Catalyst drivers. 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

For x86-64 systems, additional multilib or AUR packages are required:

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

Sound

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.

If you want to use Alsa driver in Wine, and are using x86_64, you'll need to install the lib32-alsa-lib. If you are also using PulseAudio, you will need to install lib32-libpulse.

If you want to use OSS driver in Wine, you will need to install the lib32-alsa-oss package. The OSS driver in the kernel will not suffice.

If winecfg still fails to detect the audio driver (Selected driver: (none)), configure it via the registry.

Games that use advanced sound systems may require installations of lib32-openal.

Other libraries

Some applications (e.g. Office 2003) require ability to parse HTML or XML (they use MSXML library), in such case you need to install lib32-libxml2.

Applications that play music may require lib32-mpg123.

For application that use native image manipulation libraries installation of lib32-giflib and lib32-libpng may be required.

For encryption support on x86_64 you need to install lib32-gnutls.

Fonts

If Wine applications are not showing easily readable fonts, you may not have Microsoft's Truetype fonts installed. See MS Fonts. If this does not 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 with regedit:

[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"ClientSideWithRender"="N"

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:

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:\
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:

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:
~/.config/menus/applications-merged/wine-utilities.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>
 	<Filename>wine-Configuration.desktop</Filename>
     </Include>
     <Include>
 	<Filename>wine-Browse C:\.desktop</Filename>
     </Include>
     <Include>
 	<Filename>wine-Uninstall Programs.desktop</Filename>
     </Include>
   </Menu>
 </Menu>

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.

KDE 4 menu fix

The Wine menu items may appear in "Lost & Found" instead of the Wine menu in 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:

<Menu>
        <Include>
                <And>
                        <Category>KDE</Category>
                        <Category>Core</Category>
                </And>
        </Include>
        <DefaultMergeDirs/>
        <MergeDir>applications-merged</MergeDir>
        <MergeFile>applications-kmenuedit.menu</MergeFile>
</Menu>

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.

Running Windows applications

Warning: Do not run or install Wine applications as root! See Running Wine as root for the official statement.

To run a windows application:

$ wine <path to exe>

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

$ msiexec installername.msi

Tips and tricks

Tip: In addition to the links provided in the beginning of the article the following may be of interest:

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.

Installing Microsoft Office

UPDATE: 09-Apr, 2013: With Wine 1.5.27, none of the below "tweaks" are necessary. Ensure winbind is installed (the samba package has it). Then

$ export WINEPREFIX="<path to a writable folder on your home directory>"
$ export WINEARCH="win32"
$ wine /path/to/office_cd/setup.exe

You could also put the above exports into your bashrc. Once installation completes, open Word or Excel to activate over the internet. Once done, close the application. Then run winecfg, and set riched20 (under libraries) to Native (Windows). This will enable Powerpoint to work. (tested with Office Home/Student 2010 and wine 1.5.27. Activation over Internet also works)

A small tweak is needed to install the office suite. Follow these steps to accomplish it:

$ WINEARCH=win32 WINEPREFIX=/path/to/wineprefix winecfg
# pacman -S winetricks
$ winetricks msxml3 # For MS Office 2007
$ winetricks msxml3 msxml6 # For MS Office 2010
$ wine /path/to/office_cd/setup.exe

For additional info, see the WineHQ article.

Note: playonlinux provides custom installer scripts that make the installation of Office 2003, 2007 and 2010 an ease. You just have to provide the setup.exe or ISO and the installer will guide you seamlessly through the installation procedure. You do not have to deal with the underlying Wine at all.

OpenGL modes

Many games 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.

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. The process for setting this up depends on whether you boot using systemd or initscripts.

Systemd

Tell the kernel how to interpret Win16 and Win32 binaries:

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

To make the setting permanent, create a configuration file in /etc/tmpfiles.d with the following contents:

/etc/tmpfiles.d/enable-doswin-exe.conf
w /proc/sys/fs/binfmt_misc/register - - - - :DOSWin:M::MZ::/usr/bin/wine:

Note that, in contrast to initscripts, systemd will automatically mount /proc/sys/fs/binfmt_misc on use by default. Thus adding the tmpfiles rule should be sufficient for most users.

For more info on tmpfiles, see Systemd#Temporary_files.

Initscripts

First mount the binfmt_misc filesystem:

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

Or you can add this line to your /etc/fstab:

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 /etc/rc.local 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

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.

You can install winetricks via pacman or use the winetricks-svnAUR package available in the AUR. Then run it with:

$ winetricks

Third-party interfaces

These have their own sites, and are not supported in the Wine forums.

CrossOver

CrossOver Has its own wiki page.

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.

See also