WineHQ

FAQ: Difference between revisions

(Fixing wiki link)
(251 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''''Translations of this page:'''''
__NUMBEREDHEADINGS__
http://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_France.svg/22px-Flag_of_France.svg.png[[Wine FAQ fr|Français]]
'''Translations of this page:''' {{flag|France}} [[FAQ fr|Français]] ; Not all ported. Translators, please see Discussion page.
http://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Flag_of_Japan.svg/22px-Flag_of_Japan.svg.png[[Wine FAQ ja|日本語]]
http://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Flag_of_Poland.svg/22px-Flag_of_Poland.svg.png[[Wine FAQ pl|Polski]]
http://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Russia.svg/22px-Flag_of_Russia.svg.png[[Wine FAQ ru|Русский]]
http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Flag_of_the_People%27s_Republic_of_China.svg/22px-Flag_of_the_People%27s_Republic_of_China.svg.png[[Wine FAQ zhcn|简体中文]]
 
----
----
This FAQ, or '''F'''requently '''A'''sked '''Q'''uestions, covers general topics about Wine. For questions related to Wine software development, see the [[Developer FAQ]].


This FAQ, or '''F'''requently '''A'''sked '''Q'''uestions, covers general topics about Wine. For questions related to Wine software development, see the [[DeveloperFaq|developer FAQ]].
Quick links: [[#How do I run an application once I've installed it?|running a program in Wine]], [[#How should I start Windows programs from the command line?|running Wine from a terminal]], [[#Should I run Wine as root?|running program as root]], [[#Uninstalling|uninstalling an application]], [[#How can I get a debugging log (a.k.a. terminal output)?|getting a debugging log]], [[#Can I store the virtual Windows installation somewhere other than ~/.wine?|using a wineprefix]], [[#How do I create a 32 bit wineprefix on a 64 bit system?|creating a 32 bit wineprefix]].
Quick links: [[#run_program|running a program in Wine]], [[#run_from_terminal|running Wine from a terminal]], [[#run_as_root|running program as root]], [[#uninstall_app|uninstalling an application]], [[#get_log|getting a debugging log]], [[#wineprefix|using a wineprefix]], [[#32_bit_wineprefix|creating a 32 bit wineprefix]].
 


== General questions ==
== General questions ==
=== Who is responsible for Wine? ===
=== Who is responsible for Wine? ===
Wine is available thanks to the work of many people around the world. Some companies that are or have been involved with Wine development are [http://www.codeweavers.com CodeWeavers], [http://bordeauxgroup.com/ Bordeaux], TransGaming, Corel, Macadamian and Google. See [[Acknowledgements]] and [[WineHistory]].
Wine is available thanks to the work of many people around the world. Some companies that are or have been involved with Wine development are [http://www.codeweavers.com CodeWeavers], [http://bordeauxgroup.com/ Bordeaux], TransGaming, Corel, Macadamian and Google. See [[Acknowledgements]] and [[Wine History]].


=== Does Wine hurt Linux or other free operating systems? ===
=== Does Wine hurt Linux or other free operating systems? ===
Wine increases the usefulness of Linux, makes it easier for users to switch to free operating systems, and for Windows developers to make applications that work on them. See the [[Debunking Wine Myths]] article for a fuller answer.
Wine increases the usefulness of Linux, makes it easier for users to switch to free operating systems, and for Windows developers to make applications that work on them. This greatly raises Linux marketshare, drawing more commercial and community developers to Linux.


=== Is Wine an emulator? There seems to be disagreement. ===
=== Is Wine an emulator? There seems to be disagreement ===
There is a lot of confusion about this, particularly caused by people getting Wine's name wrong and calling it WINdows Emulator.
There is a lot of confusion about this, particularly caused by people getting Wine's name wrong and calling it WINdows Emulator.


Line 33: Line 27:


=== What is the difference between Wine, CrossOver, and Cedega? ===
=== What is the difference between Wine, CrossOver, and Cedega? ===
Wine is the base of the project, where most of the work is being done. Wine is not perfect, but [[UsageStatistics|tens of thousands]] of people nevertheless use "vanilla" Wine successfully to run a large number of Windows programs.
Wine is the base of the project, where most of the work is being done. Wine is not perfect, but [[Usage Statistics|tens of thousands]] of people nevertheless use "vanilla" Wine successfully to run a large number of Windows programs.


CrossOver XI (formerly CrossOver Office) is a product made by a company called CodeWeavers that is based directly on Wine with a few tweaks and proprietary add-ons. Unlike the biweekly Wine releases, CrossOver releases are rigorously tested for compatibility with CodeWeavers' supported applications in order to prevent "[[Regression|regressions]]". CodeWeavers employs a large proportion of the Wine developers and provides a great deal of leadership for the project. All improvements to Wine eventually work their way into CrossOver.
CrossOver XI (formerly CrossOver Office) is a product made by a company called CodeWeavers that is based directly on Wine with a few tweaks and proprietary add-ons. Unlike the biweekly Wine releases, CrossOver releases are rigorously tested for compatibility with CodeWeavers' supported applications in order to prevent "regressions". CodeWeavers employs a large proportion of the Wine developers and provides a great deal of leadership for the project. All improvements to Wine eventually work their way into CrossOver.


Cedega (formerly WineX) is a product from a company called TransGaming. TransGaming based their product on Wine back in 2002 when Wine had a different license, closed their source code, and rebranded their version as specialized for gamers. In the years since Cedega was originally created from Wine, development on Wine and Cedega have continued mostly independently. TransGaming currently gives back very little code to Wine. Cedega is '''not''' "Wine with more gaming support" - because Wine has had years of development since Cedega was made, and many games actually run better under Wine than under Cedega. Currently, Wine has more advanced Direct3D support than Cedega, but Cedega still has more advanced copy protection support due to TransGaming's licensing of (closed source) code from a handful of copy protection companies. Unlike CrossOver, most improvements to Wine ''don't'' get into Cedega due to the license differences between Cedega and Wine.
Cedega (formerly WineX) is a product from a company called TransGaming. TransGaming based their product on Wine back in 2002 when Wine had a different license, closed their source code, and rebranded their version as specialized for gamers. In the years since Cedega was originally created from Wine, development on Wine and Cedega have continued mostly independently. TransGaming currently gives back very little code to Wine. Cedega is '''not''' "Wine with more gaming support" - because Wine has had years of development since Cedega was made, and many games actually run better under Wine than under Cedega. Currently, Wine has more advanced Direct3D support than Cedega, but Cedega still has more advanced copy protection support due to TransGaming's licensing of (closed source) code from a handful of copy protection companies. Unlike CrossOver, most improvements to Wine ''don't'' get into Cedega due to the license differences between Cedega and Wine.


For more information, see [[WineHistory]].
For more information, see [[Wine History]].
 
=== How does the Wine version numbering system work? ===
See [[Wine_User's_Guide#Wine_from_WineHQ]].


=== Do I have to use the command line? ===
=== Do I have to use the command line? ===
You do not have to use the command line to use Wine. You can use a graphical interface for most things, much like on Windows. In many cases you can right-click an installer and select "Open with Wine", or just double-click it. You can start installed programs using the shortcut icon or menu.
Normally you do not have to use the command line to use Wine in Linux. You can use a graphical interface for most things, much like on Windows. In many cases you can right-click an installer and select "Open with Wine", or just double-click it. You can start installed programs using the shortcut icon or menu.
 
Even if you have a recent version, there are several situations when you might want to use the command line. The most common reason is to get debug output when your program does not run properly. You might also want to use utilities such as `regedit` that do not have menu shortcuts.


This does not hold true for Mac OS X Wine usage, which is all command line currently, unless you use a [[ThirdPartyApplications|third party application]].
However, there are several situations when you might need to use the command line. The most common reason is to get debug output when your program does not run properly. You might also want to use utilities such as <tt>regedit</tt> that do not have menu shortcuts (note that you can create them using whatever tools your DE provides).


=== Will Wine work with my application? ===
This does not hold true for Mac OS X Wine usage, which is all command line currently, unless you use a [[Third Party Applications|third party application]].
Probably! If your application is even slightly well-known, you will probably find other user reports in the [http://appdb.winehq.org/ Application Database]. If there aren't any reports using a recent version of Wine, however, your best bet is to simply try and see. If it doesn't work, it probably isn't your fault, Wine is not yet complete. Ask for help on the forum if you get stuck.


=== What applications run well with Wine? ===
=== What applications run well with Wine? ===
Thousands of applications work well. As a general rule, simpler or older applications tend to work well, and the latest versions of complex applications or games tend to not work well yet. See [http://appdb.winehq.org the Wine Application Database] for details on individual applications. If your application is rated Silver, Gold or Platinum, you're probably okay; if it's rated Bronze or Garbage, Wine isn't really ready to run it for most users.
Thousands of applications work well. As a general rule, simpler or older applications tend to work well, and the latest versions of complex applications or games tend to not work well yet. See [http://appdb.winehq.org the Wine Application Database] for details on individual applications. If your application is rated Silver, Gold or Platinum, you're probably okay; if it's rated Bronze or Garbage, Wine isn't really ready to run it for most users. If there aren't any reports using a recent version of Wine, however, your best bet is to simply try and see. If it doesn't work, it probably isn't your fault, Wine is not yet complete. Ask for help on the forum if you get stuck.


=== How do I run Wine? ===
=== How can I help contribute to the Wine project, and in what ways? ===
Wine is not an application you run. Wine enables your computer to run Windows applications. Simply install and run your applications as you would in Windows. See [[#run_installer|How do I run an installer using Wine]].
You can contribute programming or documentation skills, or monetary or equipment donations, to aid the Wine developers in reaching their goals.


=== Where is my C: drive? ===
One area where every Wine user can contribute to this project is by sending high quality bug reports to our [http://bugs.winehq.org/ Bugzilla] and helping the developers with any followup questions that they may have about your bug. It is impossible and impractical for a developer to have a copy of every program on the market, so we need your help even after your initial bug report. If a developer has a good idea what might be causing the bug, he or she may ask if you can try a patch and see if it fixes the problem. If the patch works and then makes its way into our main development tree, the bug report will be closed, your help will be appreciated by everyone and your problem will be fixed.


Wine uses a virtual C: drive instead of your real C: drive. The directory in which this is located is called a 'wineprefix.'
For a list of ideas of how you can help, please consult the [[Main Page#Contribute|Contribute]] section of the main page.


By default, it's in your home directory's `.wine/drive_c` subdirectory. (On MacOSX, see [[MacOSX/FAQs|the MacOSX Wine FAQ]] for how to find this.)
=== I think I've found a bug. How do I report this to WineHQ? ===
Bug reports should be submitted to our online [http://bugs.winehq.org/ Bugzilla system]. To increase developer productivity and facilitate a resolution to submitted bugs, '''please read the Wiki article on [[Bugs]]'''. A poor bug report may be marked INVALID and closed, leaving you no closer to resolving your problem. High quality bug reports are an essential part of making Wine better.


See also the `WINEPREFIX` environment variable; if this is set, wine uses it to find the wineprefix.
Please note that you should ''generally'' avoid submitting bug reports if you have used any [[Third Party Applications|third party applications]] or native DLL overrides.


=== How can I help contribute to the Wine project, and in what ways? ===
=== Where can I get further help? ===
You can contribute programming or documentation skills, or monetary or equipment donations, to aid the Wine developers in reaching their goals.
In addition to this [[Main Page|wiki]], check the [http://www.winehq.org/documentation Wine HQ Documentation] and the [http://forums.winehq.org/ users forum]. If you're an ISV looking at porting an application with Winelib you can also try [http://forums.winehq.org/ wine-devel].


One area where every Wine user can contribute to this project is by sending high quality bug reports to our [http://bugs.winehq.org/ Bugzilla] and helping the developers with any followup questions that they may have about your bug. It is impossible and impractical for a developer to have a copy of every program on the market, so we need your help even after your initial bug report. If a developer has a good idea what might be causing the bug, he or she may ask if you can try a patch and see if it fixes the problem. If the patch works and then makes its way into our main development tree, the bug report will be closed, your help will be appreciated by everyone and your problem will be fixed.
For help with a specific application, search the [http://appdb.winehq.org Application Database], a place where users share their experiences by submitting test data, tips and tricks, and asking questions.


For a list of ideas of how you can help, please consult the [:HelpingWine:helping Wine] page.
The IRC channel: [irc://irc.freenode.net/#winehq #WineHQ] on irc.freenode.net. Knowledgeable Wine users hang out there, and often developers will lurk there too. See [https://www.winehq.org/irc IRC] for more important information.


== Installing Wine ==
== Installing Wine ==
=== What are the system requirements for Wine? ===
Wine, along with the operating system you use to run it, generally requires less disk space and memory than Windows itself. If you're not currently running a Windows application, Wine won't consume any resources at all other than about 20 megabytes of disk space.
Ideally, if an application runs fine in Windows, it should run fine on the same hardware using Wine, ''provided native drivers for your hardware are installed and equivalent to the Windows drivers''.  Open source Linux graphics drivers in particular are often inadequate to run games that work fine on the same hardware in Windows. If there is no native driver for your hardware, Wine will not be able to use it.
==== Does Wine run on all Unix filesystems? ====
Mostly. Wine is written to be filesystem independent so MS Windows applications should work on virtually any full-featured UNIX filesystem. The key exception is that not all filesystems / drivers support every feature of fat32 or NTFS. One example is that the ntfsv3 drivers do not support shared-write mmap, a feature that cannot be emulated and is used by applications such as Steam.
One other point is that Wine is a weird application in ways and some programs work ''better'' on case-insensitive filesystems (see [[Case Insensitive Filenames]] for more details).
==== Will Wine run only under X? ====
Until recently with projects such as Wayland, serious alternatives to x11drv weren't even on the horizon so development has focused on X. However, Wine's interface with the graphics driver is designed to be abstract so supporting future graphics systems will hopefully be straight-forward.
=== Which version of Wine should I use? ===
=== Which version of Wine should I use? ===
'''Short answer:''' Use the version that works best with the particular applications you want to run. In most cases, this will be the latest development version; however, in some cases it may take some experimenting to find it.
'''Short answer:''' Use the version that works best with the particular applications you want to run. In most cases, this will be the latest development version; however, in some cases it may take some experimenting to find it.


'''Longer answer:''' Wine development is rapid, with new releases in the development branch every two weeks or so. Functionality will usually be best with the most recent development version, however, there are cases where changes to existing code in Wine cause applications that worked well in older versions to not work in the new one (these are called [:Regression:regressions]), as well as problems caused by the introduction of new, but as-yet-incomplete and untested, functions.
'''Longer answer:''' Wine development is rapid, with new releases in the development branch every two weeks or so. Functionality will usually be best with the most recent development version, however, there are cases where changes to existing code in Wine cause applications that worked well in older versions to not work in the new one (these are called regressions), as well as problems caused by the introduction of new, but as-yet-incomplete and untested, functions.


A good rule of thumb is to start with the version of Wine installed with your distro and see if that works with the applications you want to use. If it does, good! If it doesn't, upgrade. In most cases the upgrade should be to the latest development version, but it is a good idea to check Bugzilla and the AppDB for any known regressions and/or new bugs. If there are any, and there is no easy workaround, upgrade to the most recent version known to work for your application.
A good rule of thumb is to start with the version of Wine installed with your distro and see if that works with the applications you want to use. If it does, good! If it doesn't, upgrade. In most cases the upgrade should be to the latest development version, but it is a good idea to check Bugzilla and the AppDB for any known regressions and/or new bugs. If you find an existing bug marked STAGED, this means there is a patch for the problem in wine-staging (the experimental branch), and you should try the latest version in that branch. If there are known bugs without a STAGED patch or easy workaround, upgrade to the most recent version of Wine known to work for your application.


While Wine does have a "stable" branch, the term "stable" refers to the branch as a whole, which is infrequently updated, and (for the minor stable releases) only with bugfixes promised not to break functionality. Users of a development release can achieve the same degree of stability by simply not upgrading. Note that user support for the stable branch is limited to the ability to file AppDB test reports. Users who ask for help on the forum/IRC or file bug reports for the stable branch will be asked to retest in the current development release.
While Wine does have a "stable" branch, the term "stable" refers to the branch as a whole, which is infrequently updated, and (for the minor stable releases) only with bugfixes promised not to break functionality. Users of a development or staging release can achieve the same degree of stability by simply not upgrading. Note that user support for the stable branch is limited to the ability to file AppDB test reports. Users who ask for help on the forum/IRC or file bug reports for the stable branch will be asked to retest in the current development release.


The current stable and development releases are listed on the [http://www.winehq.org WineHQ home page].
The current stable, development, and staging releases are listed on the [http://www.winehq.org WineHQ home page]. See [[Wine User's Guide#Wine from WineHQ]] for a description of the three branches and the version numbering system.
 
'''Users of the Ubuntu packages:''' The name given by Ubuntu to its Wine packages does not always correspond to the actual Wine version. Before seeking help on the forum/mailing list/IRC or filing bugs, please verify the version of Wine you have installed by typing `wine --version` in a terminal, and if it is not the current development release, upgrade.
 
<div id="install_wine"></div>


=== How do I install Wine? ===
=== How do I install Wine? ===
* Use a precompiled binary package for your operating system/distribution (see the [https://www.winehq.org/download Wine download page] for links and additional information).
* Use a precompiled binary package for your operating system/distribution (see the [[Download]] page for links and additional information).
* [[BuildingWine|Compile Wine from source]] - if you can't find an up-to-date package for your OS/distribution
* [[Building Wine|Compile Wine from source]] - if you can't find an up-to-date package for your OS/distribution


=== I have a problem installing my distro's Wine package and need help ===
=== I have a problem installing my distro's Wine package and need help ===
Line 96: Line 100:


=== Can I install more than one Wine version on my system? ===
=== Can I install more than one Wine version on my system? ===
Yes, but you will have to build Wine yourself (see [[BuildingWine|Building Wine]]), as it is not possible to have multiple distro packages installed. The easiest way to do this is to run Wine from the build directory (don't do `make install`). If you want to actually install multiple versions, use `--prefix` when building Wine to designate a different install directory for each version, e.g.
Yes, but you will have to build Wine yourself (see [[Building Wine]]), as it is not possible to have multiple distro packages installed. The easiest way to do this is to run Wine from the build directory (don't do <code>make install</code>). If you want to actually install multiple versions, use <tt>--prefix</tt> when building Wine to designate a different install directory for each version, e.g.


  ./configure prefix=/path/to/install/directory && make  
  ./configure prefix=''path_to_install_directory'' && make  
then install it with
then install it with


  sudo make install  
  sudo make install  
On Linux, even this step is not enough: you must also set environment variables so that the wine executable on your <tt>$PATH</tt> finds the right shared libraries. Assuming that <tt>/path/to/install/directory</tt> is <tt>$W</tt>, then for Wine version 1.4, the following settings appear to be sufficient:
On Linux, even this step is not enough: you must also set environment variables so that the wine executable on your <tt>$PATH</tt> finds the right shared libraries. Assuming that the path to install directory is <tt>$W</tt>, then for Wine version 1.4, the following settings appear to be sufficient:


  export WINEVERPATH=$W
  export WINEVERPATH=$W
Line 110: Line 114:
  export WINEDLLPATH=$W/lib/wine/fakedlls
  export WINEDLLPATH=$W/lib/wine/fakedlls
  export LD_LIBRARY_PATH="$W/lib:$LD_LIBRARY_PATH"  
  export LD_LIBRARY_PATH="$W/lib:$LD_LIBRARY_PATH"  
The `LD_LIBRARY_PATH` is definitely required.
The <tt>LD_LIBRARY_PATH</tt> is definitely required.


Note that regardless of whether you install multiple versions or run them from the build directory, you will still have to designate which version of Wine you wish to use when running applications. It is also recommended that applications being run with different Wine versions be installed into separate wineprefixes.
Note that regardless of whether you install multiple versions or run them from the build directory, you will still have to designate which version of Wine you wish to use when running applications. It is also recommended that applications being run with different Wine versions be installed into separate wineprefixes.


=== Is there a 64 bit Wine? ===
=== Is there a 64 bit Wine? ===
Yes. 64 bit Wine has been available on Linux since 1.2, and most major distros now package it for users. Normally, installation should be as simple as installing the Wine package for your distribution through your package manager. Check the [http://www.winehq.org/download Downloads] page.
Yes. 64 bit Wine has been available on Linux since 1.2. WineHQ binary packages are available for 64 bit, and most major distros package it for users. Normally, installation should be as simple as installing the Wine package for your distribution through your package manager. Check the [[Download]] page. If you are building Wine from source, see [[Building Wine]] for instructions on how to build 32 bit Wine on a 64 bit system and instructions on how to build 64 bit Wine in a shared WoW64 setup.


A couple of things to note:
A few things to note:


* 32 bit Wine runs on both 32-bit and 64-bit Linux/Unix installations. 16-bit and 32-bit Windows applications will run on it.
* 32 bit Wine runs on both 32-bit and 64-bit Linux/Unix installations. 16-bit and 32-bit Windows applications will run on it.
* 64-bit Wine runs only on 64 bit installations, and at present only on Linux. It requires the installation of 32 bit libraries in order to run 32 bit Windows applications. Both 32-bit and 64-bit Windows applications (should) work with it; however, there are still [http://bugs.winehq.org/buglist.cgi?keywords=win64&resolution=--- many bugs].
* 64-bit Wine runs only on 64 bit installations, and so far has only been extensively tested on Linux. It requires the installation of 32 bit libraries in order to run 32 bit Windows applications. Both 32-bit and 64-bit Windows applications (should) work with it; however, there are still [http://bugs.winehq.org/buglist.cgi?keywords=win64&resolution=--- many bugs].
 
* Current Wine includes support for 64 bit Wine on Mac OS X; however, this has not been tested very much, and some applications may never work due to an [https://www.winehq.org/wwn/364#Wine64%20on%20Mac%20OS%20X ABI incompatibility between Win64 and OS X].
If you need to build Wine from source, see [[BuildingWine]] for instructions on how to build 32 bit Wine on a 64 bit system and instructions on how to build 64 bit Wine in a shared !WoW64 setup.


=== Does Wine run on all Unix filesystems? ===
=== Where can I find old Wine binary packages? ===
Mostly. Wine is written to be filesystem independent so MS Windows applications should work on virtually any full-featured UNIX filesystem. The key exception is that not all filesystems / drivers support every feature of fat32 or NTFS. One example is that the ntfsv3 drivers do not support shared-write mmap, a feature that cannot be emulated and is used by applications such as Steam.
Old WineHQ binary packages are kept in their respective directories in the the [https://dl.winehq.org/wine-builds WineHQ download server].  


One other point is that Wine is a weird application in ways and some programs work ''better'' on case-insensitive filesystems (see [[CaseInsensitiveFilenames]] for more details).
Consult your distro for information on obtaining old versions of distro Wine packages.
 
=== Will Wine run only under X? ===
Until recently with projects such as Wayland, serious alternatives to x11drv weren't even on the horizon so development has focused on X. However, Wine's interface with the graphics driver is designed to be abstract so supporting future graphics systems will hopefully be straight-forward.
 
=== How can I download older versions of Wine for Ubuntu? ===
Some old versions are archived at [http://wine.budgetdedicated.com/archive/binary/].


=== How do I install Wine on my netbook (eeePC, Acer Aspire One, etc.)? ===
=== How do I install Wine on my netbook (eeePC, Acer Aspire One, etc.)? ===
If you have replaced the customized distro that came preinstalled on your netbook (Xandros, Linpus, etc.) with one of the mainstream distros that provide up-to-date Wine packages, you should be able to install Wine as normal for that distro.
If you have replaced the customized distro that came preinstalled on your netbook (Xandros, Linpus, etc.) with one of the mainstream distros that provide up-to-date Wine packages, you should be able to install Wine as normal for that distro.


If you are still using Xandros ([http://forum.eeeuser.com/ eeePC]), Linpus ([http://www.aspireoneuser.com/forum/ Acer Aspire One]) or any other customized distro, you will have to ask on your netbook's support forum. Only other users of those distros can advise you on what, if any, binary packages will work on your system, where to find them, and how to install them.
If you are still using Xandros (eeePC), Linpus ([http://www.aspireoneuser.com/forum/ Acer Aspire One]) or any other customized distro, you will have to ask on your netbook's support forum. Only other users of those distros can advise you on what, if any, binary packages will work on your system, where to find them, and how to install them.


You can also try building Wine from source following the instructions in the [http://winehq.org/docs/wineusr-guide/installing-wine-source/ Wine User Guide], but you will still need to consult your netbook's support forum regarding satisfying dependencies on your particular system.
You can also try building Wine from source following the instructions in [[Building Wine]], but you will still need to consult your netbook's support forum regarding satisfying dependencies on your particular system.


=== Installing on Apple ===
=== Installing on Apple ===
==== How do I install Wine on my Mac? ====
==== How do I install Wine on my Mac? ====
* '''[[MacOSX|WineHQ Packages]]''' are available for Mac OS X 10.8 and higher.
* '''[[macOS|WineHQ Packages]]''' are available for macOS 10.8 and higher.
* Build and install Wine using [http://brew.sh Homebrew], [http://www.macports.org MacPorts], or [http://www.finkproject.org Fink] to install Wine. All support the current releases of OSX. The [http://www.macports.org MacPorts] installation of Wine will automatically install any necessary Dependencies for a Wine installation.
* Build and install Wine using [http://brew.sh Homebrew], [http://www.macports.org MacPorts], or [http://www.finkproject.org Fink] to install Wine. All support the current releases of macOS. The [http://www.macports.org MacPorts] installation of Wine will automatically install any necessary Dependencies for a Wine installation.
* If this is too complicated, there are several [[ThirdPartyApplications|3rd party apps]] you can use like [http://www.codeweavers.com/products/cxmac/ Codeweavers' CrossOver Mac].  
* If this is too complicated, there are several [[Third Party Applications|third party apps]] you can use like [http://www.codeweavers.com/products/cxmac/ Codeweavers' CrossOver Mac].  
* '''Linux''': If you are running Linux on your Mac, installing Wine is as simple as installing it under Linux on a PC. Simply visit the [http://winehq.org/download downloads page].
* '''Linux''': If you are running Linux on your Mac, installing Wine is as simple as installing it under Linux on a PC. Visit the [[Download]] page for more info.


==== Can I use Wine on an older Mac without an Intel chip? ====
==== Can I use Wine on an older Mac without an Intel chip? ====
No, not even in Linux. Older Macs used PowerPC processors are incompatible with code compiled for x86 (Intel and AMD) processors, unless the code is run under CPU emulation. Wine Is Not a (CPU) Emulator, nor does it include one. The Darwine project was an effort to do just that, but it has not been maintained in many years.
No, not even in Linux. Older Macs used PowerPC processors are incompatible with code compiled for x86 (Intel and AMD) processors, unless the code is run under CPU emulation. Wine Is Not a (CPU) Emulator, nor does it include one. The Darwine project was an effort to do just that, but it has not been maintained in many years.
<div id="compile_wine"></div>


== Compiling Wine ==
== Compiling Wine ==
=== How do I compile Wine from source? ===
=== How do I compile Wine from source? ===
See [[BuildingWine]].
See [[Building Wine]].


=== How do I apply a patch? ===
=== How do I apply a patch? ===
You have to build Wine from source; see above.
You have to build Wine from source; see above.


<div id="uninstall_app"></div>
== Uninstalling ==
=== How do I uninstall Wine? ===
'''Uninstalling Wine itself will not revert your Wine settings or uninstall your Windows apps, which are permanently stored in your user's home directory'''. Do not uninstall Wine if you only wish to remove all of your settings and apps. For instructions on removing your Wine settings and apps, see [[#How do I wipe the virtual Windows installation?]]


== Uninstalling ==
*If you installed Wine with your distribution's package manager, use it again to uninstall Wine.
=== How do I uninstall Windows applications? ===
*If you installed Wine from source, use <code>sudo make uninstall</code> in the source directory to remove it.
=== How do I uninstall individual Windows applications? ===
You can run Wine's <tt>uninstaller</tt> command; this is like Windows' "Add/Remove Programs" function. To uninstall 64 bit applications, including wine-mono, you need to run it with wine64. The uninstaller should remove menu and desktop entries... but it's not well tested; it might not work with all apps. See below for a reliable way to remove *all* Windows apps.
You can run Wine's <tt>uninstaller</tt> command; this is like Windows' "Add/Remove Programs" function. To uninstall 64 bit applications, including wine-mono, you need to run it with wine64. The uninstaller should remove menu and desktop entries... but it's not well tested; it might not work with all apps. See below for a reliable way to remove *all* Windows apps.
<div id="uninstall_all_apps"></div>
=== How do I uninstall *all* Windows applications? ===
To remove '''all programs installed under Wine''', see [[uninstall|How do I wipe the virtual Windows installation?]]


=== How do I clean the Open With List? ===
=== How do I clean the Open With List? ===
Line 179: Line 172:
  rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
  rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
  rm -f ~/.local/share/mime/application/x-wine-extension*  
  rm -f ~/.local/share/mime/application/x-wine-extension*  
=== How do I uninstall Wine? ===
'''Uninstalling Wine itself will not revert your Wine settings or uninstall your Windows apps, which are permanently stored in your user's home directory'''. Do not uninstall Wine if you only wish to remove all of your settings and apps. For instructions on removing your Wine settings and apps, see [#uninstall How do I wipe the virtual Windows installation?]
If you installed Wine with your distribution's package manager, use it again to uninstall Wine (if you installed Wine from source, use `make uninstall` in the source directory to remove it).
<div id="uninstall"></div>


=== How do I wipe the virtual Windows installation? ===
=== How do I wipe the virtual Windows installation? ===
You can remove your virtual Windows installation and start from scratch by deleting the hidden `.wine` directory in your user's home directory. This will remove all of your Wine settings and Windows applications. The simplest and safest way to do this is through your file manager. Simply set your file manager to show hidden files, browse to your home directory, and delete .wine the same way you would any other directory. If you want to keep it as a backup, you can rename or move it instead. To the host system, a wineprefix is just another directory that can be deleted, moved, renamed, etc., the same as any other directory.
You can remove your virtual Windows installation and start from scratch by deleting the hidden <tt>.wine</tt> directory in your user's home directory. This will remove all of your Wine settings and Windows applications. The simplest and safest way to do this is through your file manager. Simply set your file manager to show hidden files, browse to your home directory, and delete <tt>.wine</tt> the same way you would any other directory. If you want to keep it as a backup, you can rename or move it instead. To the host system, a wineprefix is just another directory that can be deleted, moved, renamed, etc., the same as any other directory.


If you prefer to do it from the command line, '''carefully''' paste the following commands into a terminal:
If you prefer to do it from the command line, '''carefully''' paste the following commands into a terminal:
Line 197: Line 183:
  mv ~/.wine ~/.wine-old  
  mv ~/.wine ~/.wine-old  


Your Windows applications, though deleted, will remain in your system menu. (Remaining desktop files and icons are located in `~/.local/share`):
Your Windows applications, though deleted, will remain in your system menu (remaining desktop files and icons are located in <tt>~/.local/share</tt>).


To remove these leftover menu entries, '''carefully''' paste the following commands into a terminal:
To remove these leftover menu entries, '''carefully''' paste the following commands into a terminal:
Line 207: Line 193:
  rm -f ~/.local/share/icons/*-x-wine-*.{xpm,png} }}}
  rm -f ~/.local/share/icons/*-x-wine-*.{xpm,png} }}}


Alternatively, you can [[disable_winemenubuilder|stop Wine from creating menu entries in the first place]].
Alternatively, you can [[#How_can_I_prevent_Wine_from_changing_the_filetype_associations_on_my_system_or_adding_unwanted_menu_entries.2Fdesktop_links?|stop Wine from creating menu entries in the first place]].


== Installing Windows Applications ==
== Installing and Running Windows Applications ==
=== I have lots of applications already installed in Windows. How do I run them in Wine? ===
=== I have lots of applications already installed in Windows. How do I run them in Wine? ===
Short answer: you have to '''install them in Wine just like you did in Windows'''. Applications usually have a setup or installer program.
Short answer: you have to [[Wine User's Guide#How to install and run Windows programs|install them in Wine]] just like you did in Windows. Applications usually have a setup or installer program.


Long answer: some applications can be copied from Windows to Wine and still work, but don't try this unless you like tinkering under the hood of your car while it's running.
Long answer: some applications can be copied from Windows to Wine and still work, but don't try this unless you like tinkering under the hood of your car while it's running.
Line 217: Line 203:
'''Wine is not designed to interact with an existing Windows installation. If you have any data you need from a Windows installation, browse your Windows filesystems in your normal file manager and copy the data to another location.'''
'''Wine is not designed to interact with an existing Windows installation. If you have any data you need from a Windows installation, browse your Windows filesystems in your normal file manager and copy the data to another location.'''


'''WARNING''': Do not try to configure Wine to point to your actual Windows `C:\` drive. '''This will break Windows and require a Windows reinstall.''' We have tried to make this hard to do, so you probably cannot do it by accident. If you do manage this, Wine may or may not continue to operate, but your Windows install will be 100% dead due to critical parts of it being overwritten. The only way to fix Windows after this has happened is to reinstall it.
{{warning}} Do not try to configure Wine to point to your actual Windows <tt>C:\</tt> drive. '''This will break Windows and require a Windows reinstall.''' We have tried to make this hard to do, so you probably cannot do it by accident. If you do manage this, Wine may or may not continue to operate, but your Windows install will be 100% dead due to critical parts of it being overwritten. The only way to fix Windows after this has happened is to reinstall it.
 
<div id="run_installer"></div>


=== How do I run an installer using Wine? ===
=== How do I run an installer using Wine? ===
'''Double-click on the installer, just like in Windows!'''
See [[Wine User's Guide#How to install and run Windows programs]].


This may sometimes open the file in the wrong program - if this happens, check the filetype associations for the file.
=== How do I run an application once I've installed it? ===
See [[Wine User's Guide#How to install and run Windows programs]]


You can also right-click on it, choose "Run with", and choose "Wine".
=== How should I start Windows programs from the command line? ===
See [[Wine User's Guide#How to run Windows programs from the command line]].


Or, if all else fails, [http://psychocats.net/ubuntu/terminal open a terminal window], "change directory" to the folder containing the installer's .exe file, and run the installer with Wine by typing `wine` followed by the installer's filename. For example:
=== How do I pass command line arguments to a program? ===
See [[Wine User's Guide#Passing Windows command-line arguments]]


cd ~/Desktop
=== How do I install/run a <tt>.msi</tt> file? ===
wine FluffyBunnySetup.exe
See [[Wine User's Guide#Running .msi files]].
If the installer's name doesn't end in .exe, you have to say "wine start" and then the filename:


cd ~/Desktop
=== How do I install/run a ClickOnce (<tt>.application</tt>) file? ===
wine start FluffyBunnySetup.ms
Use winetricks to install whatever version of .NET the program requires, cd to the directory containing the .application file, and run it with
Instead of typing the entire path and filename, you can usually type just the first few letters and then press Tab, and the computer will complete the filename you were typing for you. If there are more then one file starting with the same letters, press TAB a second time to see all files that match.


If the program comes on multiple CD-ROM discs, you don't want to start Wine from the CD-ROM's directory or you won't be able to eject discs without exiting the installer. First, verify that your CD-ROM drive is assigned a drive letter in the "Drives" tab of `winecfg` (e.g. D: -> `/media/cdrom` ). Then run the installer this way:
wine start ''whatever.application''


wine start 'D:\setup.exe'
=== How do I launch native applications from a Windows application? ===
or
First, run <tt>regedit</tt> and add a dot character to the end of the list of extensions in <tt>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATHEXT</tt>.  


wine start /unix /media/cdrom/setup.exe
{{warning}} Note that this change will have to be made every time you upgrade Wine, as it will be reverted whenever the wineprefix is updated.  


=== How can I install applications to be shared by multiple users? ===
You can then start native applications using '''wine cmd''' if you specify the full path or use the shell, e.g.:
Wine does not currently allow sharing its configuration ("prefixes") between users, due to the risk of registry corruption from running multiple wineservers simultaneously (bug #11112). At present, applications must be installed separately for each user.
wine cmd /c /usr/bin/glxgears
 
or
However, you can copy Wine prefixes; you can install everything to one prefix, then make a copy of it in each user's home directory. This saves running installers repeatedly.
wine cmd /c /bin/sh -c glxgears
 
<div id="disable_winemenubuilder"></div>
 
=== How can I prevent Wine from changing the filetype associations on my system or adding unwanted menu entries/desktop links when I install a Windows program? ===
Users who do not want the installer for a Windows app to change filetype associations, add menu items, or create desktop links, can disable `winemenubuilder.exe` . There are several ways to do this:


* ''In winecfg:'' before running the installer, run `winecfg`. Go to the Libraries tab and type `winemenubuilder.exe` into the "New overrides" box (it is not in the dropdown list). Click add, then select it from the "Existing overrides" box. Click "Edit" and select "Disable" from the list, then click "Apply".
You might also need <tt>winepath</tt> to translate the filename from Windows format to Linux format (see [[#How do I associate a native program with a file type in Wine?|How do I associate a native program with a file type in Wine?]]).
* ''Registry file:'' If you need to apply the setting many times (e.g. every time you recreate the Wine prefix), this approach may be more convenient. Create a text file named with extension .reg (e.g., `disable-winemenubuilder.reg`) containing the following:
 
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"winemenubuilder.exe"=""
To apply the setting, run:
 
regedit disable-winemenubuilder.reg
* ''Environment variable:'' set the `WINEDLLOVERRIDES` environment variable when you run the installer, e.g.,
 
WINEDLLOVERRIDES=winemenubuilder.exe=d wine setup.exe
Users who frequently create new wineprefixes may wish to put WINEDLLOVERRIDES=winemenubuilder.exe=d in their .bashrc to avoid having to specify it for every wineprefix.
 
Disabling ``winemenubuilder.exe`` will cause wine to sometimes print error messages in the console. These messages are harmless, but users who dislike them can eliminate them by replacing winemenubuilder.exe with the do-nothing program. Compile the following with MinGW's gcc under wine and place the executable at `C:\Windows\System32\winemenubuilder.exe`:
 
int main() { /* Do nothing */ return 0; }
Then follow the same procedure as above, but set `winemenubuilder.exe` to "native" instead of "disable" in `winecfg`, or use the following registry file:
 
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"winemenubuilder.exe"="native"
or environment variable:
WINEDLLOVERRIDES=winemenubuilder.exe=n wine setup.exe
 
=== How do I install/run a MSI file? ===
MSI files cannot be run directly, you need to use the <tt>msiexec</tt> program. MSI files can be installed in Wine from the terminal like this:
 
wine msiexec /i whatever.msi
Alternatively:
 
wine start whatever.msi
That will then run the MSI program the same as if you had double-clicked it in Windows.
 
=== How do I install/run a ClickOnce (.application) file? ===
Use winetricks to install whatever version of .NET the program requires, cd to the directory containing the .application file, and run it with
 
wine start whatever.application
(use the actual name of the file)
 
=== Can I use Wine to install drivers for my hardware? ===
No. Wine requires your hardware to already be working on your operating system. The technical reason for this is that Wine, like most applications, runs in user mode and not [http://en.wikipedia.org/wiki/Kernel_mode kernel mode].


=== My installer tells me I don't have enough free disk space ===
=== My installer tells me I don't have enough free disk space ===
Usually, you really don't have enough free disk space. Wine's C: drive is located in your home directory. Whatever partition contains `/home` must have enough free space for your program. You can check by running:
Usually, you really don't have enough free disk space. Wine's C: drive is located in your home directory. Whatever partition contains <tt>/home</tt> must have enough free space for your program. You can check by running:


  df -h ~  
  df -h ~  
If the amount of space you need is less than 1 GB, and `df` reports you have more than 1 GB available, try setting the Windows version to Windows 98. This will work around bugs in some old (Windows 98 era) installers that could not cope with large drives.
If the amount of space you need is less than 1 GB, and <tt>df</tt> reports you have more than 1 GB available, try setting the Windows version to Windows 98. This will work around bugs in some old (Windows 98 era) installers that could not cope with large drives.


If you want to use a different partition that has more free space, use a wineprefix that is located on the other partition. Note that your other partition must be a Unix filesystem; FAT and NTFS partitions will not work. See [[#run_programs_different_computers|How can I run two programs as if they were on different computers]] for instructions.
If you want to use a different partition that has more free space, use a wineprefix that is located on the other partition. Note that your other partition must be a Unix filesystem: FAT and NTFS partitions will not work. See [[#How can I run two programs as if they were on different computers?]] for instructions.


=== The application's CD or DVD looks empty or is missing some files! ===
=== When I double-click on a <tt>.exe</tt> file in my file manager, nothing happens ===
Some discs are poorly mastered in a way that affects only Unix-based operating systems.
Note: if you can, start applications by clicking on the application's icon in the Applications / Wine menu or desktop instead. Double-clicking <tt>.exe</tt> files is typically only needed for applications that aren't installed yet, e.g. to run the <tt>setup.exe</tt> on a CD-ROM game or a downloaded installer.


You may need to use the "unhide" or "norock" mount options for these discs.
If double-clicking doesn't work, you might need to right-click the file and choose "Run with Wine". It depends on your file manager. If that also doesn't work, contact whoever built your Wine packages and let them know there's a problem.
 
Run `mount` once to see where the disc is mounted, then mount it again in the same place with the needed option (and the "remount" option). Some assembly required.
 
Examples:
 
sudo mount -o remount,unhide /dev/sr0 /mnt/cdrom
or


sudo mount -t iso9660 -o ro,unhide /dev/cdrom /media/cdrom0
You can work around this by using the command line instead of your file manager (see [[Wine User's Guide#How to run Windows programs from the command line]]).
See also your operating system's documentation, e.g. https://help.ubuntu.com/community/Mount or http://manpages.ubuntu.com/manpages/natty/man8/mount.8.html
 
== Running applications ==
<div id="run_program"></div>
 
=== How do I run an application once I've installed it? ===
After you install an application with Wine, it will probably have an entry in the your computer's Applications->Wine->Programs menu, and/or an icon on the desktop, just as it would under Windows. You should be able to use them just as you would on Windows.
 
Alternately, browse to the `.wine/drive_c/Program Files` folder in your home directory (it is hidden, so you might need to do View->Show Hidden Files in your file manager), look for the application's main .exe file (you may have to guess), and double-click it.
 
Or, if all else fails, open a terminal window, and navigate down to the application's directory. For example:
 
cd ~/.wine/drive_c/Program\ Files
ls
Adobe Microsoft FluffyBunny
cd FluffyBunny
Then look for the application's main .exe file (you may have to guess), and run it using the `wine` command:
 
ls *.exe
fluff.exe uninstall.exe ereg.exe
wine fluff.exe


=== I double-clicked on an .exe file, but the system said "The file foo.exe is not marked as executable..." ===
=== I double-clicked on an .exe file, but the system said "The file foo.exe is not marked as executable..." ===
Line 344: Line 257:
If the file is on your hard drive, right-click it, choose Properties / Permissions, and check "Allow executing file as program".
If the file is on your hard drive, right-click it, choose Properties / Permissions, and check "Allow executing file as program".


If the file is on a CD-ROM, you can run it from the command line as described above. Or, if you know how to use `mount`, remount the cd-rom to mark all files as executable with a command like `mount -o remount,mode=0777,exec /media/cdrom` but using the real mount point if it's different from `/media/cdrom`.
If the file is on a CD-ROM, you can run it from the command line as described above. Or, if you know how to use <tt>mount</tt>, remount the cd-rom to mark all files as executable with a command like <code>mount -o remount,mode=0777,exec /media/cdrom</code> but using the real mount point if it's different from <tt>/media/cdrom</tt>.


=== How do I pass command line arguments to a program? ===
== Using Wine ==
If you're using a program with switches on Windows, for instance:
=== How do I run Wine? ===
Wine is not an application you run. Wine enables your computer to run Windows applications. Simply install and run your applications as you would in Windows. See [[#How do I run an installer using Wine?]].
=== Should I run Wine as root? ===
{{warning}} <span style="color:red">'''''NEVER run Wine as root!'''''</span> Doing so gives Windows programs (and viruses) full access to your computer and every piece of media attached to it. Running with sudo also has these same risks but with the added bonus of breaking the permissions on your <tt>~/.wine</tt> folder in the process. If you have run Wine with sudo you need to fix the permission errors as described in the next question, and then run <tt>winecfg</tt> to set Wine up again. You should always run Wine as the normal user you use to login.


quake.exe -map e1m1
For Linux systems, all ideas that Wine needs root can be solved through [http://www.linuxjournal.com/article/5737 Posix Capabilities] or [http://www.ibm.com/developerworks/linux/library/l-posixcap/index.html Posix File Capabilities] or correcting other security settings.
Then you can do the equivalent in Wine by running:


wine quake.exe -map e1m1
As far as Windows programs are concerned, you are running with administrator privileges. If an application complains about a lack of administrator privileges, file a bug; running Wine as root probably won't help.
That is, the command line is identical, except with `wine` in front. Note, however, that you may need to escape certain special characters with backslashes due to the way they're handled in the Linux shell. For instance:


quake.exe -map C:\Quake\e1m1.bsp
=== I ran wine with sudo or as root. How do I fix my permission errors? ===
Becomes:
You need to fix the permissions on your <tt>~/.wine</tt> directory, this is where all Wine state, configuration and any important data you might have such as installed programs, saved data within Wine programs, etc. are stored. Once you delete or fix the permissions on this directory, rerun Wine as a regular user always! Run the following to fix the permissions on your <tt>~/.wine</tt> directory if it now has root permissions.


  wine quake.exe -map C:\\Quake\\e1m1.bsp
  cd $HOME
For more information on using backslashes, see: http://www.tuxfiles.org/linuxhelp/weirdchars.html
sudo chown -R $USER:$USER .wine


<div id="run_from_terminal"></div>
=== How do I know what version of Wine I have? ===
Open up a terminal and run <code>wine --version</code>. It will say something like "wine-1.9.2"; if you are using [[Git Wine Tutorial|Git]] then you will have a version along the lines of "wine-1.9.2-231-gb922b55".


=== How should I start Windows programs from the command line? ===
'''TIP:''' You can find out what the latest release of Wine is from [http://www.winehq.org WineHQ's main page]. Currently, Wine development releases come out every two weeks. Your operating system may ship with an out of date (obsolete) version of Wine. Depending on what OS you use, you may be able to add an update source to your package management system to keep up to date. Check the [[Download]] page for details.
This will allow you to see messages from Wine that may help troubleshoot problems.


Because Windows programs will often look for files in the location they were started from, when using the command line you should start them in a very specific way: "change directory" to the folder where the program is located and run the .exe file using '''only''' its filename. For example:
=== Wineprefixes ===
==== Where is my C: drive? ====
Wine uses a virtual C: drive instead of your real C: drive. The directory in which this is located is called a 'wineprefix.'


cd '.wine/drive_c/Games/Tron'
By default, it's in your home directory's <tt>.wine/drive_c</tt> subdirectory. (On macOS, see the [[macOS FAQ]] for how to find this.)
wine tron.exe
In some cases you may wish to specify the full path to the program's .exe file. For example, if you need to install a program from multiple CDs, the previous method won't work (entering the directory in the terminal will prevent you from removing the CD). You can provide Wine with a DOS or Windows style path inside single quotes like so:


wine start 'C:\Games\Tron\tron.exe'
See also the <tt>[[Wine_User's_Guide#WINEPREFIX|WINEPREFIX]]</tt> environment variable; if this is set, wine uses it to find the wineprefix.
You need to use `wine start` if you specify a full path, because that allows Wine to set the working directory for the program if it needs it. You can also use double quotes, but you need two backslashes instead of one:


wine start "C:\\Games\\Tron\\tron.exe"
==== Can I store the virtual Windows installation somewhere other than ~/.wine? ====
If you need to use a Unix style pathname, use the /Unix option to start, e.g.
Yes: <tt>~/.wine</tt> is just the default wineprefix (a.k.a. "configuration directory" or "bottle").


wine start /Unix "$HOME/installers/TronSetup.exe"
You can change which prefix Wine uses by changing the <tt>WINEPREFIX</tt> environment variable (outside Wine). To do this, run something like the following in a terminal:
For current Wine, once a program is installed, you can safely use any shortcuts that the installer has created.
 
=== When I double-click on a .exe file in my file manager, nothing happens. ===
Note: if you can, start applications by clicking on the application's icon in the Applications / Wine menu or desktop instead. Double-clicking `.exe` files is typically only needed for applications that aren't installed yet, e.g. to run the `setup.exe` on a CD-ROM game or a downloaded installer.
 
If double-clicking doesn't work, you might need to right-click the file and choose "Run with Wine". It depends on your file manager. If that also doesn't work, contact whoever built your Wine packages and let them know there's a problem.
 
You can work around this by using the command line instead of your file manager (see previous question). If you see a line like:
 
err:module:import_dll Library MFC42.DLL (which is needed by L"C:\\Program Files\\Yoyodyne\\Overthruster.DLL") not found
it means you need to [[#missing_dll|install a missing runtime library]].
 
== Using Wine ==
 
<div id="wineprefix"></div>
 
=== Can I store the virtual Windows installation somewhere other than ~/.wine? ===
Yes: `~/.wine` is just the default wineprefix (a.k.a. "configuration directory" or "bottle").
 
You can change which prefix Wine uses by changing the `WINEPREFIX` environment variable (outside Wine). To do this, run something like the following in a terminal:


  export WINEPREFIX=~/.wine-new
  export WINEPREFIX=~/.wine-new
  wine winecfg  
  wine winecfg  
Wine will then create a new prefix in `~/.wine-new`.
Wine will then create a new prefix in <tt>~/.wine-new</tt>.


To use the default prefix, use the command `unset WINEPREFIX` . Or just set `WINEPREFIX` to `~/.wine`.
To use the default prefix, use the command <code>unset WINEPREFIX</code> . Or just set <tt>WINEPREFIX</tt> to <tt>~/.wine</tt>.


Alternatively, you can specify the wine prefix in each command, e.g.
Alternatively, you can specify the wine prefix in each command, e.g.


  WINEPREFIX=/path/to/wineprefix wine winecfg  
  WINEPREFIX=''path_to_wineprefix'' wine winecfg  
You can rename, move, copy and delete prefixes without affecting others, and each prefix has its own `wineserver` instance.
You can rename, move, copy and delete prefixes without affecting others, and each prefix has its own <tt>wineserver</tt> instance.
 
Wherever you see <tt>~/.wine</tt> or <tt>$HOME/.wine</tt> in this Wiki, you can usually replace it with <tt>$WINEPREFIX</tt>.


Wherever you see "`~/.wine`" or "`$HOME/.wine`" in this Wiki, you can usually replace it with "`$WINEPREFIX`".
==== How do I create a 32 bit wineprefix on a 64 bit system? ====
At present there are some significant [http://bugs.winehq.org/buglist.cgi?keywords=win64&resolution=--- bugs] that prevent many 32 bit applications from working in a 64 bit wineprefix. To work around this, you can create a new 32 bit wineprefix using the <tt>WINEARCH</tt> environment variable. In a terminal, type:


<div id="wineprefix"></div>
WINEARCH=win32 WINEPREFIX=''path_to_wineprefix'' winecfg
(use the actual path to the wineprefix) Do '''not''' use an existing directory for the new wineprefix: Wine must create it.


=== <div id="32_bit_wineprefix"></div>How do I create a 32 bit wineprefix on a 64 bit system? ===
Once a 32 bit wineprefix is created, you no longer have to specify <tt>WINEARCH</tt> in the command line to use it, as the architecture of an existing wineprefix cannot be changed. Note that if the wineprefix is not the default (<tt>~/.wine</tt>, you '''do''' have to specify the <tt>WINEPREFIX</tt> variable when installing anything (including winetricks) to it:
At present there are some significant [http://bugs.winehq.org/buglist.cgi?keywords=win64&resolution=--- bugs] that prevent many 32 bit applications from working in a 64 bit wineprefix. To work around this, you can create a new 32 bit wineprefix using the `WINEARCH` environment variable. In a terminal, type:
WINEPREFIX=''path_to_wineprefix'' wine start /unix ''path_to_installer''


WINEARCH=win32 WINEPREFIX=/path/to/wineprefix winecfg
==== Why aren't versions of Windows prior to XP available in 64 bit wineprefixes? ====
(use the actual path to the wineprefix), then install your 32 bit application(s) to that wineprefix.
Short answer: because there were no 64 bit versions of Windows prior to XP.  


Do not manually create the directory before running that command; Wine must create it. `WINEARCH` only needs to be set when creating the wineprefix, and the architecture of an existing wineprefix cannot be changed.
If you are on a 64 bit system, you will have to [[FAQ#How_do_I_create_a_32_bit_wineprefix_on_a_64_bit_system?|create a 32 bit wineprefix]] to be able to select a version of Windows older than XP in winecfg.  


=== How can I run two programs as if they were on different computers? ===
==== How can I run two programs as if they were on different computers? ====
Example: You have server and client programs. One won't run in the presence of the other.
Example: You have server and client programs. One won't run in the presence of the other.


Using different Wine prefixes will help you here, since they simulate two Windows computers, in essence.
Using different wineprefixes will help you here, since they simulate two Windows computers, in essence.


Run the first program as normal:
Run the first program as normal:


  wine first-program.exe  
  wine ''first-program.exe''
The second needs to be run in a different prefix, so we need to change the `WINEPREFIX` environment variable:
The second needs to be run in a different prefix, so we need to change the <tt>WINEPREFIX</tt> environment variable:
 
WINEPREFIX="$HOME/.wine-second" wine ''second-program.exe''
The ''first-program.exe'' and ''second-program.exe'' can be two copies of the same program.
 
=== Configuring ===
==== How do I get Wine to launch an application in a virtual desktop? ====
You can do this with [[winecfg]]. Add the application in the Applications tab and then, in the Graphics tab, enable "Emulate a virtual desktop".


WINEPREFIX="$HOME/.wine-second" wine second-program.exe
You can also use the following command:
The `first-program.exe` and `second-program.exe` can be two copies of the same program.


=== How do I launch native applications from a Windows application? ===
wine explorer /desktop=''name'',1024x768 ''program.exe''
You can start native applications directly from Wine only if you specify the full path or use the shell:
Replace ''program.exe'' with the name of your program, and change the resolution to the size of the virtual desktop you want. Changing ''name'' allows you to open several desktops simultaneously.


/usr/bin/glxgears
==== How do I edit the Wine registry? ====
or
The Wine registry is stored in the <tt>.reg</tt> files in <tt>~/.wine</tt>, however you should not edit these files by hand due to the encoding that they use. Always use the <tt>regedit</tt> program that comes with Wine. This can be run by typing <code>wine regedit</code> in the terminal. Wine's regedit is virtually identical to the Windows version of regedit and also supports importing and exporting of registry files. NEVER try and import your entire Windows registry, this will just break Wine.


/bin/sh -c glxgears
See also: [[Useful Registry Keys]]
You might also need <tt>winepath</tt> to translate the filename from Windows format to Linux format (see next question).


=== How do I associate a native program with a file type in Wine? ===
==== How do I associate a native program with a file type in Wine? ====
There are two ways using which you can associate a native program with a file type. The first method is to use `winebrowser` and an alternative would be to write a shell script.
There are two ways using which you can associate a native program with a file type. The first method is to use <tt>winebrowser</tt> and an alternative would be to write a shell script.


The example below uses `winebrowser` to launch the default PDF handler on your system (on a Unix desktop it uses `xdg-open`). Save the lines below to a file `pdf.reg`.
The example below uses <tt>winebrowser</tt> to launch the default PDF handler on your system (on a Unix desktop it uses <tt>xdg-open</tt>). Save the lines below to a file <tt>pdf.reg</tt>.


  [HKEY_CLASSES_ROOT\.pdf]
  [HKEY_CLASSES_ROOT\.pdf]
Line 455: Line 357:
  [HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
  [HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
  @="winebrowser \"%1\""  
  @="winebrowser \"%1\""  
Import the `.reg` file into the registry using the command
Import the <tt>.reg</tt> file into the registry using the command


  regedit $HOME/pdf.reg  
  regedit $HOME/pdf.reg  
Another option is to use a shell script to call a native application. Save it as `run_linux_program` under `$HOME/bin`:
Another option is to use a shell script to call a native application. Save it as <tt>run_linux_program</tt> under <tt>$HOME/bin</tt>:


  #!/bin/sh $1 "`wine winepath -u "$2"`"  
  #!/bin/sh $1 "`wine winepath -u "$2"`"  
Don't forget to run `chmod a+x $HOME/bin/run_linux_program` to make it executable. Also make sure that `$HOME/bin` directory is in your `$PATH`. Otherwise it will not work.
Don't forget to run <code>chmod a+x $HOME/bin/run_linux_program</code> to make it executable. Also make sure that <tt>$HOME/bin</tt> directory is in your <tt>$PATH</tt>. Otherwise it will not work.


To associate (say) .pdf files with the `acroread` Linux program save the following as `$HOME/pdf.reg` and then import it with the command <tt>regedit $HOME/pdf.reg</tt>:
To associate (say) .pdf files with the <tt>acroread</tt> Linux program save the following as <tt>$HOME/pdf.reg</tt> and then import it with the command <code>regedit $HOME/pdf.reg</code>:


  [HKEY_CLASSES_ROOT\.pdf]
  [HKEY_CLASSES_ROOT\.pdf]
Line 470: Line 372:
  [HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
  [HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
  @="/bin/sh run_linux_program acroread \"%1\""  
  @="/bin/sh run_linux_program acroread \"%1\""  
You can reuse this script and just edit the registry file. For example to associate .doc documents with !OpenOffice (`ooffice`):
You can reuse this script and just edit the registry file. For example to associate .doc documents with OpenOffice (<tt>ooffice</tt>):


  [HKEY_CLASSES_ROOT\.doc]
  [HKEY_CLASSES_ROOT\.doc]
Line 477: Line 379:
  [HKEY_CLASSES_ROOT\DOCfile\Shell\Open\command]
  [HKEY_CLASSES_ROOT\DOCfile\Shell\Open\command]
  @="/bin/sh run_linux_program ooffice \"%1\""  
  @="/bin/sh run_linux_program ooffice \"%1\""  
<div id="winetricks"></div>


=== What is this "winetricks" thing? Where do I get it? ===
==== How can I prevent Wine from changing the filetype associations on my system or adding unwanted menu entries/desktop links? ====
Winetricks is a shell script that downloads missing DLLs and fonts for you from the best known source. It was written to help Wine developers, but it turned out to be useful for end users, too. See the [[winetricks|wiki page about winetricks]] for more info.
{{info}} Beginning with wine-3.14, winecfg has a "Manage File Associations" checkbox on the Desktop Integration tab. Checking it enables winemenbuilder to create file associations and unchecking it disables that behavior.  


<div id="install_ie"></div>
Users of older Wine versions and those who also want to disable the creation of menu items can accomplish this by disabling <tt>winemenubuilder.exe</tt> . There are several ways to do this:


=== How do I install Internet Explorer in Wine? ===
* ''In winecfg:'' before running the installer, run <tt>winecfg</tt>. Go to the Libraries tab and type <tt>winemenubuilder.exe</tt> into the "New overrides" box (it is not in the dropdown list). Click add, then select it from the "Existing overrides" box. Click "Edit" and select "Disable" from the list, then click "OK".
If you just want an application to think you have IE installed, see [[#ie_needed|My application won't run, and says it needs Internet Explorer]] above.
* ''Registry file:'' If you need to apply the setting many times (e.g. every time you recreate the Wine prefix), this approach may be more convenient. Create a text file named with extension .reg (e.g., <tt>disable-winemenubuilder.reg</tt>) containing the following:
 
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"winemenubuilder.exe"=""
To apply the setting, run:


The Wine project does not support installing the real Internet Explorer, as it requires a huge number of native DLLs, which is hard to configure.
regedit disable-winemenubuilder.reg
* ''Environment variable:'' set the <tt>WINEDLLOVERRIDES</tt> environment variable when you run the installer, e.g.,


If you really need the real IE use <tt>winetricks</tt>. Set your fake Windows version to win2k and then select "ie6" or "ie7". IE installed from winetricks is far from fully functional, but works well enough e.g. to test web page rendering. Please do not ask the Wine project for help if you run into problems.
WINEDLLOVERRIDES=winemenubuilder.exe=d wine setup.exe
Users who frequently create new wineprefixes may wish to put <code>WINEDLLOVERRIDES=winemenubuilder.exe=d</code> in their .bashrc to avoid having to specify it for every wineprefix.


You should put IE in a [[#wineprefix|separate wineprefix]], with whatever app really needs it.
==== How do I disable the GUI crash dialog? ====
Wine includes a GUI crash dialog that is turned on by default. Users of apps that work despite a background crash may find the GUI dialog annoying, and in some cases the dialog itself has been reported to prevent an app from working.


You may also try commercial solutions, such as [http://www.codeweavers.com CrossOver] and [http://bordeauxgroup.com/ Bordeaux], but if you do so and run into problems, do not seek help on the forum/mailing list or IRC, as third party applications such as these are not supported here.
The easiest way to disable the crash dialog is with [[winetricks]]:


=== How do I get Wine to launch an application in a virtual desktop? ===
sh winetricks nocrashdialog
You can do this with ["winecfg"]. Add the application in the Applications tab and then, in the Graphics tab, enable "Emulate a virtual desktop".
If you prefer to do it manually, copy the following key to a text editor:


You can also use the following command (for wine-0.9.60 and older, this is the only method available):
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
"ShowCrashDialog"=dword:00000000
Save the file with a .reg extension (e.g. <tt>crashdialog.reg</tt>), then apply it with regedit:


  wine explorer /desktop=name,1024x768 program.exe
  regedit crashdialog.reg
Replace `program.exe` with the name of your program, and change the resolution to the size of the virtual desktop you want. Changing `name` allows you to open several desktops simultaneously.
(You may need to specify the full path to the file, depending on where you saved it.)


=== Can Wine run in character mode? ===
To turn the GUI crash dialog back on, change 00000000 to 00000001 and reapply.
Most of Wine's development effort is geared towards programs written for the Windows GUI, but some limited support for character mode is available with the "null" driver. Wine automatically activates "null" whenever x11driver isn't loaded, but even then, Wine depends on the xorg libraries.


Also the "null" driver will only work for ''pure'' console applications that never use any windowing functions (for example, parts of OLE create purely internal windows).
These changes can also be made by simply running <tt>regedit</tt> and adding/changing the appropriate key the point-and-click way.


=== How do I know what version of Wine I have? ===
==== How can I make Wine fonts anti-aliased? ====
Open up a terminal and run <tt>wine --version</tt>. It will say something like "wine-1.9.1"; if you are using [[GitWine|Git]] then you will have a version along the lines of "wine-1.5.2-227-gcfa52d7".
Support for subpixel font rendering was added to Wine in version 1.1.12, but it may not be enabled. Use <tt>winetricks</tt> and select one of the fontsmooth-gray, fontsmooth-rgb or fontsmooth-bgr options.


'''TIP:''' You can find out what the latest release of Wine is from [http://www.winehq.org WineHQ's main page]. Currently, Wine development releases come out every two weeks. Your operating system may ship with an out of date (obsolete) version of Wine. Depending on what OS you use, you may be able to add an update source to your package management system to keep up to date. Check the [http://www.winehq.org/download downloads] page for details.
==== How do I change the DPI (font size)? ====
First, you should try editing with <tt>winecfg</tt>. Go to the Graphics tab, and slide the "Screen Resolution" slider accordingly. Changes will not effect the winecfg window until you restart it.


=== How does the Wine version numbering system work? ===
If windows and fonts are so big you can't get to the controls in winecfg, see [[#Wine's windows and fonts are extremely large]].
Each version of Wine has a release tag, in the following format:


. wine-''x''.''y''.''z''
==== How do I configure a proxy? ====
This represents Wine version ''x''.''y''.''z''. (For a list of tags, see [http://source.winehq.org/git/wine.git/?a=tags here].)
If you want to use a proxy server for all HTTP connections, simply set the <tt>http_proxy</tt> environment variable. On many Linux distributions, configuring a network proxy, e.g. with the Network Proxy tool, does this for you automatically.


* ''x'' is the major version number. This has changed precisely once since the current version numbering system was introduced, and is unlikely to change for a while.
Alternatively, you can configure a proxy in the registry. There are separate locations for wininet.dll and winhttp.dll.
* ''y'' is the minor version number. This changes every few years. If ''y'' is even, then this is a "stable" version: later releases are unlikely to break much. If ''y'' is odd, then this is a "development" version: later releases may cause [:regression:regressions].
* ''z'' is the release number. For development releases, this is incremented every two weeks. For stable releases, this is incremented every few months.
If you are using [:GitWine:git], the tag will be generated by the `git-describe` command, and looks like:


. wine-''x''.''y''.''z''-''n''-g''ccccccc''
For wininet, use <tt>regedit</tt> to add the following values to the <tt>[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]</tt> key:
Where ''n'' is the number of patches/commits applied since ''x''.''y''.''z'' was released, and ''ccccccc'' is the first few hex digits of the most recent commit id. Examples: wine-1.1.19-228-g1e256e4, wine-1.1.25-311-g3d6bb38, wine-1.1.32-584-g10b0b86.


Just before a stable release of Wine, there are so-called "release candidates", which have tags of the form:
"ProxyEnable"=dword:00000001
"ProxyServer"="proxy-server-address:port"  
At present, Wine's <tt>wininet.dll</tt> does not support proxy autoconfiguration (PAC) scripts.


. wine-''x''.''y''-rc''n''
For winhttp, you'll need to use the <tt>proxycfg.exe</tt> utility to configure the registry. This utility is available in the system32 directory of a Windows installation, and MSDN describes its usage.
Which is the ''n''th release candidate for Wine ''x''.''y''.


Examples:
== Limitations and Risks ==
||<style="text-align:center;">'''Release tag''' ||<style="text-align:center;">'''Date''' ||<style="text-align:center;">'''Note''' ||
=== Can Wine run in character mode? ===
||wine-0.9.60 ||<style="text-align:right;">18 Apr 2008 || ||
Most of Wine's development effort is geared towards programs written for the Windows GUI, but some limited support for character mode is available with the "null" driver. Wine automatically activates "null" whenever x11driver isn't loaded, but even then, Wine depends on the xorg libraries.
||wine-0.9.61 ||<style="text-align:right;"> 2 May 2008 ||Last beta ||
||wine-1.0-rc1 ||<style="text-align:right;"> 9 May 2008 ||First release candidate ||
||wine-1.0-rc2 ||<style="text-align:right;">23 May 2008 || ||
||wine-1.0-rc3 ||<style="text-align:right;">30 May 2008 || ||
||wine-1.0-rc4 ||<style="text-align:right;"> 6 Jun 2008 || ||
||wine-1.0-rc5 ||<style="text-align:right;">13 Jun 2008 || ||
||wine-1.0 ||<style="text-align:right;">17 Jun 2008 ||First "stable" version ||
||wine-1.1.0 ||<style="text-align:right;">27 Jun 2008 ||First "development" version ||
||wine-1.1.1 ||<style="text-align:right;">11 Jul 2008 || ||
||wine-1.1.2 ||<style="text-align:right;">25 Jul 2008 || ||
||wine-1.2 ||<style="text-align:right;">16 Jul 2010 ||Second "stable" version ||
||... || || ||


<div id="run_as_root"></div>
Also the "null" driver will only work for ''pure'' console applications that never use any windowing functions (for example, parts of OLE create purely internal windows).


=== Should I run Wine as root? ===
See [[Wine User's Guide#Text mode programs (CUI: Console User Interface)]] for more information.
'''''NEVER run Wine as root!''''' Doing so gives Windows programs (and viruses) full access to your computer and every piece of media attached to it. Running with sudo also has these same risks but with the added bonus of breaking the permissions on your `~/.wine` folder in the process. If you have run Wine with sudo you need to fix the permission errors as described in the next question, and then run <tt>winecfg</tt> to set Wine up again. You should always run Wine as the normal user you use to login.


For Linux systems, all ideas that Wine needs root can be solved through [http://www.linuxjournal.com/article/5737 Posix Capabilities] or [http://www.ibm.com/developerworks/linux/library/l-posixcap/index.html Posix File Capabilities] or correcting other security settings.
=== Can I install applications to be shared by multiple users? ===
Wine does not currently allow sharing its configuration ("prefixes") between users, due to the risk of registry corruption from running multiple wineservers simultaneously [https://bugs.winehq.org/show_bug.cgi?id=11112 bug #11112]. At present, applications must be installed separately for each user.


As far as Windows programs are concerned, you are running with administrator privileges. If an application complains about a lack of administrator privileges, file a bug; running Wine as root probably won't help.
However, you can copy Wine prefixes; you can install everything to one prefix, then make a copy of it in each user's home directory. This saves running installers repeatedly.


=== I ran wine with sudo or as root. How do I fix my permission errors? ===
=== Can I use Wine to install drivers for my hardware? ===
You need to fix the permissions on your `~/.wine` directory, this is where all Wine state, configuration and any important data you might have such as installed programs, saved data within Wine programs, etc. are stored. Once you delete or fix the permissions on this directory, rerun Wine as a regular user always! Run the following to fix the permissions on your `~/.wine` directory if it now has root permissions.
No. Wine requires your hardware to already be working on your operating system. The technical reason for this is that Wine, like most applications, runs in user mode and not [http://en.wikipedia.org/wiki/Kernel_mode kernel mode].


cd $HOME
=== Is Wine malware-compatible? ===
sudo chown -R $USER:$USER .wine
Yes. Just because Wine runs on a non-Windows OS doesn't mean you're protected from viruses, trojans, and other forms of malware.


=== How can I make Wine fonts anti-aliased? ===
There are several things you can do to protect yourself:
Support for subpixel font rendering was added to Wine in version 1.1.12, but it may not be enabled. Use <tt>winetricks</tt> and select one of the fontsmooth-gray, fontsmooth-rgb or fontsmooth-bgr options.


=== How do I change the DPI (font size)? ===
* Never run executables from sites you don't trust. [http://www.winehq.org/pipermail/wine-devel/2007-January/053719.html Infections have already happened.]
First, you should try editing with <tt>winecfg</tt>. Go to the Graphics tab, and slide the "Screen Resolution" slider accordingly. Changes will not effect the winecfg window until you restart it.
* In web browsers and mail clients, be suspicious of links to URLs you don't understand and trust.
* Never run any application (including Wine applications) as root (see [[#Should I run Wine as root?|above]]).
* Use a virus scanner, e.g. [http://www.clamav.org ClamAV] is a free virus scanner you might consider using if you are worried about an infection; see also [https://help.ubuntu.com/community/ClamAV Ubuntu's notes on how to use ClamAV]. No virus scanner is 100% effective, though.
* Removing the default Wine Z: drive, which maps to the unix root directory, is a weak defense. It will not prevent Windows applications from reading your entire filesystem, and '''will prevent you from running Windows applications that aren't reachable from a Wine drive (like C: or D:)'''. A workaround is to copy/move/symlink downloaded installers to <tt>~/.wine/drive_c</tt> before you can run them.
* If you're running applications that you suspect to be infected, run them as their own Linux user or in a virtual machine (the ZeroWine malware analyzer works this way).


If windows and fonts are so big you can't get to the controls in winecfg, see [[#large_win_fonts|Wine's windows and fonts are extremely large, and the winecfg window doesn't fit on the screen]].
=== How good is Wine at sandboxing Windows apps? ===
'''Wine does not sandbox in any way at all.''' When run under Wine, a Windows app can do anything your user can. Wine does not (and cannot) stop a Windows app directly making native syscalls, messing with your files, altering your startup scripts, or doing other nasty things.


=== How do I edit the Wine registry? ===
You need to use AppArmor, SELinux or some type of virtual machine if you want to properly sandbox Windows apps.
The Wine registry is stored in the `.reg` files in `~/.wine`, however you should not edit these files by hand due to the encoding that they use. Always use the <tt>regedit</tt> program that comes with Wine. This can be run by typing <tt>wine regedit</tt> in the terminal. Wine's regedit is virtually identical to the Windows version of regedit and also supports importing and exporting of registry files. NEVER try and import your entire Windows registry, this will just break Wine.


See also: [[UsefulRegistryKeys]]
Note that the [[winetricks]] <tt>sandbox</tt> verb merely removes the desktop integration and Z: drive symlinks and is not a true sandbox. It protects against errors rather than malice. It's useful for, e.g., keeping games from saving their settings in random subdirectories of your home directory.


=== How do I configure a proxy? ===
== Applications ==
If you want to use a proxy server for all HTTP connections, simply set the `http_proxy` environment variable. On many Linux distributions, configuring a network proxy, e.g. with the Network Proxy tool, does this for you automatically.
=== What applications/services conflict with Wine? ===
Many distributions are moving towards enabling Compiz/Beryl/other eye candy by default. The problem is that these programs conflict with Wine over the display driver. Disable these programs before using any applications with Wine (especially games, or when noticing weird window problems). Also, disabling the Composite extension in <tt>/etc/X11/xorg.conf</tt> will most certainly prevent compositing from affecting Wine.


Alternatively, you can configure a proxy in the registry. There are separate locations for wininet.dll and winhttp.dll.
Keyboard tools such as IBUS, <tt>xneur</tt> (<tt>gxneur</tt>, <tt>kxneur</tt>) and SCIM have been reported to conflict with keyboard input in Wine.


For wininet, use <tt>regedit</tt> to add the following values to the `[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]` key:
=== Does Wine support .NET? Should I install native .NET in Wine? ===
Recent versions of Wine will prompt you to download [[Mono|wine-mono]] on wineprefix creation. For many .NET apps, particularly older ones, this is sufficient.


"ProxyEnable"=dword:00000001 "ProxyServer"="proxy-server-address:port"
If wine-mono does not work for your app/game, file a bug (if one has not been already filed), and try native .NET. You can install it by running [[winetricks]] and selecting the appropriate .NET version. Note that native .NET can at present only be installed to a 32 bit wineprefix, so if your app/game is 64 bit, you are out of luck for now.
At present, Wine's `wininet.dll` does not support proxy autoconfiguration (PAC) scripts.


For winhttp, you'll need to use the <tt>proxycfg.exe</tt> utility to configure the registry. This utility is available in the system32 directory of a Windows installation, and MSDN describes its usage.
=== Does Wine support DirectX? Should I install Microsoft's DirectX under Wine? ===
Wine itself provides a DirectX implementation that, although it has a few bugs left, should run fine. Wine supports DirectX 9.0c at this time. Work on DirectX 10 is underway.


=== What applications/services conflict with Wine? ===
'''If you attempt to install Microsoft's DirectX, you will run into problems.''' It is not recommended nor supported by Wine HQ to attempt this. You can install the runtime, but it will not run. The runtime needs access to the Windows drivers, and Wine cannot access them for obvious reasons. The only native Microsoft DLLs that could be useful anyway are the <tt>d3dx9_xx.dll</tt> type ones, and these require you to accept Microsoft's license. Additionally, versions of these DLLs are now part of the Wine tree. So, as Wine improves these DLLs will only become less relevant.
Many distributions are moving towards enabling Compiz/Beryl/other eye candy by default. The problem is that these programs conflict with Wine over the display driver. Disable these programs before using any applications with Wine (especially games, or when noticing weird window problems). Also, disabling the Composite extension in `/etc/X11/xorg.conf` will most certainly prevent compositing from affecting Wine.


Keyboard tools such as IBUS, xneur (gxneur, kxneur) and SCIM have been reported to conflict with keyboard input in Wine.
That said, there are some guides out there which describe how you can install Microsoft's DirectX. We reiterate: it is not recommended nor supported by Wine HQ to attempt this. Furthermore it is considered off topic in Wine HQ support mediums (such as the forums). Please use a clean Wine configuration folder before seeking help (delete your <tt>~/.wine</tt> or use another [[#wineprefix|wineprefix]] and re-install your Windows applications).


== Applications ==
=== Does Wine support Internet Explorer? Should I install Microsoft's Internet Explorer in Wine? ===
=== Does Wine support DirectX? Can I install Microsoft's DirectX under Wine? ===
Wine uses the core of Firefox to implement its own Internet Explorer replacement (wine-gecko). Recent versions of Wine should prompt you to install it on wineprefix creation. In most cases Wine's IE replacement (wine-gecko) is sufficient.  
Wine itself provides a DirectX implementation that, although it has a few bugs left, should run fine. Wine supports DirectX 9.0c at this time. Plans for DirectX 10 are underway.


'''If you attempt to install Microsoft's DirectX, you will run into problems.''' It is not recommended nor supported by Wine HQ to attempt this. You can install the runtime, but it will not run. The runtime needs access to the Windows drivers, and Wine cannot access them for obvious reasons. The only native Microsoft DLLs that could be useful anyway are the `d3dx9_xx.dll` type ones, and these require you to accept Microsoft's license. Additionally, versions of these DLLs are now part of the Wine tree. So, as Wine improves these DLLs will only become less relevant.
If you really need the real IE for a specific application to work, use <tt>[[winetricks]]</tt> to install ie6, ie7 or ie8. You should put IE in a [[#Can_I_store_the_virtual_Windows_installation_somewhere_other_than_.7E.2F.wine.3F|separate wineprefix]], with whatever app really needs it. Note that the Wine project does not support installing the real Internet Explorer, as it requires a huge number of native DLLs, which is hard to configure. Please do not ask the Wine project for help if you run into problems.


That said, there are some guides out there which describe how you can install Microsoft's DirectX. We reiterate: it is not recommended nor supported by Wine HQ to attempt this. Furthermore it is considered off topic in Wine HQ support mediums (such as the forums). Please use a clean Wine configuration folder before seeking help (delete your `~/.wine` or use another [[#wineprefix|wineprefix]] and re-install your Windows applications).
You may also try commercial solutions, such as [http://www.codeweavers.com CrossOver], but if you do so and run into problems, do not seek help on the forum/mailing list or IRC, as third party applications such as these are not supported here.


=== How come Wine doesn't work well with copy protection? ===
=== Why doesn't Wine work well with some copy protection? ===
Copy protection uses several "dirty" methods to detect if discs are "real" or not. Some of these methods work in Wine but most do not, such as the extremely invasive StarForce system. Wine would need to be altered to allow for almost rootkit-like functionality of programs to get some of these copy protection schemes to work, so support is likely to be a long time off if ever (some people use illegally modified or "cracked" games with the copy protection removed, but the Wine project cannot advocate that).
Copy protection uses several "dirty" methods to detect if discs are "real" or not. Some of these methods work in Wine but many do not, such as the extremely invasive StarForce system. Wine would need to be altered to allow for almost rootkit-like functionality of programs to get some of these copy protection schemes to work, so support is likely to be a long time off if ever (some people use illegally modified or "cracked" games with the copy protection removed, but the Wine project cannot advocate that).


See also our page on [[CopyProtection|copy protection]].
See also our page on [[Copy Protection|copy protection]].


=== I followed a howto I found on a website, and the application still doesn't work. ===
=== I followed a howto I found on a website, and the application still doesn't work ===
There are many unofficial howtos for various apps posted on blogs and forums. They are rarely maintained by their authors, and because of Wine's rapid rate of development, even ones that were correct at the time they were posted can quickly become outdated. Applying tweaks that are no longer needed in current Wine can actually prevent an app that now runs fine without tweaks from working at all (Office 2007 is a prime example). The only howtos supported here are the ones on this site. If you insist on following an outside one, ask its author for help.
There are many unofficial howtos for various apps posted on blogs and forums. They are rarely maintained by their authors, and because of Wine's rapid rate of development, even ones that were correct at the time they were posted can quickly become outdated. Applying tweaks that are no longer needed in current Wine can actually prevent an app that now runs fine without tweaks from working at all (Office 2007 is a prime example). The only howtos supported here are the ones on this site. If you insist on following an outside one, ask its author for help.


If in doubt, start again installing the app in a fresh wineprefix and ask for help on the user forum.
If in doubt, start again installing the app in a fresh wineprefix and ask for help on the user forum.


=== I used a third party application (PlayOnLinux, WineBottler, etc.) to install or manage applications in Wine and need help. ===
=== I used a third party application (PlayOnLinux, WineBottler, etc.) to install or manage applications in Wine and need help ===
Consult the support channels for whatever third party application you used. Links to some of these outside applications are provided as a convenience on the [[ThirdPartyApplications|Third Party Applications]] page, but they are not supported here. Before seeking help on the forum/mailing list/IRC or filing bugs, reinstall your Windows application using plain Wine.
Consult the support channels for whatever third party application you used. Links to some of these outside applications are provided as a convenience on the [[Third Party Applications]] page, but they are not supported here. Before seeking help on the forum/mailing list/IRC or filing bugs, reinstall your Windows application using plain Wine.


=== My application worked with an older version of Wine, but now it's broken! ===
=== My application worked with an older version of Wine, but now it's broken! ===
This is called a regression. Please perform a [[RegressionTesting|regression test]] to identify which patch caused it, then [http://bugs.winehq.org file a bug report] and add the "regression" keyword: we'll pay special attention to it, since regressions are a lot easier to fix when caught early.
This is called a regression. Please perform a [[Regression Testing|regression test]] to identify which patch caused it, then [http://bugs.winehq.org file a bug report] and add the "regression" keyword: we'll pay special attention to it, since regressions are a lot easier to fix when caught early.


=== I really need this particular application to work. How can I go about making this happen? ===
=== I really need this particular application to work. How can I go about making this happen? ===
We're glad you asked. Please see our [:HelpingWine:Helping Wine] page for some suggestions.
Briefly, you can improve Wine yourself, convince someone else to do it for you, or try some complicated hacks involving native Windows DLLs rather than Wine's unfinished ones.
Briefly, you can improve Wine yourself, convince someone else to do it for you, or try some complicated hacks involving native Windows DLLs rather than Wine's unfinished ones.


=== I'm writing a Windows app. How can it detect if it's running under Wine? ===
=== I'm writing a Windows app. How can it detect if it's running under Wine? ===
This is a bad idea. See the [[DeveloperFaq#detect-wine|Developer FAQ]].
This is a bad idea. See the [[Developer FAQ#How can I detect Wine?|Developer FAQ]].


== Performance ==
== Performance ==
=== What are the system requirements for Wine? ===
=== My 3D application/game is very slow (FPS) ===
The rule of thumb is that if your application runs fine in Windows, it should run fine on the same system using Wine. Wine, along with the operating system you use to run it, generally requires less disk space and memory than Windows itself. If you're not currently running a Windows application, Wine won't consume any resources at all other than about 20 megabytes of disk space.
Usually a 3D performance issue, indicates that something is wrong with your OpenGL 3D drivers. See [[3D Driver Issues]] for more information.
 
=== My 3D application/game is very slow (FPS). ===
Usually a 3D performance issue, indicates that something is wrong with your OpenGL 3D drivers. See ["3DDriverIssues"] for more information.


=== Is Wine slower than just using Windows? ===
=== Is Wine slower than just using Windows? ===
Actually, Wine is sometimes faster. The speed of an application depends on a lot of factors: the available hardware and their drivers, the quality of the code in the APIs the application uses, and the quality of the code in the underlying operating system.
Actually, Wine is sometimes faster. The speed of an application depends on a lot of factors: the available hardware and their drivers, the quality of the code in the APIs the application uses, and the quality of the code in the underlying operating system.


Driver code matters a lot. If you're running a graphics-heavy application using a video card with very poor drivers such as an ATI card under Linux, performance will degrade substantially. On the other hand, Linux has superior memory management, and comes out ahead of Windows in many CPU-related tasks; see [:BenchMarks:benchmarks] for more information.
Driver code matters a lot. If you're running a graphics-heavy application using a video card with very poor drivers such as an ATI card under Linux, performance will degrade substantially. On the other hand, Linux has superior memory management, and comes out ahead of Windows in many CPU-related tasks.  


Sometimes, bugs in Wine can make applications excessively slow; see ["Performance"] and ["Performance-related bugs"].
Sometimes, bugs in Wine can make applications excessively slow. That said, Wine works on correctness first, performance second.


That said, Wine works on correctness first, performance second.
See [[Performance]] for more information.


=== I get lots of "fixme:" messages in the terminal and Wine runs a bit slow. ===
=== I get lots of "fixme:" messages in the terminal and Wine runs a bit slow ===
Ignore them. Generally speaking, a fixme message will not make much sense to someone unfamiliar with Wine development. They are for Wine [:Developers:developers]. Also, it's important to understand that fixme messages often ''do not'' indicate a serious problem. Many applications will work fine even though Wine prints a few `fixme` messages. That said, they can still sometimes provide insight into how a particular application works (or doesn't work).
Ignore them. Generally speaking, a <tt>fixme</tt> message will not make much sense to someone unfamiliar with Wine development. They are for Wine [[Developers|developers]]. Also, it's important to understand that <tt>fixme</tt> messages often ''do not'' indicate a serious problem. Many applications will work fine even though Wine prints a few <tt>fixme</tt> messages. That said, they can still sometimes provide insight into how a particular application works (or doesn't work).


(!) If there are a very large number of these messages scrolling repeatedly, you can sometimes speed Wine up a little by turning them off altogether. You can do so by setting the `WINEDEBUG` environment variable to `-all`. For example, your command line could look something like:
If there are a very large number of these messages scrolling repeatedly, you can sometimes speed Wine up a little by turning them off altogether. You can do so by setting the <tt>WINEDEBUG</tt> environment variable to <tt>-all</tt>. For example, your command line could look something like:


{{{
WINEDEBUG=-all wine ''program.exe''
WINEDEBUG=-all wine program.exe }}}
More advanced users and programmers interested in debugging Wine should see [[Debug Channels]] and the [[Developers]] wiki pages. Here's an example to selectively turn off <tt>fixme</tt> messages from dsound and part of D3D only:
More advanced users and programmers interested in debugging Wine should see DebugChannels and the [:Developers:Developer Documentation] wiki pages. Here's an example to selectively turn off `fixme` messages from dsound and part of D3D only:
 
WINEDEBUG=fixme-dsound,fixme-d3d_surface wine ''program.exe''


{{{
WINEDEBUG=fixme-dsound,fixme-d3d_surface wine program.exe }}}
== Troubleshooting ==
== Troubleshooting ==
 
===General===
<div id="get_log"></div>
<div id="get_log"></div>  
=== How can I get a debugging log (a.k.a. terminal output)? ===
==== How can I get a debugging log (a.k.a. terminal output)?====
Run your application from the command line (see [[run_from_terminal|How should I start Windows programs from the command line?]])
Run your application from the command line (see [[Wine_User's_Guide#How_to_run_Windows_programs_from_the_command_line]]).


You can then copy the log from the screen and paste it into a file if it's short; otherwise redirect the output of wine to a file using a [http://en.wikipedia.org/wiki/Redirection_(computing) Unix shell redirection], e.g.
You can then copy the log from the screen and paste it into a file if it's short; otherwise redirect the output of wine to a file using a [http://en.wikipedia.org/wiki/Redirection_(computing) Unix shell redirection], e.g.


{{{
cd ~/.wine/drive_c/Games/Tron
cd ~/.wine/drive_c/Games/Tron
wine tron.exe &> log.txt  
wine tron.exe &> log.txt }}}
'''Important''': Unless you have been asked specifically to provide a [[#How do I get a debug trace?|debug trace]] then do not do so. Simply follow the instructions above.
'''Important''': Unless you have been asked specifically to provide a [[get_debug_trace|debug trace]] then do not do so. Simply follow the instructions above.


'''Important''': If you get a crash dialog while doing this, please click '''Close'''. Otherwise your log will be incomplete.
'''Important''': If you get a crash dialog while doing this, please click '''Close'''. Otherwise your log will be incomplete.


'''Important''': If the resulting text file doesn't have names of C source files in it, your copy of wine probably lacks debugging symbols. Please either build wine from source, or install the debug symbols package. (In Ubuntu, the debug symbols for package wine1.4 are in package wine1.4-dbg.)
'''Important''': If the resulting text file doesn't have names of C source files in it, your copy of wine probably lacks debugging symbols. Please either build wine from source, or install the debug symbols package.
 
<div id="get_debug_trace"></div>
=== How do I get a debug trace? ===
'''Note''': Please only use this procedure when instructed. In most cases a regular terminal output is enough (see above). When filing bugs, it is often necessary to get additional debug trace (generally `+relay,+seh`, but you might be asked for specific [:DebugChannels:debug channels]). To retrieve a trace, run:
 
{{{
WINEDEBUG=+relay,+seh,+tid wine your_program.exe >> /tmp/output.txt 2>&1 }}}
Then '''attach''' `/tmp/output.txt` to the bug. If the resulting file is larger than 1 MB, compress it with `bzip2` or `rzip -9` before attaching. There are some cases where the bug seems to disappear when `WINEDEBUG` is used with the right channel. Please mention that in the bug report. For a list of debug channels that are available in Wine, see DebugChannels
 
=== How do I disable the GUI crash dialog? ===
As of 1.1.20, Wine includes a GUI crash dialog that is turned on by default. Users of apps that work despite a background crash may find the GUI dialog annoying, and in some cases the dialog itself has been reported to prevent an app from working.
 
The easiest way to disable the crash dialog is with ["winetricks"]:
 
{{{
sh winetricks nocrashdialog }}}
If you prefer to do it manually, copy the following key to a text editor:
 
{{{
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
"ShowCrashDialog"=dword:00000000 }}}
Save the file with a .reg extension (e.g.,` crashdialog.reg`), then apply it with regedit:


{{{
==== How do I get a debug trace? ====
regedit crashdialog.reg }}}
'''Note''': Please only use this procedure when instructed. In most cases a regular terminal output is enough (see above). When filing bugs, it is often necessary to get additional debug trace (generally <tt>+relay,+seh</tt>, but you might be asked for specific [[Debug Channels|debug channels]]). To retrieve a trace, run:
(You may need to specify the full path to the file, depending on where you saved it.)


To turn the GUI crash dialog back on, change 00000000 to 00000001 and reapply.
WINEDEBUG=+relay,+seh,+tid wine ''your_program.exe'' >> /tmp/output.txt 2>&1
Then '''attach''' <tt>/tmp/output.txt</tt> to the bug. If the resulting file is larger than 1 MB, compress it with <tt>bzip2</tt> or <tt>rzip</tt> before attaching. There are some cases where the bug seems to disappear when <tt>WINEDEBUG</tt> is used with the right channel. Please mention that in the bug report. For a list of debug channels that are available in Wine, see [[Debug Channels]]


These changes can also be made by simply running `regedit` and adding/changing the appropriate key the point-and-click way.
===Crashes and Freezes ===
==== My program froze up, how do I close it? ====
If you ran the program from a terminal window by typing <code>wine ''program.exe''</code>, you can usually just go back to that terminal window and press Ctrl+C. If you ran the application some other way, such as from a launcher shortcut, then you can open up a terminal and forcibly kill the process:


=== My program froze up, how do I close it? ===
killall -9 ''Application.exe''
If you ran the program from a terminal window by typing wine (program).exe, you can usually just go back to that terminal window and press Ctrl+C. If you ran the application some other way, such as from a launcher shortcut, then you can open up a terminal and forcibly kill the process:
 
{{{
killall -9 Application.exe }}}
If you want to kill all Wine programs at once, you can run:
If you want to kill all Wine programs at once, you can run:


{{{
wineserver -k  
wineserver -k }}}
You can also open up a Wine version of the Windows task manager by running <code>wine taskmgr</code> in a terminal. This will allow you to kill individual Wine processes.
You can also open up a Wine version of the Windows task manager by running `wine taskmgr` in a terminal. This will allow you to kill individual Wine processes.


=== My whole computer freezes, reboots, or shuts off when I run my game in Wine! ===
==== My whole computer freezes, reboots, or shuts off when I run my game in Wine! ====
If you are getting a complete deadlock and are unable to even use your mouse after running Wine, it's probably not a specific problem with the Wine software. Wine is a user-level process, and shouldn't be able to completely hang the operating system under any circumstances. Instead, Wine is likely exposing a deeper problem with the system, such as a defective hardware driver, a bad memory stick, or overclocking flakiness.
If you are getting a complete deadlock and are unable to even use your mouse after running Wine, it's probably not a specific problem with the Wine software. Wine is a user-level process, and shouldn't be able to completely hang the operating system under any circumstances. Instead, Wine is likely exposing a deeper problem with the system, such as a defective hardware driver, a bad memory stick, or overclocking flakiness.


It's often a graphics driver problem, in which case non-Wine apps might also be affected. If running `glxgears` also crashes, it's definitely a graphics driver problem. The most common cause is upgrading to a new kernel without also updating the graphics drivers to match. Try reinstalling your graphics drivers.
It's often a graphics driver problem, in which case non-Wine apps might also be affected. If running <tt>glxgears</tt> also crashes, it's definitely a graphics driver problem. The most common cause is upgrading to a new kernel without also updating the graphics drivers to match. Try reinstalling your graphics drivers.


If the computer is a laptop and shutting itself off entirely, a likely cause is overheating. Some laptops have problems with cooling to begin with, and the Linux ACPI code controlling fans is known to be buggy.
If the computer is a laptop and shutting itself off entirely, a likely cause is overheating. Some laptops have problems with cooling to begin with, and the Linux ACPI code controlling fans is known to be buggy.


If that doesn't help, ask for help on the wine-users forum. Be sure to mention the name of the app, the version of wine, the output of `cat /etc/issue` , `lspci | grep -i vga` , and, if you're using the proprietary NVidia drivers, `cat /proc/driver/nvidia/version` . Maybe someone can help.
If that doesn't help, ask for help on the wine-users forum. Be sure to mention the name of the app, the version of Wine, the output of <code>cat /etc/issue</code> , <code>lspci | grep -i vga</code> , and, if you're using the proprietary NVidia drivers, <code>cat /proc/driver/nvidia/version</code> . Maybe someone can help.
 
 
=== Every app I try to start crashes ===


You may have a messed-up `.wine` directory (aka wineprefix). For instance, if you install an app that starts a service when the system boots, and that service crashes, you'll see a crash every time you start wine.
==== Every app I try to start crashes ====


To work around this, try [[uninstall|removing your .wine directory]] and reinstall your apps, but skip the one that broke things.
You may have a messed-up <tt>.wine</tt> directory (aka wineprefix). For instance, if you install an app that starts a service when the system boots, and that service crashes, you'll see a crash every time you start wine.


<div id="missing_dll"></div>
To work around this, try [[#How_do_I_wipe_the_virtual_Windows_installation?|removing your .wine directory]] and reinstall your apps, but skip the one that broke things.


=== My application says some DLL or font is missing. What do I do? ===
=== Warning and Error Messages ===
==== My application says some DLL or font is missing. What do I do? ====
Applications ''should'' come with all the DLLs they need (except for core Windows DLLs). They sometimes forget to, and rely on you to already have the DLL or font installed. You can install the missing DLL or font in several ways:
Applications ''should'' come with all the DLLs they need (except for core Windows DLLs). They sometimes forget to, and rely on you to already have the DLL or font installed. You can install the missing DLL or font in several ways:


* downloading it from the original creators of the runtime (e.g. Microsoft). The easiest way to do this is with [[winetricks]].
* downloading it from the original creators of the runtime (e.g. Microsoft). The easiest way to do this is with [[winetricks]].
* install other applications which do include them.
* install other applications which do include them.
* copy it from a licensed version of Windows installed on the same machine.
* copy it from a licensed version of Windows installed on the same machine.
/!\ Do not download DLLs or scripts from websites you do not know and trust! Fake or infected DLLs can cause you great pain, even on Wine.
''Do not download DLLs or scripts from websites you do not know and trust!'' Fake or infected DLLs can cause you great pain, even on Wine.


See the [:winetricks:winetricks wiki page] for more information on winetricks.
See the [[winetricks|winetricks wiki page]] for more information on winetricks.


=== My application won't run, and says it needs .NET ===
==== <tt>Too many open files, ulimit -n probably needs to be increased</tt> ====
Wine still has many problems with .NET. You may be out of luck, but if you're brave, you can still try running it.
 
Install .NET 2.0 by running ["winetricks"] and selecting `dotnet20`. This is not yet well-supported, but several .NET applications work. See the [http://appdb.winehq.org/objectManager.php?sClass=application&iId=2586 .NET AppDB] pages for more information on installing these runtimes.
 
Alternately, you can install [http://www.mono-project.com/Main_Page Mono], an open source implementation of .net 2.0, by running ["winetricks"] and selecting `mono26`. This is not well-supported, and very few .NET applications actually work with it under Wine. See the [http://appdb.winehq.org/objectManager.php?sClass=application&iId=4982 Mono Project AppDB] page for more information.
 
(Recent versions of Wine come bundled with Mono, so you might not ever need to install it manually.)
 
<div id="ie_needed"></div>
 
=== My application won't run, and says it needs Internet Explorer ===
Wine uses the core of Firefox (called ["Gecko"]) to implement its own Internet Explorer.
 
In some cases, you can make applications which think they need IE happier by running ["winetricks"] and selecting `gecko` and/or `fakeie6`. You can also try to install the real Internet Explorer using winetricks: see "[[install_ie|How do I install Internet Explorer in Wine?]]".
 
=== My application runs, but text areas act strangely (e.g. lines don't wrap, double-clicking doesn't select words) ===
You may have run into a bug in Wine's RICHED20.DLL. You can try using Microsoft's RICHED20.DLL by running ["winetricks"] and selecting `riched20`. This may let you work around the problem until the Wine developers fix the bug.
 
=== My application doesn't run right, and the log says: ===
==== Too many open files, ulimit -n probably needs to be increased ====
Your operating system is probably living in the past, and has too low a hard limit on the number of open file descriptors. (See https://bugs.launchpad.net/ubuntu/+bug/663090 for why raising the hard limit is the right thing to do, and why raising the soft limit by default is dangerous.)
Your operating system is probably living in the past, and has too low a hard limit on the number of open file descriptors. (See https://bugs.launchpad.net/ubuntu/+bug/663090 for why raising the hard limit is the right thing to do, and why raising the soft limit by default is dangerous.)


For Ubuntu and most modern versions of Linux, you can edit `/etc/security/limits.conf` as root, and change the line
For Ubuntu and most modern versions of Linux, you can edit <tt>/etc/security/limits.conf</tt> as root, and change the line


{{{
* hard nofile 2048 (or whatever the current limit is)  
* hard nofile 2048 (or whatever the current limit is) }}}
to
to


{{{
  * hard nofile 8192  
  * hard nofile 8192 }}}
(The asterisk means 'for all users'.)
(The asterisk means 'for all users'.)


Then log out and log in again, and do `ulimit -H -n`. It should show 8192 now, and Wine should have access to more file descriptors.
Then log out and log in again, and do <code>ulimit -H -n</code>. It should show 8192 now, and Wine should have access to more file descriptors.


Here's another method that's more portable (might even work on Mac OS X), but only works temporarily, and only raises the limit for apps started from the current terminal window:
Here's another method that's more portable (might even work on Mac OS X), but only works temporarily, and only raises the limit for apps started from the current terminal window:


{{{
$ sudo bash
$ sudo bash
# ulimit -n 8192
# ulimit -n 8192
# su yourusername $ wine ''yourprogram.exe''
# su yourusername $ wine yourprogram.exe }}}
==== preloader: Warning: failed to reserve range 00000000-60000000 ====
or


==== winevdm: unable to exec '<APP NAME>': DOS memory range unavailable ====
==== <tt>preloader: Warning: failed to reserve range 00000000-60000000</tt> or <tt>winevdm: unable to exec &apos;''application name''&apos;: DOS memory range unavailable</tt> ====
This issue is being followed in [http://bugs.winehq.org/show_bug.cgi?id=12516 bug 12516].
This issue is being followed in [http://bugs.winehq.org/show_bug.cgi?id=12516 bug 12516].


The cause is a Linux kernel setting. Run `cat /proc/sys/vm/mmap_min_addr` as root: if it does not equal 0 then running `sysctl -w vm.mmap_min_addr=0` as root can be used to temporarily fix the issue; to fix it permanently, add the line `vm.mmap_min_addr=0` to `/etc/sysctl.conf`. Please record if you do this alteration, as the area Wine needs may change.
The cause is a Linux kernel setting. Run <code>cat /proc/sys/vm/mmap_min_addr</code> as root: if it does not equal 0 then running <code>sysctl -w vm.mmap_min_addr=0</code> as root can be used to temporarily fix the issue; to fix it permanently, add the line <code>vm.mmap_min_addr=0</code> to <tt>/etc/sysctl.conf</tt>. Please record if you do this alteration, as the area Wine needs may change.


See PreloaderPageZeroProblem for more information.
See [[Preloader Page Zero Problem]] for more information.


==== Failed to use ICMP (network ping), this requires special permissions ====
==== <tt>Failed to use ICMP (network ping), this requires special permissions</tt> ====
On *NIX systems ICMP ping requires use of raw sockets, which is limited to super user (root) only. And running Wine as root is a [[run_as_root|bad idea]]. Fortunately newer versions of Linux allow granular permission control to grant only required permissions to specified files.
On *NIX systems ICMP ping requires use of raw sockets, which is limited to super user (root) only. And running Wine as root is a [[#run_as_root|bad idea]]. Fortunately newer versions of Linux allow granular permission control to grant only required permissions to specified files.


To allow Wine opening raw sockets run this command:
To allow Wine opening raw sockets run this command:


{{{
sudo setcap cap_net_raw+epi /usr/bin/wine-preloader  
sudo setcap cap_net_raw+epi /usr/bin/wine-preloader }}}
'''Note''': This works with default binary Wine install only on most distros. WineHQ packages install Wine to /opt/wine-stable, /opt/wine-devel/, or /opt/wine-staging. Self-compiled Wine will be located under /usr/local/bin. The 64-Bit name is wine64-preloader. Third party Wine wrappers (such as PlayOnLinux) might keep Wine binary in other places. You will need to rerun the command after updating Wine.
__Note__: This works with default binary Wine install only on most distros. Self-compiled Wine will be located under /usr/local/bin. The 64-Bit name is wine64-preloader. 3-rd party Wine wrappers (such as PlayOnLinux) might keep Wine binary in other places. You will need to rerun the command after updating Wine.


To __remove__ the permissions use:
To remove the permissions use:
{{{
sudo setcap -r /usr/bin/wine-preloader
sudo setcap -r /usr/bin/wine-preloader }}}


==== err:virtual:map_image failed to set 60000020 protection on section .text, noexec filesystem? ====
==== <tt>err:virtual:map_image failed to set 60000020 protection on section .text, noexec filesystem?</tt> ====
This can be caused by filesystems mounted with user or noexec options, or by SELinux. Make sure the app in question isn't on a funny filesystem, or try disabling SELinux temporarily.
This can be caused by filesystems mounted with user or noexec options, or by SELinux. Make sure the app in question isn't on a funny filesystem, or try disabling SELinux temporarily.
==== <tt>Broken NVIDIA RandR detected, falling back to RandR 1.0</tt> ====
[https://en.wikipedia.org/wiki/RandR RandR] is a protocol used by applications to talk to the X server to change screen resolution, among other things. nVidia's proprietary drivers for GNU/Linux intentionally do not properly implement newer versions of RandR, which Wine normally relies upon. This could present problems, particularly in software that attempts to change resolution or output to multiple monitors. (See [https://bugs.winehq.org/show_bug.cgi?id=34348 bug 34348])
The open source Nouveau driver is not affected by this issue, and is the recommended solution for users who do not need the proprietary driver for any of their apps or games. Users who require the proprietary driver should try the workaround described below.
Many applications will attempt to start in lower resolutions if (and only if) they are available - but will happily use a higher resolution if that is the only option. In this case, you may be able to avoid a crash on nVidia drivers by forcing your X server to only support your monitor's native resolution and nothing else. This has proven to work for a range of games.
To make this change to Xorg, edit (as root) /etc/X11/xorg.conf and add the following line:
    Option        "metamodes" "1920x1080 +0+0"
within the Screen section (changing 1920x1080 to whatever supported resolution you require).
Upon restarting Xorg, you can test your changes using the xrandr command. <code>xrandr</code> should list your chosen resolution, and <code>xrandr --q1</code> should do the same. There should not be any additional resolutions listed. You may now re-test your Windows application, hopefully with more success. Remember to comment out the line and restart Xorg when you are finished if you need other resolutions working for other software.


=== Graphics ===
=== Graphics ===
==== My application complains about being unable to change the resolution or color depth. ====
==== My application complains about being unable to change the resolution or color depth ====
You generally need to edit the Screen section of your `/etc/X11/xorg.conf` to support additional color depths and resolutions. There may also be a problem with Xrandr.
You generally need to edit the Screen section of your <tt>/etc/X11/xorg.conf</tt> to support additional color depths and resolutions. There may also be a problem with Xrandr.


==== The application I am trying to run complains that it needs 256 colors but I have millions! ====
==== The application I am trying to run complains that it needs 256 colors but I have millions! ====
The inability to switch from 24bpp mode to 8bpp mode is a limitation of X, not a bug in Wine. See ["256ColorMode"] for some possible workarounds.
The inability to switch from 24bpp mode to 8bpp mode is a limitation of X, not a bug in Wine. See [[256 Color Mode]] for some possible workarounds.


==== My X screen won't go back to its normal resolution after running a game fullscreen. ====
==== My X screen won't go back to its normal resolution after running a game fullscreen ====
You can often work around this by changing the screen resolution and then changing it back again under the system preferences.
You can often work around this by changing the screen resolution and then changing it back again under the system preferences.


Alternately, you can run this terminal command to restore your X settings:
Alternately, you can run this terminal command to restore your X settings:


{{{
xrandr -s 0
xrandr -s 0 }}}
 
==== I'm using Desktop Effects with Compiz, Fusion, or XGL and get poor performance/odd messages/broken applications ====
==== I'm using Desktop Effects with Compiz, Fusion, or XGL and get poor performance/odd messages/broken applications ====
Using compositing managers in X11 tends to cripple OpenGL performance or break OpenGL entirely (this does not apply to the Mac OS X compositor, which cannot be disabled). We recommend that you disable them entirely before trying to use Wine. If you are using one and experiencing slow performance then please do not file bugs in Wine, as these are bugs in your window manager or your video drivers. Also, disabling the Composite extension within `/etc/X11/xorg.conf` will most certainly prevent any compositing from affecting Wine.
Using compositing managers in X11 tends to cripple OpenGL performance or break OpenGL entirely (this does not apply to the Mac OS X compositor, which cannot be disabled). We recommend that you disable them entirely before trying to use Wine. If you are using one and experiencing slow performance then please do not file bugs in Wine, as these are bugs in your window manager or your video drivers. Also, disabling the Composite extension within <tt>/etc/X11/xorg.conf</tt> will most certainly prevent any compositing from affecting Wine.


==== Graphics in games with good ratings in AppDB are scrambled. ====
==== Graphics in games with good ratings in AppDB are scrambled ====
* Retry using the latest graphics drivers.
* Retry using the latest graphics drivers.
* Most [http://appdb.winehq.org/ AppDB] entries are based on '''NVIDIA/!GeForce''' hardware running the proprietary driver.
* Most [http://appdb.winehq.org/ AppDB] entries are based on '''NVIDIA/GeForce''' hardware running the proprietary driver.
* '''ATI/AMD/Radeon''' cards running the proprietary '''fglrx''' driver have problems in Wine. As a rule of thumb, at least games that use shaders are broken. See [http://article.gmane.org/gmane.comp.emulators.wine.user/36669 this posting] and [http://bugs.winehq.org/show_bug.cgi?id=7411 Wine bug 7411] for details.
* '''ATI'''/'''AMD'''/'''Radeon''' cards running the proprietary fglrx driver have problems in Wine. As a rule of thumb, at least games that use shaders are broken. See [http://article.gmane.org/gmane.comp.emulators.wine.user/36669 this posting] and [http://bugs.winehq.org/show_bug.cgi?id=7411 Wine bug 7411] for details.
* '''Other hardware''' (Intel/S3/Matrox etc.) will probably run only old (non-shader) games. Compatibility is not well tested.
* '''Other hardware''' (Intel/S3/Matrox etc.) will probably run only old (non-shader) games. Compatibility is not well tested.
* Same for '''open source''' drivers as their 3D support is typically basic only.
* Same for '''open source''' drivers as their 3D support is typically basic only.
===== Wine displays corrupted or missing text. =====
==== Wine displays corrupted or missing text ====
This may be [http://bugs.winehq.org/show_bug.cgi?id=16146 bug 16146], caused by the `nvidia-96xx` legacy driver, or [http://bugs.winehq.org/show_bug.cgi?id=18120 bug 18120], which affects QT 4.5.0 applications. It could also be caused by missing fonts, font conflicts, or adding new fonts to Wine.
This may be [http://bugs.winehq.org/show_bug.cgi?id=16146 bug 16146], caused by the <tt>nvidia-96xx</tt> legacy driver, or [http://bugs.winehq.org/show_bug.cgi?id=18120 bug 18120], which affects QT 4.5.0 applications. It could also be caused by missing fonts, font conflicts, or adding new fonts to Wine.


Try using a fresh Wine prefix (by moving or deleting `~/.wine`, or changing the `$WINEPREFIX` environment variable). If you still have this problem, try setting the following in the Wine registry:
Try using a fresh Wine prefix (by moving or deleting <tt>~/.wine</tt>, or changing the <tt>$WINEPREFIX</tt> environment variable). If you still have this problem, try setting the following in the Wine registry:


{{{
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"ClientSideWithRender"="N"  
"ClientSideWithRender"="N" }}}
Place above in a text file called <tt>norender.txt</tt> and it can be inserted into the registry with the command <code>regedit norender.txt</code>. Please apply only as required. (This was reported as being required of OS X on the 1 Dec 2007, and more recently on other platforms, such as Ubuntu.)
Place above in a text file called `norender.txt` and it can be inserted into the registry with the command `regedit norender.txt`. Please apply only as required. (This was reported as being required of OS X on the 1 Dec 2007, and more recently on other platforms, such as Ubuntu.)


<div id="large_win_fonts"></div>
==== Wine's windows and fonts are extremely large ====
==== Wine's windows and fonts are extremely large. ====
Sometimes you can use the Alt key and the mouse to move the winecfg window so you can reach the "Screen Resolution" slider on the Graphics tab; slide it down. Changes will not effect the winecfg window until it's restarted.
Sometimes you can use the Alt key and the mouse to move the `winecfg` window so you can reach the "Screen Resolution" slider on the Graphics tab; slide it down. Changes will not effect the `winecfg` window until it's restarted.


If that doesn't work, you can use this one line registry change (all one line):
If that doesn't work, you can use this one line registry change (all one line):


{{{
echo -e "[HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]\n\"LogPixels\"=dword:60\n" | wine regedit -  
echo -e "[HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]\n\"LogPixels\"=dword:60\n" | wine regedit - }}}
If all fails, you could remove your ~/.wine directory and reinstall your Windows applications.
If all fails, you could remove your `~/.wine` directory and reinstall your Windows applications.
 
==== I get "Broken NVIDIA RandR detected, falling back to RandR 1.0." printed to the console. ====
[https://en.wikipedia.org/wiki/RandR RandR] is a protocol used by applications to talk to the X server to change screen resolution, among other things. nVidia's proprietary drivers for GNU/Linux intentionally do not properly implement newer versions of RandR, which Wine normally relies upon. This could present problems, particularly in software that attempts to change resolution or output to multiple monitors.
 
Until either nVidia fixes the behaviour of their driver or Wine developers work around the imposed driver limitations ([https://bugs.winehq.org/show_bug.cgi?id=34348 bug 34348]), users of nVidia hardware can work around associated problems by using [https://en.wikipedia.org/wiki/Nouveau_%28software%29 Nouveau] free software drivers or switching to a graphics card from a different vendor with better support.
 
Also note that many applications will attempt to start in lower resolutions if (and only if) they are available - but will happily use a higher resolution if that is the only option. In this case, you may be able to avoid a crash on nVidia drivers by forcing your X server to only support your monitor's native resolution and nothing else. This has proven to work for a range of games.
 
To make this change to Xorg, edit (as root) /etc/X11/xorg.conf and add the following line: {{{
    Option        "metamodes" "1920x1080 +0+0"}}} within the Screen section (changing 1920x1080 to whatever supported resolution you require). Upon restarting Xorg, you can test your changes using the xrandr command. `xrandr` should list your chosen resolution, and `xrandr --q1` should do the same. There should not be any additional resolutions listed. You may now re-test your Windows application, hopefully with more success. Remember to comment out the line and restart Xorg when you are finished if you need other resolutions working for other software.


=== Sound ===
=== Sound ===
==== Audio in games sounds different from running in Windows ====
==== Audio in games sounds different from running in Windows ====
A number of !DirectSound features are not implemented (correctly) in Wine yet.
A number of DirectSound features are not implemented (correctly) in Wine yet.
 
* Sound effects (echo etc.) are not implemented ([http://bugs.winehq.org/show_bug.cgi?id=10603 Bug 10603])
* Doppler effect is not implemented ([http://source.winehq.org/git/wine.git/?a=blob;f=dlls/dsound/sound3d.c;h=252c7632667fb1b49556e1f281f8232e42e1c345;hb=HEAD#l266 source])


* Sound effects (echo etc.) are not implemented ([http://bugs.winehq.org/show_bug.cgi?id=10603 Bug 10603])
* Multi-channel surround audio is not implemented ([http://bugs.winehq.org/show_bug.cgi?id=11764 Bug 11764])
* 3D sound positioning is not completely correct ([http://bugs.winehq.org/show_bug.cgi?id=11499 Bug 11499])
* Doppler effect is not implemented ([http://source.winehq.org/git/wine.git/?a=blob;f=dlls/dsound/sound3d.c;h=252c7632667fb1b49556e1f281f8232e42e1c345;hb=HEAD#l266 source])
==== MP3s do not play in Windows Media Player or applications that depend on it ====
==== MP3s do not play in Windows Media Player or applications that depend on it ====
For MP3 sound to play out of the box in apps that use the WMP engine and codecs, you must have 32-bit `libmpg123` installed on your system and Wine must have been compiled with MP3 support. Not all dis­tro packag­es provide this; openSUSE packages in particular are known to be compiled without MP3 support. If your distro's Wine package provides no MP3 support, consult your distribution's user forum to see if any package provides it. (For openSUSE, `wine-mp3` package is available at [http://packman.links2linux.org/ Packman] which adds mp3 support using `libmpg123` to Wine.)
For MP3 sound to play out of the box in apps that use the WMP engine and codecs, you must have 32-bit <tt>libmpg123</tt> installed on your system and Wine must have been compiled with MP3 support. Historically, not all dis­tros have provided this for legal reasons, though this problem should be much less widespread now that all mp3 patents have expired.  


The workaround for lack of libmpg123 and/or winemp3.acm is to use the codec installed by WMP9, l3cod­eca.acm. Copy l3codeca.acm to the wineprefix's /windows/system32 directory (or use winetricks to install WMP9), then create a symlink to it named winemp3.acm in the same directory. Wine will then use the native codec to play MP3s.
For users still affected by this, the workaround for lack of libmpg123 and/or winemp3.acm is to use the codec installed by WMP9, l3cod­eca.acm. Copy l3codeca.acm to the wineprefix's /windows/system32 directory (or use winetricks to install WMP9), then create a symlink to it named winemp3.acm in the same directory. Wine will then use the native codec to play MP3s.


This only affects WMP and apps that rely on it for MP3 playback (including Powerpoint). Apps that install their own MP3 codec, such as Winamp or VLC Player, should be able to play MP3s without this workaround.
This only affects WMP and apps that rely on it for MP3 playback (including Powerpoint). Apps that install their own MP3 codec, such as Winamp or VLC Player, should be able to play MP3s without this workaround.
==== Bad or no sound on systems using PulseAudio ====
==== Bad or no sound on systems using PulseAudio ====
Bad or no sound was a problem on some systems with Pulseaudio in older versions of Wine using the winealsa driver. If you are using a version of Wine older than 1.8, please upgrade, as most such problems should be solved by the winepulse driver. If the problem still occurs, try unsetting the PULSE_LATENCY_MSEC environment variable. Some distro packages (notably Debian) formerly set this variable to work around the sound issue with the winealsa driver, but it is not needed with the winepulse driver and may prevent sound from working.
Bad or no sound was a problem on some systems with Pulseaudio in older versions of Wine using the winealsa driver. If you are using a version of Wine older than 1.8, please upgrade, as most such problems should be solved by the winepulse driver. If the problem still occurs, try unsetting the PULSE_LATENCY_MSEC environment variable. Some distro packages (notably Debian) formerly set this variable to work around the sound issue with the winealsa driver, but it is not needed with the winepulse driver and may prevent sound from working.


=== My CD or DVD disc won't eject ===
=== Networking ===
Try [:eject:wine eject]. It is a function to free up, unlock, and eject the drive. Make sure that the drive is mapped as a CD-ROM in `winecfg` and specify the drive letter in the command line, e.g.
 
{{{
wine eject d: }}}
==== My program fails to do networking, but my other applications can get online ====
==== My program fails to do networking, but my other applications can get online ====
'''Note:''' These instructions are for older Wine installs. If you're using Wine 1.x and your application still fails to do networking, you can give this a try as well. If you're running Wine 1.x and below instructions work for you, '''file a bug''' so we can fix Wine to improve other people's experience.
'''Note:''' These instructions are for older Wine installs. If you're using Wine 1.x and your application still fails to do networking, you can give this a try as well. If you're running Wine 1.x and below instructions work for you, '''file a bug''' so we can fix Wine to improve other people's experience.


You need to make sure that your hostname resolves to the IP address of your network interface. To verify if you have this problem run `hostname -i`. If it returned IP address starting from "127." then read on.
You need to make sure that your hostname resolves to the IP address of your network interface. To verify if you have this problem run <code>hostname -i</code>. If it returned IP address starting from "127." then read on.


To set this up correctly, you can type the following from a terminal:
To set this up correctly, you can type the following from a terminal:


{{{
hostname  
hostname }}}
This will return your hostname the way your computer sees it. Now, you need to open an editor with system administrator privileges, how you do this will depend on the distribution you are using. Open the file <tt>/etc/hosts</tt> and see if there is an entry for your hostname. Assuming your hostname is "yourhost" and your network IP address is 192.168.0.23, the entry might look like this:
This will return your hostname the way your computer sees it. Now, you need to open an editor with system administrator privileges, how you do this will depend on the distribution you are using. Open the file `/etc/hosts` and see if there is an entry for your hostname. Assuming your hostname is "yourhost" and your network IP address is 192.168.0.23, the entry might look like this:


{{{
127.0.0.1 ''yourhost.yourdomain.com'' ''yourhost''
127.0.0.1 yourhost.yourdomain.com yourhost }}}
Change this to (or add, if there is no such line):
Change this to (or add, if there is no such line):


{{{
192.168.0.23 ''yourhost.yourdomain.com'' ''yourhost''
192.168.0.23 yourhost.yourdomain.com yourhost }}}
For most Windows games with networking problems, this is all you need to get networking to work.
For most Windows games with networking problems, this is all you need to get networking to work.


==== Why doesn't DNS resolve in 64-bit operating systems? ====
==== Why doesn't DNS resolve in 64-bit operating systems? ====
Many distributions don't provide all the 32-bit compatibility libraries that wine needs. In this case, wine needs 32-bit DNS libraries. On Ubuntu/Debian, this package is `lib32nss-mdns`. To install it on those OSes, use:
Many distributions don't provide all the 32-bit compatibility libraries that wine needs. In this case, wine needs 32-bit DNS libraries. On Ubuntu/Debian, this package is <tt> libnss-mdns:i386</tt>. For other operating systems, the package name may differ. Consult your distribution's support channels.
 
=== Removable Media ===
==== My CD or DVD disc won't eject ====
Try <code>wine eject</code>. It is a function to free up, unlock, and eject the drive. Make sure that the drive is mapped as a CD-ROM in <tt>winecfg</tt> and specify the drive letter in the command line, e.g.
 
wine eject d:
 
==== The application's CD or DVD looks empty or is missing some files! ====
Some discs are poorly mastered in a way that affects only Unix-based operating systems.


{{{
You may need to use the "unhide" or "norock" mount options for these discs.
sudo apt-get install lib32nss-mdns }}}
For other operating systems, the package name and installation method may differ. Consult your distribution's support channels.


=== I deleted my Wine menu, and now I can't get it back. ===
Run <tt>mount</tt> once to see where the disc is mounted, then mount it again in the same place with the needed option (and the "remount" option). Some assembly required.
 
Examples:
 
sudo mount -o remount,unhide /dev/sr0 /mnt/cdrom
or
 
sudo mount -t iso9660 -o ro,unhide /dev/cdrom /media/cdrom0
See also your operating system's documentation, e.g. https://help.ubuntu.com/community/Mount or http://manpages.ubuntu.com/manpages/natty/man8/mount.8.html
 
=== Input Devices ===
==== Some key combinations in my application do not work ====
Even in full screen mode, window managers typically capture some keys. For example, in KDE and GNOME, Alt+Left Click is used to move the whole application window by default. Thus, this key combination is not available to applications in Wine. You have to disable the colliding combinations in your window manager. For KDE, see Control Center/Window Behaviour or (better) Window-specific settings/Workarounds/Block global shortcuts. For GNOME, see System/Preferences/Windows and change the "Movement Key" setting. Also see System/Preferences/Keyboard Shortcuts for specific keyboard combinations.
 
(Keywords: Keyboard, Shortcut, Modifier, Alt, Ctrl, Control.)
 
==== My mouse jumps around/resets its position often in games ====
See http://bugs.winehq.org/show_bug.cgi?id=27156 and https://bugs.freedesktop.org/show_bug.cgi?id=30068.
 
=== Miscellaneous ===
==== My application runs, but text areas act strangely (e.g. lines don't wrap, double-clicking doesn't select words) ====
You may have run into a bug in Wine's RICHED20.DLL. You can try using Microsoft's RICHED20.DLL by running [[winetricks]] and selecting <tt>riched20</tt>. This may let you work around the problem until the Wine developers fix the bug.
 
==== I deleted my Wine menu, and now I can't get it back ====
Rather than actually delete anything, menu editors on Unix desktops simply mark menu entries as hidden so that they don't show up in the menu. Thus, they remain hidden after reinstalling the application. First, see if these menu entries can be found your menu editor and re-enabled.
Rather than actually delete anything, menu editors on Unix desktops simply mark menu entries as hidden so that they don't show up in the menu. Thus, they remain hidden after reinstalling the application. First, see if these menu entries can be found your menu editor and re-enabled.


This information is stored in `~/.config/menus/applications.menu` . Edit `~/.config/menus/applications.menu` and you should find a section near the end that looks similar to this:
This information is stored in <tt>~/.config/menus/applications.menu</tt> . Edit <tt>~/.config/menus/applications.menu</tt> and you should find a section near the end that looks similar to this:


{{{
<Menu>
<Menu>
       <Name>wine-wine</Name>
       <Name>wine-wine</Name>
       <Deleted/>
       <Deleted/>
   </Menu> }}}
   </Menu>  
or perhaps this:
or perhaps this:


{{{
<Menu>
<Menu>
       <Name>wine-wine</Name>
       <Name>wine-wine</Name>
       <Menu>
       <Menu>
Line 929: Line 786:
       </Menu>
       </Menu>
       <Deleted/>
       <Deleted/>
   </Menu> }}}
   </Menu>  
Remove the <Deleted/> line and your Wine menu will reappear.
Remove the <Deleted/> line and your Wine menu will reappear.


=== Some key combinations in my application do not work. ===
==== 16-bit applications fail to start ====
Even in full screen mode, window managers typically capture some keys. For example, in KDE and GNOME, Alt+Left Click is used to move the whole application window by default. Thus, this key combination is not available to applications in Wine. You have to disable the colliding combinations in your window manager. For KDE, see Control Center/Window Behaviour or (better) Window-specific settings/Workarounds/Block global shortcuts. For GNOME, see System/Preferences/Windows and change the "Movement Key" setting. Also see System/Preferences/Keyboard Shortcuts for specific keyboard combinations.
 
(Keywords: Keyboard, Shortcut, Modifier, Alt, Ctrl, Control.)
 
=== Where can I get further help? ===
In addition to this [:FrontPage:wiki], check the [http://www.winehq.org/documentation Wine HQ Documentation] and the [http://forums.winehq.org/ users forum]. If you're an ISV looking at porting an application with Winelib you can also try [http://forums.winehq.org/ wine-devel].
 
For help with a specific application, search the [http://appdb.winehq.org Application Database], a place where users share their experiences by submitting test data, tips and tricks, and asking questions.
 
The IRC channel: [irc://irc.freenode.net/#winehq #WineHQ] on irc.freenode.net. Knowledgeable Wine users hang out there, and often developers will lurk there too. See ["IRC"] for more important information.
 
=== I think I've found a bug. How do I report this bug to the Wine programming team? ===
Bug reports should be submitted to our online Bugzilla system (http://bugs.winehq.org/). To increase developer productivity and facilitate a resolution to submitted bugs, '''please read the Wiki article on ["Bugs"]'''. A poor bug report may be marked INVALID and closed, leaving you no closer to resolving your problem. High quality bug reports are an essential part of making Wine better.
 
Please note that you should ''generally'' avoid submitting bug reports if you have used any [:ThirdPartyApplications:third party applications] or native DLL overrides.
 
<div id="mouse_jumps"></div>
 
=== My mouse jumps around/resets its position often in games. ===
See http://bugs.winehq.org/show_bug.cgi?id=27156 / https://bugs.freedesktop.org/show_bug.cgi?id=30068.
 
=== 16-bit applications fail to start ===
See https://bugs.winehq.org/show_bug.cgi?id=36664.
See https://bugs.winehq.org/show_bug.cgi?id=36664.
For 64 bit Linux Kernels 3.15+, 3.14.6+, 3.10.42+, 3.13.22+, 3.4.92+ and 3.2.60+.
For 64 bit Linux Kernels 3.15+, 3.14.6+, 3.10.42+, 3.13.22+, 3.4.92+ and 3.2.60+.
You'll need to run:
You'll need to run:
{{{
 
# echo 1 > /proc/sys/abi/ldt16 }}}
# echo 1 > /proc/sys/abi/ldt16  
as root, but be aware that this has security implications.
as root, but be aware that this has security implications.


If your kernel is older than the above stated versions /proc/sys/abi/ldt16 most likely will be missing.
If your kernel is older than the above stated versions <tt>/proc/sys/abi/ldt16</tt> most likely will be missing.
 
The security fix is espfix64 and as of yet only exists in development branch for 3.16 Linux Kernel. At some point in a future I will put a list of kernels containing the security fix as it most likely will be backported when it is tested. Doing /proc/sys/abi/ldt16 will be required on the security fixed kernels just like the current insecure ones.
 
== Risks ==
=== Wine is malware-compatible ===
Just because Wine runs on a non-Windows OS doesn't mean you're protected from viruses, trojans, and other forms of malware.
 
There are several things you can do to protect yourself:
 
* Never run executables from sites you don't trust. [http://www.winehq.org/pipermail/wine-devel/2007-January/053719.html Infections have already happened.]
* In web browsers and mail clients, be suspicious of links to URLs you don't understand and trust.
* Never run any application (including Wine applications) as root (see [[run_as_root|above]]).
* Use a virus scanner, e.g. [http://www.clamav.org ClamAV] is a free virus scanner you might consider using if you are worried about an infection; see also [https://help.ubuntu.com/community/ClamAV Ubuntu's notes on how to use ClamAV]. No virus scanner is 100% effective, though.
* Removing the default Wine Z: drive, which maps to the unix root directory, is a weak defense. It will not prevent Windows applications from reading your entire filesystem, and '''will prevent you from running Windows applications that aren't reachable from a Wine drive (like C: or D:).''' A workaround is to copy/move/symlink downloaded installers to `~/.wine/drive_c` before you can run them.
* If you're running applications that you suspect to be infected, run them as their own Linux user or in a virtual machine (the ZeroWine malware analyzer works this way).
=== How good is Wine at sandboxing Windows apps? ===
'''Wine does not sandbox in any way at all.''' When run under Wine, a Windows app can do anything your user can. Wine does not (and cannot) stop a Windows app directly making native syscalls, messing with your files, altering your startup scripts, or doing other nasty things.


You need to use !AppArmor, SELinux or some type of virtual machine if you want to properly sandbox Windows apps.
The security fix is espfix64 and as of yet only exists in development branch for 3.16 Linux Kernel. At some point in a future I will put a list of kernels containing the security fix as it most likely will be backported when it is tested. Doing <tt>/proc/sys/abi/ldt16</tt> will be required on the security fixed kernels just like the current insecure ones.


Note that the ["winetricks"] `sandbox` verb merely removes the desktop integration and Z: drive symlinks and is not a true sandbox. It protects against errors rather than malice. It's useful for, e.g., keeping games from saving their settings in random subdirectories of your home directory.
==== Input doesn't work over SSH ====
When using Wine over SSH, you must run in 'trusted X11 forwarding' mode. For OpenSSH, this means using '-Y' instead of '-X'. See for example https://bugs.winehq.org/show_bug.cgi?id=41476.

Revision as of 13:05, 7 September 2018

__NUMBEREDHEADINGS__ Translations of this page: Français ; Not all ported. Translators, please see Discussion page.


This FAQ, or Frequently Asked Questions, covers general topics about Wine. For questions related to Wine software development, see the Developer FAQ.

Quick links: running a program in Wine, running Wine from a terminal, running program as root, uninstalling an application, getting a debugging log, using a wineprefix, creating a 32 bit wineprefix.

General questions

Who is responsible for Wine?

Wine is available thanks to the work of many people around the world. Some companies that are or have been involved with Wine development are CodeWeavers, Bordeaux, TransGaming, Corel, Macadamian and Google. See Acknowledgements and Wine History.

Does Wine hurt Linux or other free operating systems?

Wine increases the usefulness of Linux, makes it easier for users to switch to free operating systems, and for Windows developers to make applications that work on them. This greatly raises Linux marketshare, drawing more commercial and community developers to Linux.

Is Wine an emulator? There seems to be disagreement

There is a lot of confusion about this, particularly caused by people getting Wine's name wrong and calling it WINdows Emulator.

When users think of an emulator, they tend to think of things like game console emulators or virtualization software. However, Wine is a compatibility layer - it runs Windows applications in much the same way Windows does. There is no inherent loss of speed due to "emulation" when using Wine, nor is there a need to open Wine before running your application.

That said, Wine can be thought of as a Windows emulator in much the same way that Windows Vista can be thought of as a Windows XP emulator: both allow you to run the same applications by translating system calls in much the same way. Setting Wine to mimic Windows XP is not much different from setting Vista to launch an application in XP compatibility mode.

A few things make Wine more than just an emulator:

  • Sections of Wine can be used on Windows. Some virtual machines use Wine's OpenGL-based implementation of Direct3D on Windows rather than truly emulate 3D hardware.
  • Winelib can be used for porting Windows application source code to other operating systems that Wine supports to run on any processor, even processors that Windows itself does not support.

"Wine is not just an emulator" is more accurate. Thinking of Wine as just an emulator is really forgetting about the other things it is. Wine's "emulator" is really just a binary loader that allows Windows applications to interface with the Wine API replacement.

What is the difference between Wine, CrossOver, and Cedega?

Wine is the base of the project, where most of the work is being done. Wine is not perfect, but tens of thousands of people nevertheless use "vanilla" Wine successfully to run a large number of Windows programs.

CrossOver XI (formerly CrossOver Office) is a product made by a company called CodeWeavers that is based directly on Wine with a few tweaks and proprietary add-ons. Unlike the biweekly Wine releases, CrossOver releases are rigorously tested for compatibility with CodeWeavers' supported applications in order to prevent "regressions". CodeWeavers employs a large proportion of the Wine developers and provides a great deal of leadership for the project. All improvements to Wine eventually work their way into CrossOver.

Cedega (formerly WineX) is a product from a company called TransGaming. TransGaming based their product on Wine back in 2002 when Wine had a different license, closed their source code, and rebranded their version as specialized for gamers. In the years since Cedega was originally created from Wine, development on Wine and Cedega have continued mostly independently. TransGaming currently gives back very little code to Wine. Cedega is not "Wine with more gaming support" - because Wine has had years of development since Cedega was made, and many games actually run better under Wine than under Cedega. Currently, Wine has more advanced Direct3D support than Cedega, but Cedega still has more advanced copy protection support due to TransGaming's licensing of (closed source) code from a handful of copy protection companies. Unlike CrossOver, most improvements to Wine don't get into Cedega due to the license differences between Cedega and Wine.

For more information, see Wine History.

How does the Wine version numbering system work?

See Wine_User's_Guide#Wine_from_WineHQ.

Do I have to use the command line?

Normally you do not have to use the command line to use Wine in Linux. You can use a graphical interface for most things, much like on Windows. In many cases you can right-click an installer and select "Open with Wine", or just double-click it. You can start installed programs using the shortcut icon or menu.

However, there are several situations when you might need to use the command line. The most common reason is to get debug output when your program does not run properly. You might also want to use utilities such as regedit that do not have menu shortcuts (note that you can create them using whatever tools your DE provides).

This does not hold true for Mac OS X Wine usage, which is all command line currently, unless you use a third party application.

What applications run well with Wine?

Thousands of applications work well. As a general rule, simpler or older applications tend to work well, and the latest versions of complex applications or games tend to not work well yet. See the Wine Application Database for details on individual applications. If your application is rated Silver, Gold or Platinum, you're probably okay; if it's rated Bronze or Garbage, Wine isn't really ready to run it for most users. If there aren't any reports using a recent version of Wine, however, your best bet is to simply try and see. If it doesn't work, it probably isn't your fault, Wine is not yet complete. Ask for help on the forum if you get stuck.

How can I help contribute to the Wine project, and in what ways?

You can contribute programming or documentation skills, or monetary or equipment donations, to aid the Wine developers in reaching their goals.

One area where every Wine user can contribute to this project is by sending high quality bug reports to our Bugzilla and helping the developers with any followup questions that they may have about your bug. It is impossible and impractical for a developer to have a copy of every program on the market, so we need your help even after your initial bug report. If a developer has a good idea what might be causing the bug, he or she may ask if you can try a patch and see if it fixes the problem. If the patch works and then makes its way into our main development tree, the bug report will be closed, your help will be appreciated by everyone and your problem will be fixed.

For a list of ideas of how you can help, please consult the Contribute section of the main page.

I think I've found a bug. How do I report this to WineHQ?

Bug reports should be submitted to our online Bugzilla system. To increase developer productivity and facilitate a resolution to submitted bugs, please read the Wiki article on Bugs. A poor bug report may be marked INVALID and closed, leaving you no closer to resolving your problem. High quality bug reports are an essential part of making Wine better.

Please note that you should generally avoid submitting bug reports if you have used any third party applications or native DLL overrides.

Where can I get further help?

In addition to this wiki, check the Wine HQ Documentation and the users forum. If you're an ISV looking at porting an application with Winelib you can also try wine-devel.

For help with a specific application, search the Application Database, a place where users share their experiences by submitting test data, tips and tricks, and asking questions.

The IRC channel: #WineHQ on irc.freenode.net. Knowledgeable Wine users hang out there, and often developers will lurk there too. See IRC for more important information.

Installing Wine

What are the system requirements for Wine?

Wine, along with the operating system you use to run it, generally requires less disk space and memory than Windows itself. If you're not currently running a Windows application, Wine won't consume any resources at all other than about 20 megabytes of disk space.

Ideally, if an application runs fine in Windows, it should run fine on the same hardware using Wine, provided native drivers for your hardware are installed and equivalent to the Windows drivers. Open source Linux graphics drivers in particular are often inadequate to run games that work fine on the same hardware in Windows. If there is no native driver for your hardware, Wine will not be able to use it.

Does Wine run on all Unix filesystems?

Mostly. Wine is written to be filesystem independent so MS Windows applications should work on virtually any full-featured UNIX filesystem. The key exception is that not all filesystems / drivers support every feature of fat32 or NTFS. One example is that the ntfsv3 drivers do not support shared-write mmap, a feature that cannot be emulated and is used by applications such as Steam.

One other point is that Wine is a weird application in ways and some programs work better on case-insensitive filesystems (see Case Insensitive Filenames for more details).

Will Wine run only under X?

Until recently with projects such as Wayland, serious alternatives to x11drv weren't even on the horizon so development has focused on X. However, Wine's interface with the graphics driver is designed to be abstract so supporting future graphics systems will hopefully be straight-forward.

Which version of Wine should I use?

Short answer: Use the version that works best with the particular applications you want to run. In most cases, this will be the latest development version; however, in some cases it may take some experimenting to find it.

Longer answer: Wine development is rapid, with new releases in the development branch every two weeks or so. Functionality will usually be best with the most recent development version, however, there are cases where changes to existing code in Wine cause applications that worked well in older versions to not work in the new one (these are called regressions), as well as problems caused by the introduction of new, but as-yet-incomplete and untested, functions.

A good rule of thumb is to start with the version of Wine installed with your distro and see if that works with the applications you want to use. If it does, good! If it doesn't, upgrade. In most cases the upgrade should be to the latest development version, but it is a good idea to check Bugzilla and the AppDB for any known regressions and/or new bugs. If you find an existing bug marked STAGED, this means there is a patch for the problem in wine-staging (the experimental branch), and you should try the latest version in that branch. If there are known bugs without a STAGED patch or easy workaround, upgrade to the most recent version of Wine known to work for your application.

While Wine does have a "stable" branch, the term "stable" refers to the branch as a whole, which is infrequently updated, and (for the minor stable releases) only with bugfixes promised not to break functionality. Users of a development or staging release can achieve the same degree of stability by simply not upgrading. Note that user support for the stable branch is limited to the ability to file AppDB test reports. Users who ask for help on the forum/IRC or file bug reports for the stable branch will be asked to retest in the current development release.

The current stable, development, and staging releases are listed on the WineHQ home page. See Wine User's Guide#Wine from WineHQ for a description of the three branches and the version numbering system.

How do I install Wine?

  • Use a precompiled binary package for your operating system/distribution (see the Download page for links and additional information).
  • Compile Wine from source - if you can't find an up-to-date package for your OS/distribution

I have a problem installing my distro's Wine package and need help

WineHQ only supports the binary packages that we build (available here, only the ones listed under 'WineHQ Binary Packages'). Consult your distro's support channels for help using your package manager and interpreting any error messages you may be receiving if you're having problems with distro packages. If you are an experienced user and believe there is a problem with the package itself and/or the repository, please report it to your distro's Wine package maintainer.

Can I install more than one Wine version on my system?

Yes, but you will have to build Wine yourself (see Building Wine), as it is not possible to have multiple distro packages installed. The easiest way to do this is to run Wine from the build directory (don't do make install). If you want to actually install multiple versions, use --prefix when building Wine to designate a different install directory for each version, e.g.

./configure prefix=path_to_install_directory && make 

then install it with

sudo make install 

On Linux, even this step is not enough: you must also set environment variables so that the wine executable on your $PATH finds the right shared libraries. Assuming that the path to install directory is $W, then for Wine version 1.4, the following settings appear to be sufficient:

export WINEVERPATH=$W
export PATH=$W/bin:$PATH 
export WINESERVER=$W/bin/wineserver
export WINELOADER=$W/bin/wine
export WINEDLLPATH=$W/lib/wine/fakedlls
export LD_LIBRARY_PATH="$W/lib:$LD_LIBRARY_PATH" 

The LD_LIBRARY_PATH is definitely required.

Note that regardless of whether you install multiple versions or run them from the build directory, you will still have to designate which version of Wine you wish to use when running applications. It is also recommended that applications being run with different Wine versions be installed into separate wineprefixes.

Is there a 64 bit Wine?

Yes. 64 bit Wine has been available on Linux since 1.2. WineHQ binary packages are available for 64 bit, and most major distros package it for users. Normally, installation should be as simple as installing the Wine package for your distribution through your package manager. Check the Download page. If you are building Wine from source, see Building Wine for instructions on how to build 32 bit Wine on a 64 bit system and instructions on how to build 64 bit Wine in a shared WoW64 setup.

A few things to note:

  • 32 bit Wine runs on both 32-bit and 64-bit Linux/Unix installations. 16-bit and 32-bit Windows applications will run on it.
  • 64-bit Wine runs only on 64 bit installations, and so far has only been extensively tested on Linux. It requires the installation of 32 bit libraries in order to run 32 bit Windows applications. Both 32-bit and 64-bit Windows applications (should) work with it; however, there are still many bugs.
  • Current Wine includes support for 64 bit Wine on Mac OS X; however, this has not been tested very much, and some applications may never work due to an ABI incompatibility between Win64 and OS X.

Where can I find old Wine binary packages?

Old WineHQ binary packages are kept in their respective directories in the the WineHQ download server.

Consult your distro for information on obtaining old versions of distro Wine packages.

How do I install Wine on my netbook (eeePC, Acer Aspire One, etc.)?

If you have replaced the customized distro that came preinstalled on your netbook (Xandros, Linpus, etc.) with one of the mainstream distros that provide up-to-date Wine packages, you should be able to install Wine as normal for that distro.

If you are still using Xandros (eeePC), Linpus (Acer Aspire One) or any other customized distro, you will have to ask on your netbook's support forum. Only other users of those distros can advise you on what, if any, binary packages will work on your system, where to find them, and how to install them.

You can also try building Wine from source following the instructions in Building Wine, but you will still need to consult your netbook's support forum regarding satisfying dependencies on your particular system.

Installing on Apple

How do I install Wine on my Mac?

  • WineHQ Packages are available for macOS 10.8 and higher.
  • Build and install Wine using Homebrew, MacPorts, or Fink to install Wine. All support the current releases of macOS. The MacPorts installation of Wine will automatically install any necessary Dependencies for a Wine installation.
  • If this is too complicated, there are several third party apps you can use like Codeweavers' CrossOver Mac.
  • Linux: If you are running Linux on your Mac, installing Wine is as simple as installing it under Linux on a PC. Visit the Download page for more info.

Can I use Wine on an older Mac without an Intel chip?

No, not even in Linux. Older Macs used PowerPC processors are incompatible with code compiled for x86 (Intel and AMD) processors, unless the code is run under CPU emulation. Wine Is Not a (CPU) Emulator, nor does it include one. The Darwine project was an effort to do just that, but it has not been maintained in many years.

Compiling Wine

How do I compile Wine from source?

See Building Wine.

How do I apply a patch?

You have to build Wine from source; see above.

Uninstalling

How do I uninstall Wine?

Uninstalling Wine itself will not revert your Wine settings or uninstall your Windows apps, which are permanently stored in your user's home directory. Do not uninstall Wine if you only wish to remove all of your settings and apps. For instructions on removing your Wine settings and apps, see #How do I wipe the virtual Windows installation?

  • If you installed Wine with your distribution's package manager, use it again to uninstall Wine.
  • If you installed Wine from source, use sudo make uninstall in the source directory to remove it.

How do I uninstall individual Windows applications?

You can run Wine's uninstaller command; this is like Windows' "Add/Remove Programs" function. To uninstall 64 bit applications, including wine-mono, you need to run it with wine64. The uninstaller should remove menu and desktop entries... but it's not well tested; it might not work with all apps. See below for a reliable way to remove *all* Windows apps.

How do I clean the Open With List?

To clean Open With List, please carefully paste the following commands into a terminal:

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* 

How do I wipe the virtual Windows installation?

You can remove your virtual Windows installation and start from scratch by deleting the hidden .wine directory in your user's home directory. This will remove all of your Wine settings and Windows applications. The simplest and safest way to do this is through your file manager. Simply set your file manager to show hidden files, browse to your home directory, and delete .wine the same way you would any other directory. If you want to keep it as a backup, you can rename or move it instead. To the host system, a wineprefix is just another directory that can be deleted, moved, renamed, etc., the same as any other directory.

If you prefer to do it from the command line, carefully paste the following commands into a terminal:

cd
rm -rf .wine 

To rename it from the command line instead of deleting it:

mv ~/.wine ~/.wine-old 

Your Windows applications, though deleted, will remain in your system menu (remaining desktop files and icons are located in ~/.local/share).

To remove these leftover menu entries, carefully paste the following commands into a terminal:

rm -f ~/.config/menus/applications-merged/wine*
rm -rf ~/.local/share/applications/wine
rm -f ~/.local/share/desktop-directories/wine*
rm -f ~/.local/share/icons/????_*.{xpm,png}
rm -f ~/.local/share/icons/*-x-wine-*.{xpm,png} }}}

Alternatively, you can stop Wine from creating menu entries in the first place.

Installing and Running Windows Applications

I have lots of applications already installed in Windows. How do I run them in Wine?

Short answer: you have to install them in Wine just like you did in Windows. Applications usually have a setup or installer program.

Long answer: some applications can be copied from Windows to Wine and still work, but don't try this unless you like tinkering under the hood of your car while it's running.

Wine is not designed to interact with an existing Windows installation. If you have any data you need from a Windows installation, browse your Windows filesystems in your normal file manager and copy the data to another location.

Do not try to configure Wine to point to your actual Windows C:\ drive. This will break Windows and require a Windows reinstall. We have tried to make this hard to do, so you probably cannot do it by accident. If you do manage this, Wine may or may not continue to operate, but your Windows install will be 100% dead due to critical parts of it being overwritten. The only way to fix Windows after this has happened is to reinstall it.

How do I run an installer using Wine?

See Wine User's Guide#How to install and run Windows programs.

How do I run an application once I've installed it?

See Wine User's Guide#How to install and run Windows programs

How should I start Windows programs from the command line?

See Wine User's Guide#How to run Windows programs from the command line.

How do I pass command line arguments to a program?

See Wine User's Guide#Passing Windows command-line arguments

How do I install/run a .msi file?

See Wine User's Guide#Running .msi files.

How do I install/run a ClickOnce (.application) file?

Use winetricks to install whatever version of .NET the program requires, cd to the directory containing the .application file, and run it with

wine start whatever.application

How do I launch native applications from a Windows application?

First, run regedit and add a dot character to the end of the list of extensions in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATHEXT.

Note that this change will have to be made every time you upgrade Wine, as it will be reverted whenever the wineprefix is updated.

You can then start native applications using wine cmd if you specify the full path or use the shell, e.g.:

wine cmd /c /usr/bin/glxgears 

or

wine cmd /c /bin/sh -c glxgears 

You might also need winepath to translate the filename from Windows format to Linux format (see How do I associate a native program with a file type in Wine?).

My installer tells me I don't have enough free disk space

Usually, you really don't have enough free disk space. Wine's C: drive is located in your home directory. Whatever partition contains /home must have enough free space for your program. You can check by running:

df -h ~ 

If the amount of space you need is less than 1 GB, and df reports you have more than 1 GB available, try setting the Windows version to Windows 98. This will work around bugs in some old (Windows 98 era) installers that could not cope with large drives.

If you want to use a different partition that has more free space, use a wineprefix that is located on the other partition. Note that your other partition must be a Unix filesystem: FAT and NTFS partitions will not work. See #How can I run two programs as if they were on different computers? for instructions.

When I double-click on a .exe file in my file manager, nothing happens

Note: if you can, start applications by clicking on the application's icon in the Applications / Wine menu or desktop instead. Double-clicking .exe files is typically only needed for applications that aren't installed yet, e.g. to run the setup.exe on a CD-ROM game or a downloaded installer.

If double-clicking doesn't work, you might need to right-click the file and choose "Run with Wine". It depends on your file manager. If that also doesn't work, contact whoever built your Wine packages and let them know there's a problem.

You can work around this by using the command line instead of your file manager (see Wine User's Guide#How to run Windows programs from the command line).

I double-clicked on an .exe file, but the system said "The file foo.exe is not marked as executable..."

If the dialog says "Read about the executable bit", with a hyperlink, try clicking on the hyperlink and reading about the executable bit.

If the file is on your hard drive, right-click it, choose Properties / Permissions, and check "Allow executing file as program".

If the file is on a CD-ROM, you can run it from the command line as described above. Or, if you know how to use mount, remount the cd-rom to mark all files as executable with a command like mount -o remount,mode=0777,exec /media/cdrom but using the real mount point if it's different from /media/cdrom.

Using Wine

How do I run Wine?

Wine is not an application you run. Wine enables your computer to run Windows applications. Simply install and run your applications as you would in Windows. See #How do I run an installer using Wine?.

Should I run Wine as root?

NEVER run Wine as root! Doing so gives Windows programs (and viruses) full access to your computer and every piece of media attached to it. Running with sudo also has these same risks but with the added bonus of breaking the permissions on your ~/.wine folder in the process. If you have run Wine with sudo you need to fix the permission errors as described in the next question, and then run winecfg to set Wine up again. You should always run Wine as the normal user you use to login.

For Linux systems, all ideas that Wine needs root can be solved through Posix Capabilities or Posix File Capabilities or correcting other security settings.

As far as Windows programs are concerned, you are running with administrator privileges. If an application complains about a lack of administrator privileges, file a bug; running Wine as root probably won't help.

I ran wine with sudo or as root. How do I fix my permission errors?

You need to fix the permissions on your ~/.wine directory, this is where all Wine state, configuration and any important data you might have such as installed programs, saved data within Wine programs, etc. are stored. Once you delete or fix the permissions on this directory, rerun Wine as a regular user always! Run the following to fix the permissions on your ~/.wine directory if it now has root permissions.

cd $HOME
sudo chown -R $USER:$USER .wine

How do I know what version of Wine I have?

Open up a terminal and run wine --version. It will say something like "wine-1.9.2"; if you are using Git then you will have a version along the lines of "wine-1.9.2-231-gb922b55".

TIP: You can find out what the latest release of Wine is from WineHQ's main page. Currently, Wine development releases come out every two weeks. Your operating system may ship with an out of date (obsolete) version of Wine. Depending on what OS you use, you may be able to add an update source to your package management system to keep up to date. Check the Download page for details.

Wineprefixes

Where is my C: drive?

Wine uses a virtual C: drive instead of your real C: drive. The directory in which this is located is called a 'wineprefix.'

By default, it's in your home directory's .wine/drive_c subdirectory. (On macOS, see the macOS FAQ for how to find this.)

See also the WINEPREFIX environment variable; if this is set, wine uses it to find the wineprefix.

Can I store the virtual Windows installation somewhere other than ~/.wine?

Yes: ~/.wine is just the default wineprefix (a.k.a. "configuration directory" or "bottle").

You can change which prefix Wine uses by changing the WINEPREFIX environment variable (outside Wine). To do this, run something like the following in a terminal:

export WINEPREFIX=~/.wine-new
wine winecfg 

Wine will then create a new prefix in ~/.wine-new.

To use the default prefix, use the command unset WINEPREFIX . Or just set WINEPREFIX to ~/.wine.

Alternatively, you can specify the wine prefix in each command, e.g.

WINEPREFIX=path_to_wineprefix wine winecfg 

You can rename, move, copy and delete prefixes without affecting others, and each prefix has its own wineserver instance.

Wherever you see ~/.wine or $HOME/.wine in this Wiki, you can usually replace it with $WINEPREFIX.

How do I create a 32 bit wineprefix on a 64 bit system?

At present there are some significant bugs that prevent many 32 bit applications from working in a 64 bit wineprefix. To work around this, you can create a new 32 bit wineprefix using the WINEARCH environment variable. In a terminal, type:

WINEARCH=win32 WINEPREFIX=path_to_wineprefix winecfg 

(use the actual path to the wineprefix) Do not use an existing directory for the new wineprefix: Wine must create it.

Once a 32 bit wineprefix is created, you no longer have to specify WINEARCH in the command line to use it, as the architecture of an existing wineprefix cannot be changed. Note that if the wineprefix is not the default (~/.wine, you do have to specify the WINEPREFIX variable when installing anything (including winetricks) to it:

WINEPREFIX=path_to_wineprefix wine start /unix path_to_installer

Why aren't versions of Windows prior to XP available in 64 bit wineprefixes?

Short answer: because there were no 64 bit versions of Windows prior to XP.

If you are on a 64 bit system, you will have to create a 32 bit wineprefix to be able to select a version of Windows older than XP in winecfg.

How can I run two programs as if they were on different computers?

Example: You have server and client programs. One won't run in the presence of the other.

Using different wineprefixes will help you here, since they simulate two Windows computers, in essence.

Run the first program as normal:

wine first-program.exe

The second needs to be run in a different prefix, so we need to change the WINEPREFIX environment variable:

WINEPREFIX="$HOME/.wine-second" wine second-program.exe 

The first-program.exe and second-program.exe can be two copies of the same program.

Configuring

How do I get Wine to launch an application in a virtual desktop?

You can do this with winecfg. Add the application in the Applications tab and then, in the Graphics tab, enable "Emulate a virtual desktop".

You can also use the following command:

wine explorer /desktop=name,1024x768 program.exe 

Replace program.exe with the name of your program, and change the resolution to the size of the virtual desktop you want. Changing name allows you to open several desktops simultaneously.

How do I edit the Wine registry?

The Wine registry is stored in the .reg files in ~/.wine, however you should not edit these files by hand due to the encoding that they use. Always use the regedit program that comes with Wine. This can be run by typing wine regedit in the terminal. Wine's regedit is virtually identical to the Windows version of regedit and also supports importing and exporting of registry files. NEVER try and import your entire Windows registry, this will just break Wine.

See also: Useful Registry Keys

How do I associate a native program with a file type in Wine?

There are two ways using which you can associate a native program with a file type. The first method is to use winebrowser and an alternative would be to write a shell script.

The example below uses winebrowser to launch the default PDF handler on your system (on a Unix desktop it uses xdg-open). Save the lines below to a file pdf.reg.

[HKEY_CLASSES_ROOT\.pdf]
@="PDFfile"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
@="winebrowser \"%1\"" 

Import the .reg file into the registry using the command

regedit $HOME/pdf.reg 

Another option is to use a shell script to call a native application. Save it as run_linux_program under $HOME/bin:

#!/bin/sh $1 "`wine winepath -u "$2"`" 

Don't forget to run chmod a+x $HOME/bin/run_linux_program to make it executable. Also make sure that $HOME/bin directory is in your $PATH. Otherwise it will not work.

To associate (say) .pdf files with the acroread Linux program save the following as $HOME/pdf.reg and then import it with the command regedit $HOME/pdf.reg:

[HKEY_CLASSES_ROOT\.pdf]
@="PDFfile"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
@="/bin/sh run_linux_program acroread \"%1\"" 

You can reuse this script and just edit the registry file. For example to associate .doc documents with OpenOffice (ooffice):

[HKEY_CLASSES_ROOT\.doc]
@="DOCfile"
"Content Type"="application/msword"
[HKEY_CLASSES_ROOT\DOCfile\Shell\Open\command]
@="/bin/sh run_linux_program ooffice \"%1\"" 

How can I prevent Wine from changing the filetype associations on my system or adding unwanted menu entries/desktop links?

Beginning with wine-3.14, winecfg has a "Manage File Associations" checkbox on the Desktop Integration tab. Checking it enables winemenbuilder to create file associations and unchecking it disables that behavior.

Users of older Wine versions and those who also want to disable the creation of menu items can accomplish this by disabling winemenubuilder.exe . There are several ways to do this:

  • In winecfg: before running the installer, run winecfg. Go to the Libraries tab and type winemenubuilder.exe into the "New overrides" box (it is not in the dropdown list). Click add, then select it from the "Existing overrides" box. Click "Edit" and select "Disable" from the list, then click "OK".
  • Registry file: If you need to apply the setting many times (e.g. every time you recreate the Wine prefix), this approach may be more convenient. Create a text file named with extension .reg (e.g., disable-winemenubuilder.reg) containing the following:
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"winemenubuilder.exe"="" 

To apply the setting, run:

regedit disable-winemenubuilder.reg
  • Environment variable: set the WINEDLLOVERRIDES environment variable when you run the installer, e.g.,
WINEDLLOVERRIDES=winemenubuilder.exe=d wine setup.exe 

Users who frequently create new wineprefixes may wish to put WINEDLLOVERRIDES=winemenubuilder.exe=d in their .bashrc to avoid having to specify it for every wineprefix.

How do I disable the GUI crash dialog?

Wine includes a GUI crash dialog that is turned on by default. Users of apps that work despite a background crash may find the GUI dialog annoying, and in some cases the dialog itself has been reported to prevent an app from working.

The easiest way to disable the crash dialog is with winetricks:

sh winetricks nocrashdialog 

If you prefer to do it manually, copy the following key to a text editor:

[HKEY_CURRENT_USER\Software\Wine\WineDbg]
"ShowCrashDialog"=dword:00000000 

Save the file with a .reg extension (e.g. crashdialog.reg), then apply it with regedit:

regedit crashdialog.reg 

(You may need to specify the full path to the file, depending on where you saved it.)

To turn the GUI crash dialog back on, change 00000000 to 00000001 and reapply.

These changes can also be made by simply running regedit and adding/changing the appropriate key the point-and-click way.

How can I make Wine fonts anti-aliased?

Support for subpixel font rendering was added to Wine in version 1.1.12, but it may not be enabled. Use winetricks and select one of the fontsmooth-gray, fontsmooth-rgb or fontsmooth-bgr options.

How do I change the DPI (font size)?

First, you should try editing with winecfg. Go to the Graphics tab, and slide the "Screen Resolution" slider accordingly. Changes will not effect the winecfg window until you restart it.

If windows and fonts are so big you can't get to the controls in winecfg, see #Wine's windows and fonts are extremely large.

How do I configure a proxy?

If you want to use a proxy server for all HTTP connections, simply set the http_proxy environment variable. On many Linux distributions, configuring a network proxy, e.g. with the Network Proxy tool, does this for you automatically.

Alternatively, you can configure a proxy in the registry. There are separate locations for wininet.dll and winhttp.dll.

For wininet, use regedit to add the following values to the [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] key:

"ProxyEnable"=dword:00000001
"ProxyServer"="proxy-server-address:port" 

At present, Wine's wininet.dll does not support proxy autoconfiguration (PAC) scripts.

For winhttp, you'll need to use the proxycfg.exe utility to configure the registry. This utility is available in the system32 directory of a Windows installation, and MSDN describes its usage.

Limitations and Risks

Can Wine run in character mode?

Most of Wine's development effort is geared towards programs written for the Windows GUI, but some limited support for character mode is available with the "null" driver. Wine automatically activates "null" whenever x11driver isn't loaded, but even then, Wine depends on the xorg libraries.

Also the "null" driver will only work for pure console applications that never use any windowing functions (for example, parts of OLE create purely internal windows).

See Wine User's Guide#Text mode programs (CUI: Console User Interface) for more information.

Can I install applications to be shared by multiple users?

Wine does not currently allow sharing its configuration ("prefixes") between users, due to the risk of registry corruption from running multiple wineservers simultaneously bug #11112. At present, applications must be installed separately for each user.

However, you can copy Wine prefixes; you can install everything to one prefix, then make a copy of it in each user's home directory. This saves running installers repeatedly.

Can I use Wine to install drivers for my hardware?

No. Wine requires your hardware to already be working on your operating system. The technical reason for this is that Wine, like most applications, runs in user mode and not kernel mode.

Is Wine malware-compatible?

Yes. Just because Wine runs on a non-Windows OS doesn't mean you're protected from viruses, trojans, and other forms of malware.

There are several things you can do to protect yourself:

  • Never run executables from sites you don't trust. Infections have already happened.
  • In web browsers and mail clients, be suspicious of links to URLs you don't understand and trust.
  • Never run any application (including Wine applications) as root (see above).
  • Use a virus scanner, e.g. ClamAV is a free virus scanner you might consider using if you are worried about an infection; see also Ubuntu's notes on how to use ClamAV. No virus scanner is 100% effective, though.
  • Removing the default Wine Z: drive, which maps to the unix root directory, is a weak defense. It will not prevent Windows applications from reading your entire filesystem, and will prevent you from running Windows applications that aren't reachable from a Wine drive (like C: or D:). A workaround is to copy/move/symlink downloaded installers to ~/.wine/drive_c before you can run them.
  • If you're running applications that you suspect to be infected, run them as their own Linux user or in a virtual machine (the ZeroWine malware analyzer works this way).

How good is Wine at sandboxing Windows apps?

Wine does not sandbox in any way at all. When run under Wine, a Windows app can do anything your user can. Wine does not (and cannot) stop a Windows app directly making native syscalls, messing with your files, altering your startup scripts, or doing other nasty things.

You need to use AppArmor, SELinux or some type of virtual machine if you want to properly sandbox Windows apps.

Note that the winetricks sandbox verb merely removes the desktop integration and Z: drive symlinks and is not a true sandbox. It protects against errors rather than malice. It's useful for, e.g., keeping games from saving their settings in random subdirectories of your home directory.

Applications

What applications/services conflict with Wine?

Many distributions are moving towards enabling Compiz/Beryl/other eye candy by default. The problem is that these programs conflict with Wine over the display driver. Disable these programs before using any applications with Wine (especially games, or when noticing weird window problems). Also, disabling the Composite extension in /etc/X11/xorg.conf will most certainly prevent compositing from affecting Wine.

Keyboard tools such as IBUS, xneur (gxneur, kxneur) and SCIM have been reported to conflict with keyboard input in Wine.

Does Wine support .NET? Should I install native .NET in Wine?

Recent versions of Wine will prompt you to download wine-mono on wineprefix creation. For many .NET apps, particularly older ones, this is sufficient.

If wine-mono does not work for your app/game, file a bug (if one has not been already filed), and try native .NET. You can install it by running winetricks and selecting the appropriate .NET version. Note that native .NET can at present only be installed to a 32 bit wineprefix, so if your app/game is 64 bit, you are out of luck for now.

Does Wine support DirectX? Should I install Microsoft's DirectX under Wine?

Wine itself provides a DirectX implementation that, although it has a few bugs left, should run fine. Wine supports DirectX 9.0c at this time. Work on DirectX 10 is underway.

If you attempt to install Microsoft's DirectX, you will run into problems. It is not recommended nor supported by Wine HQ to attempt this. You can install the runtime, but it will not run. The runtime needs access to the Windows drivers, and Wine cannot access them for obvious reasons. The only native Microsoft DLLs that could be useful anyway are the d3dx9_xx.dll type ones, and these require you to accept Microsoft's license. Additionally, versions of these DLLs are now part of the Wine tree. So, as Wine improves these DLLs will only become less relevant.

That said, there are some guides out there which describe how you can install Microsoft's DirectX. We reiterate: it is not recommended nor supported by Wine HQ to attempt this. Furthermore it is considered off topic in Wine HQ support mediums (such as the forums). Please use a clean Wine configuration folder before seeking help (delete your ~/.wine or use another wineprefix and re-install your Windows applications).

Does Wine support Internet Explorer? Should I install Microsoft's Internet Explorer in Wine?

Wine uses the core of Firefox to implement its own Internet Explorer replacement (wine-gecko). Recent versions of Wine should prompt you to install it on wineprefix creation. In most cases Wine's IE replacement (wine-gecko) is sufficient.

If you really need the real IE for a specific application to work, use winetricks to install ie6, ie7 or ie8. You should put IE in a separate wineprefix, with whatever app really needs it. Note that the Wine project does not support installing the real Internet Explorer, as it requires a huge number of native DLLs, which is hard to configure. Please do not ask the Wine project for help if you run into problems.

You may also try commercial solutions, such as CrossOver, but if you do so and run into problems, do not seek help on the forum/mailing list or IRC, as third party applications such as these are not supported here.

Why doesn't Wine work well with some copy protection?

Copy protection uses several "dirty" methods to detect if discs are "real" or not. Some of these methods work in Wine but many do not, such as the extremely invasive StarForce system. Wine would need to be altered to allow for almost rootkit-like functionality of programs to get some of these copy protection schemes to work, so support is likely to be a long time off if ever (some people use illegally modified or "cracked" games with the copy protection removed, but the Wine project cannot advocate that).

See also our page on copy protection.

I followed a howto I found on a website, and the application still doesn't work

There are many unofficial howtos for various apps posted on blogs and forums. They are rarely maintained by their authors, and because of Wine's rapid rate of development, even ones that were correct at the time they were posted can quickly become outdated. Applying tweaks that are no longer needed in current Wine can actually prevent an app that now runs fine without tweaks from working at all (Office 2007 is a prime example). The only howtos supported here are the ones on this site. If you insist on following an outside one, ask its author for help.

If in doubt, start again installing the app in a fresh wineprefix and ask for help on the user forum.

I used a third party application (PlayOnLinux, WineBottler, etc.) to install or manage applications in Wine and need help

Consult the support channels for whatever third party application you used. Links to some of these outside applications are provided as a convenience on the Third Party Applications page, but they are not supported here. Before seeking help on the forum/mailing list/IRC or filing bugs, reinstall your Windows application using plain Wine.

My application worked with an older version of Wine, but now it's broken!

This is called a regression. Please perform a regression test to identify which patch caused it, then file a bug report and add the "regression" keyword: we'll pay special attention to it, since regressions are a lot easier to fix when caught early.

I really need this particular application to work. How can I go about making this happen?

Briefly, you can improve Wine yourself, convince someone else to do it for you, or try some complicated hacks involving native Windows DLLs rather than Wine's unfinished ones.

I'm writing a Windows app. How can it detect if it's running under Wine?

This is a bad idea. See the Developer FAQ.

Performance

My 3D application/game is very slow (FPS)

Usually a 3D performance issue, indicates that something is wrong with your OpenGL 3D drivers. See 3D Driver Issues for more information.

Is Wine slower than just using Windows?

Actually, Wine is sometimes faster. The speed of an application depends on a lot of factors: the available hardware and their drivers, the quality of the code in the APIs the application uses, and the quality of the code in the underlying operating system.

Driver code matters a lot. If you're running a graphics-heavy application using a video card with very poor drivers such as an ATI card under Linux, performance will degrade substantially. On the other hand, Linux has superior memory management, and comes out ahead of Windows in many CPU-related tasks.

Sometimes, bugs in Wine can make applications excessively slow. That said, Wine works on correctness first, performance second.

See Performance for more information.

I get lots of "fixme:" messages in the terminal and Wine runs a bit slow

Ignore them. Generally speaking, a fixme message will not make much sense to someone unfamiliar with Wine development. They are for Wine developers. Also, it's important to understand that fixme messages often do not indicate a serious problem. Many applications will work fine even though Wine prints a few fixme messages. That said, they can still sometimes provide insight into how a particular application works (or doesn't work).

If there are a very large number of these messages scrolling repeatedly, you can sometimes speed Wine up a little by turning them off altogether. You can do so by setting the WINEDEBUG environment variable to -all. For example, your command line could look something like:

WINEDEBUG=-all wine program.exe 

More advanced users and programmers interested in debugging Wine should see Debug Channels and the Developers wiki pages. Here's an example to selectively turn off fixme messages from dsound and part of D3D only:

WINEDEBUG=fixme-dsound,fixme-d3d_surface wine program.exe

Troubleshooting

General

How can I get a debugging log (a.k.a. terminal output)?

Run your application from the command line (see Wine_User's_Guide#How_to_run_Windows_programs_from_the_command_line).

You can then copy the log from the screen and paste it into a file if it's short; otherwise redirect the output of wine to a file using a Unix shell redirection, e.g.

cd ~/.wine/drive_c/Games/Tron
wine tron.exe &> log.txt 

Important: Unless you have been asked specifically to provide a debug trace then do not do so. Simply follow the instructions above.

Important: If you get a crash dialog while doing this, please click Close. Otherwise your log will be incomplete.

Important: If the resulting text file doesn't have names of C source files in it, your copy of wine probably lacks debugging symbols. Please either build wine from source, or install the debug symbols package.

How do I get a debug trace?

Note: Please only use this procedure when instructed. In most cases a regular terminal output is enough (see above). When filing bugs, it is often necessary to get additional debug trace (generally +relay,+seh, but you might be asked for specific debug channels). To retrieve a trace, run:

WINEDEBUG=+relay,+seh,+tid wine your_program.exe >> /tmp/output.txt 2>&1 

Then attach /tmp/output.txt to the bug. If the resulting file is larger than 1 MB, compress it with bzip2 or rzip before attaching. There are some cases where the bug seems to disappear when WINEDEBUG is used with the right channel. Please mention that in the bug report. For a list of debug channels that are available in Wine, see Debug Channels

Crashes and Freezes

My program froze up, how do I close it?

If you ran the program from a terminal window by typing wine program.exe, you can usually just go back to that terminal window and press Ctrl+C. If you ran the application some other way, such as from a launcher shortcut, then you can open up a terminal and forcibly kill the process:

killall -9 Application.exe

If you want to kill all Wine programs at once, you can run:

wineserver -k 

You can also open up a Wine version of the Windows task manager by running wine taskmgr in a terminal. This will allow you to kill individual Wine processes.

My whole computer freezes, reboots, or shuts off when I run my game in Wine!

If you are getting a complete deadlock and are unable to even use your mouse after running Wine, it's probably not a specific problem with the Wine software. Wine is a user-level process, and shouldn't be able to completely hang the operating system under any circumstances. Instead, Wine is likely exposing a deeper problem with the system, such as a defective hardware driver, a bad memory stick, or overclocking flakiness.

It's often a graphics driver problem, in which case non-Wine apps might also be affected. If running glxgears also crashes, it's definitely a graphics driver problem. The most common cause is upgrading to a new kernel without also updating the graphics drivers to match. Try reinstalling your graphics drivers.

If the computer is a laptop and shutting itself off entirely, a likely cause is overheating. Some laptops have problems with cooling to begin with, and the Linux ACPI code controlling fans is known to be buggy.

If that doesn't help, ask for help on the wine-users forum. Be sure to mention the name of the app, the version of Wine, the output of cat /etc/issue , lspci | grep -i vga , and, if you're using the proprietary NVidia drivers, cat /proc/driver/nvidia/version . Maybe someone can help.

Every app I try to start crashes

You may have a messed-up .wine directory (aka wineprefix). For instance, if you install an app that starts a service when the system boots, and that service crashes, you'll see a crash every time you start wine.

To work around this, try removing your .wine directory and reinstall your apps, but skip the one that broke things.

Warning and Error Messages

My application says some DLL or font is missing. What do I do?

Applications should come with all the DLLs they need (except for core Windows DLLs). They sometimes forget to, and rely on you to already have the DLL or font installed. You can install the missing DLL or font in several ways:

  • downloading it from the original creators of the runtime (e.g. Microsoft). The easiest way to do this is with winetricks.
  • install other applications which do include them.
  • copy it from a licensed version of Windows installed on the same machine.

Do not download DLLs or scripts from websites you do not know and trust! Fake or infected DLLs can cause you great pain, even on Wine.

See the winetricks wiki page for more information on winetricks.

Too many open files, ulimit -n probably needs to be increased

Your operating system is probably living in the past, and has too low a hard limit on the number of open file descriptors. (See https://bugs.launchpad.net/ubuntu/+bug/663090 for why raising the hard limit is the right thing to do, and why raising the soft limit by default is dangerous.)

For Ubuntu and most modern versions of Linux, you can edit /etc/security/limits.conf as root, and change the line

* hard nofile 2048 (or whatever the current limit is) 

to

* hard nofile 8192 

(The asterisk means 'for all users'.)

Then log out and log in again, and do ulimit -H -n. It should show 8192 now, and Wine should have access to more file descriptors.

Here's another method that's more portable (might even work on Mac OS X), but only works temporarily, and only raises the limit for apps started from the current terminal window:

$ sudo bash
# ulimit -n 8192
# su yourusername $ wine yourprogram.exe

preloader: Warning: failed to reserve range 00000000-60000000 or winevdm: unable to exec 'application name': DOS memory range unavailable

This issue is being followed in bug 12516.

The cause is a Linux kernel setting. Run cat /proc/sys/vm/mmap_min_addr as root: if it does not equal 0 then running sysctl -w vm.mmap_min_addr=0 as root can be used to temporarily fix the issue; to fix it permanently, add the line vm.mmap_min_addr=0 to /etc/sysctl.conf. Please record if you do this alteration, as the area Wine needs may change.

See Preloader Page Zero Problem for more information.

Failed to use ICMP (network ping), this requires special permissions

On *NIX systems ICMP ping requires use of raw sockets, which is limited to super user (root) only. And running Wine as root is a bad idea. Fortunately newer versions of Linux allow granular permission control to grant only required permissions to specified files.

To allow Wine opening raw sockets run this command:

sudo setcap cap_net_raw+epi /usr/bin/wine-preloader 

Note: This works with default binary Wine install only on most distros. WineHQ packages install Wine to /opt/wine-stable, /opt/wine-devel/, or /opt/wine-staging. Self-compiled Wine will be located under /usr/local/bin. The 64-Bit name is wine64-preloader. Third party Wine wrappers (such as PlayOnLinux) might keep Wine binary in other places. You will need to rerun the command after updating Wine.

To remove the permissions use:

sudo setcap -r /usr/bin/wine-preloader

err:virtual:map_image failed to set 60000020 protection on section .text, noexec filesystem?

This can be caused by filesystems mounted with user or noexec options, or by SELinux. Make sure the app in question isn't on a funny filesystem, or try disabling SELinux temporarily.

Broken NVIDIA RandR detected, falling back to RandR 1.0

RandR is a protocol used by applications to talk to the X server to change screen resolution, among other things. nVidia's proprietary drivers for GNU/Linux intentionally do not properly implement newer versions of RandR, which Wine normally relies upon. This could present problems, particularly in software that attempts to change resolution or output to multiple monitors. (See bug 34348)

The open source Nouveau driver is not affected by this issue, and is the recommended solution for users who do not need the proprietary driver for any of their apps or games. Users who require the proprietary driver should try the workaround described below.

Many applications will attempt to start in lower resolutions if (and only if) they are available - but will happily use a higher resolution if that is the only option. In this case, you may be able to avoid a crash on nVidia drivers by forcing your X server to only support your monitor's native resolution and nothing else. This has proven to work for a range of games.

To make this change to Xorg, edit (as root) /etc/X11/xorg.conf and add the following line:

    Option         "metamodes" "1920x1080 +0+0"

within the Screen section (changing 1920x1080 to whatever supported resolution you require).

Upon restarting Xorg, you can test your changes using the xrandr command. xrandr should list your chosen resolution, and xrandr --q1 should do the same. There should not be any additional resolutions listed. You may now re-test your Windows application, hopefully with more success. Remember to comment out the line and restart Xorg when you are finished if you need other resolutions working for other software.

Graphics

My application complains about being unable to change the resolution or color depth

You generally need to edit the Screen section of your /etc/X11/xorg.conf to support additional color depths and resolutions. There may also be a problem with Xrandr.

The application I am trying to run complains that it needs 256 colors but I have millions!

The inability to switch from 24bpp mode to 8bpp mode is a limitation of X, not a bug in Wine. See 256 Color Mode for some possible workarounds.

My X screen won't go back to its normal resolution after running a game fullscreen

You can often work around this by changing the screen resolution and then changing it back again under the system preferences.

Alternately, you can run this terminal command to restore your X settings:

xrandr -s 0

I'm using Desktop Effects with Compiz, Fusion, or XGL and get poor performance/odd messages/broken applications

Using compositing managers in X11 tends to cripple OpenGL performance or break OpenGL entirely (this does not apply to the Mac OS X compositor, which cannot be disabled). We recommend that you disable them entirely before trying to use Wine. If you are using one and experiencing slow performance then please do not file bugs in Wine, as these are bugs in your window manager or your video drivers. Also, disabling the Composite extension within /etc/X11/xorg.conf will most certainly prevent any compositing from affecting Wine.

Graphics in games with good ratings in AppDB are scrambled

  • Retry using the latest graphics drivers.
  • Most AppDB entries are based on NVIDIA/GeForce hardware running the proprietary driver.
  • ATI/AMD/Radeon cards running the proprietary fglrx driver have problems in Wine. As a rule of thumb, at least games that use shaders are broken. See this posting and Wine bug 7411 for details.
  • Other hardware (Intel/S3/Matrox etc.) will probably run only old (non-shader) games. Compatibility is not well tested.
  • Same for open source drivers as their 3D support is typically basic only.

Wine displays corrupted or missing text

This may be bug 16146, caused by the nvidia-96xx legacy driver, or bug 18120, which affects QT 4.5.0 applications. It could also be caused by missing fonts, font conflicts, or adding new fonts to Wine.

Try using a fresh Wine prefix (by moving or deleting ~/.wine, or changing the $WINEPREFIX environment variable). If you still have this problem, try setting the following in the Wine registry:

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

Place above in a text file called norender.txt and it can be inserted into the registry with the command regedit norender.txt. Please apply only as required. (This was reported as being required of OS X on the 1 Dec 2007, and more recently on other platforms, such as Ubuntu.)

Wine's windows and fonts are extremely large

Sometimes you can use the Alt key and the mouse to move the winecfg window so you can reach the "Screen Resolution" slider on the Graphics tab; slide it down. Changes will not effect the winecfg window until it's restarted.

If that doesn't work, you can use this one line registry change (all one line):

echo -e "[HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]\n\"LogPixels\"=dword:60\n" | wine regedit - 

If all fails, you could remove your ~/.wine directory and reinstall your Windows applications.

Sound

Audio in games sounds different from running in Windows

A number of DirectSound features are not implemented (correctly) in Wine yet.

  • Sound effects (echo etc.) are not implemented (Bug 10603)
  • Doppler effect is not implemented (source)

MP3s do not play in Windows Media Player or applications that depend on it

For MP3 sound to play out of the box in apps that use the WMP engine and codecs, you must have 32-bit libmpg123 installed on your system and Wine must have been compiled with MP3 support. Historically, not all dis­tros have provided this for legal reasons, though this problem should be much less widespread now that all mp3 patents have expired.

For users still affected by this, the workaround for lack of libmpg123 and/or winemp3.acm is to use the codec installed by WMP9, l3cod­eca.acm. Copy l3codeca.acm to the wineprefix's /windows/system32 directory (or use winetricks to install WMP9), then create a symlink to it named winemp3.acm in the same directory. Wine will then use the native codec to play MP3s.

This only affects WMP and apps that rely on it for MP3 playback (including Powerpoint). Apps that install their own MP3 codec, such as Winamp or VLC Player, should be able to play MP3s without this workaround.

Bad or no sound on systems using PulseAudio

Bad or no sound was a problem on some systems with Pulseaudio in older versions of Wine using the winealsa driver. If you are using a version of Wine older than 1.8, please upgrade, as most such problems should be solved by the winepulse driver. If the problem still occurs, try unsetting the PULSE_LATENCY_MSEC environment variable. Some distro packages (notably Debian) formerly set this variable to work around the sound issue with the winealsa driver, but it is not needed with the winepulse driver and may prevent sound from working.

Networking

My program fails to do networking, but my other applications can get online

Note: These instructions are for older Wine installs. If you're using Wine 1.x and your application still fails to do networking, you can give this a try as well. If you're running Wine 1.x and below instructions work for you, file a bug so we can fix Wine to improve other people's experience.

You need to make sure that your hostname resolves to the IP address of your network interface. To verify if you have this problem run hostname -i. If it returned IP address starting from "127." then read on.

To set this up correctly, you can type the following from a terminal:

hostname 

This will return your hostname the way your computer sees it. Now, you need to open an editor with system administrator privileges, how you do this will depend on the distribution you are using. Open the file /etc/hosts and see if there is an entry for your hostname. Assuming your hostname is "yourhost" and your network IP address is 192.168.0.23, the entry might look like this:

127.0.0.1 yourhost.yourdomain.com yourhost 

Change this to (or add, if there is no such line):

192.168.0.23 yourhost.yourdomain.com yourhost

For most Windows games with networking problems, this is all you need to get networking to work.

Why doesn't DNS resolve in 64-bit operating systems?

Many distributions don't provide all the 32-bit compatibility libraries that wine needs. In this case, wine needs 32-bit DNS libraries. On Ubuntu/Debian, this package is libnss-mdns:i386. For other operating systems, the package name may differ. Consult your distribution's support channels.

Removable Media

My CD or DVD disc won't eject

Try wine eject. It is a function to free up, unlock, and eject the drive. Make sure that the drive is mapped as a CD-ROM in winecfg and specify the drive letter in the command line, e.g.

wine eject d:

The application's CD or DVD looks empty or is missing some files!

Some discs are poorly mastered in a way that affects only Unix-based operating systems.

You may need to use the "unhide" or "norock" mount options for these discs.

Run mount once to see where the disc is mounted, then mount it again in the same place with the needed option (and the "remount" option). Some assembly required.

Examples:

sudo mount -o remount,unhide /dev/sr0 /mnt/cdrom 

or

sudo mount -t iso9660 -o ro,unhide /dev/cdrom /media/cdrom0

See also your operating system's documentation, e.g. https://help.ubuntu.com/community/Mount or http://manpages.ubuntu.com/manpages/natty/man8/mount.8.html

Input Devices

Some key combinations in my application do not work

Even in full screen mode, window managers typically capture some keys. For example, in KDE and GNOME, Alt+Left Click is used to move the whole application window by default. Thus, this key combination is not available to applications in Wine. You have to disable the colliding combinations in your window manager. For KDE, see Control Center/Window Behaviour or (better) Window-specific settings/Workarounds/Block global shortcuts. For GNOME, see System/Preferences/Windows and change the "Movement Key" setting. Also see System/Preferences/Keyboard Shortcuts for specific keyboard combinations.

(Keywords: Keyboard, Shortcut, Modifier, Alt, Ctrl, Control.)

My mouse jumps around/resets its position often in games

See http://bugs.winehq.org/show_bug.cgi?id=27156 and https://bugs.freedesktop.org/show_bug.cgi?id=30068.

Miscellaneous

My application runs, but text areas act strangely (e.g. lines don't wrap, double-clicking doesn't select words)

You may have run into a bug in Wine's RICHED20.DLL. You can try using Microsoft's RICHED20.DLL by running winetricks and selecting riched20. This may let you work around the problem until the Wine developers fix the bug.

I deleted my Wine menu, and now I can't get it back

Rather than actually delete anything, menu editors on Unix desktops simply mark menu entries as hidden so that they don't show up in the menu. Thus, they remain hidden after reinstalling the application. First, see if these menu entries can be found your menu editor and re-enabled.

This information is stored in ~/.config/menus/applications.menu . Edit ~/.config/menus/applications.menu and you should find a section near the end that looks similar to this:

<Menu>
      <Name>wine-wine</Name>
      <Deleted/>
 </Menu> 

or perhaps this:

<Menu>
      <Name>wine-wine</Name>
      <Menu>
          <Name>wine-Programs</Name>
          <Menu>
              <Name>wine-Programs-AutoHotkey</Name>
              <DirectoryDir>/home/user/.local/share/desktop-directories</DirectoryDir>
          </Menu>
      </Menu>
      <Deleted/>
  </Menu> 

Remove the <Deleted/> line and your Wine menu will reappear.

16-bit applications fail to start

See https://bugs.winehq.org/show_bug.cgi?id=36664. For 64 bit Linux Kernels 3.15+, 3.14.6+, 3.10.42+, 3.13.22+, 3.4.92+ and 3.2.60+. You'll need to run:

# echo 1 > /proc/sys/abi/ldt16 

as root, but be aware that this has security implications.

If your kernel is older than the above stated versions /proc/sys/abi/ldt16 most likely will be missing.

The security fix is espfix64 and as of yet only exists in development branch for 3.16 Linux Kernel. At some point in a future I will put a list of kernels containing the security fix as it most likely will be backported when it is tested. Doing /proc/sys/abi/ldt16 will be required on the security fixed kernels just like the current insecure ones.

Input doesn't work over SSH

When using Wine over SSH, you must run in 'trusted X11 forwarding' mode. For OpenSSH, this means using '-Y' instead of '-X'. See for example https://bugs.winehq.org/show_bug.cgi?id=41476.

This page was last edited on 7 September 2018, at 13:05.