Gentoo Wiki


Wikipedia has an article on:
Wine running Warcraft III.
Wine running Warcraft III.



Wine is an open-source implementation of the Windows API, built on X and UNIX. In more practical terms, this means that you can use it to run Windows programs on your Linux computer. Do not mistake Wine as a machine emulator, Wine only mimics a Windows environment, it doesn't run Windows, just Windows programs. If you want a full machine emulator go with VMware or QEmu. Since Wine is a reimplementation of the Windows API, you can run programs at speeds up to, or in some cases even faster than, native Windows performance. Cedega (former WineX) is a proprietary fork of Wine which might sometimes run some games better. It used to have superior Direct3D and copy-protection handling to Wine for a long time after the fork but nowadays Wine has passed it on the Direct3D front and has progressed much on the copy-protection front.

Installing Wine

Installing wine under Gentoo is an easy process.

Code: Installing Wine
emerge -av wine

Now that wasn't too hard!

If there is a new feature in Wine that you absolutely must have, there are generally newer builds in ~arch. To access these packages, one must add wine to the list of packages to unmask

Code: Installing Wine ~arch (Newer, Possibly Unstable, but Possible More Features)
echo "app-emulation/wine ~yourARCHhere" >> /etc/portage/package.keywords
emerge -av wine

The first line adds the text "app-emulation/wine ~x86 or ~amd64 to the file packages.keywords, which tells portage to let you use the development version of wine. The second then emerges wine, however, you will be emerging the ~arch version of it.

Warning: Do NOT emerge wine with either the -O3 (heavy speed optimization) or -Os (size optimization) flag. Verify the settings in /etc/make.conf to ensure that these are off, and please refer to bug 147533 for further reference.
Warning: If you run the Ati fglrx-Driver with Wine in Version <0.9.22 and OpenGL you get a strange Error. In this case, you should install the new Version 0.9.22 which is currently the latest cvs-Version. The WineCVS page provides an easy to use installer for this purpose.

Configuring Wine

The configuration file at ~/.wine/config is now deprecated. Edit your configuration with

Code: Configuring Wine 1


Code: Configuring Wine 2
regedit HKCU\Software\Wine

If your Windows OpenGL applications fail with a message mentioning glXChooseFBConfig, you may have to set your X server color depth to 24 bit!

Configuring DOS-drives

What for?

Configuring DOS-drives is a vital thing to do if you wish to install programs via wine. This is especially important for installing and playing certain games (so that the cd/dvd-drives are detected, and to bypass cd-rom protection mechanisms), such as Warcraft 3.

Manually (old way)

Emulated DOS-drive letters are stored in ~/.wine/dosdevices, as symbolic links (symlinks). For instance, to set up /mnt/cdrom as your D: drive, you would create a symlink called "d:" in the dosdevices directory that points to /mnt/cdrom.

Code: Example symlink

ln -s /mnt/cdrom d:

winecfg (new way)

Creating the symlinks can also be done via the Wine Configuration Utility (winecfg), under the Drives tab.

Note: If you choose to autodetect your drives in winecfg, please make sure the drive-types are correct (Show Advanced -> Type), as the program doesn't always set them correctly by itself.

Third-party configuration utilities

These aren't supported by Wine developers so report any bugs on these pieces of software on the bug trackers of the respective project. These can also interfere with debugging Wine itself so it's recommended to completely remove them and install the program inside a fresh wineprefix (usually ~/.wine) if your program doesn't work and you need help with it.


You can also use the tool that originally expanded on sidenet, winetricks. It provides you with some Microsoft drivers, fonts, runtimes, etc.

Wine Doors

A new alternative to WineTools, called Wine Doors, is being developed. While currently immature, it is runnable. and it will hopefully become a good option in the future.

Philosophy: To provide a replacement for winetools which has apt/yum functionality to it, to do away with the bad aspects of winetools whilst keeping the good ones and expanding on the origninal idea with a more modern design approach.

Troubleshooting FAQ


Q: I get sound delay by a second or more
A: Try using the OSS driver instead. If it isn't in the list, you have to enable it in the kernel.

Q: After configuring sound games won't start (or crashes)
A: This is probably becaues you have chosen options (Sample Rate & Default Bits) your sound card or wine can't handle. "Default Sample Rate" of 22050 and 8 "Bits Per Sample" are usually safe options. Sometimes this can also be because you use the wrong driver. Try changing between them.

Q: Sound is crackled or generally bad
A: Try to set Hardware Acceleration in the Audio tab of winecfg to Full. That fixes the bad sound in for instance Warcraft 3.


Q: It seems the screen doesn't refresh after returning from a fullscreen application. I get this strange teal colour covering my screen.
A: That can happen when the game's resolution isn't the same resolution as your desktop's. Change to your desktop's resolution in the game and it should be fine.

Uninstalling Wine

Uninstalling Wine is almost as easy as installing it in the first place.

Code: Uninstalling Wine
emerge -aC wine

To also remove the config files and programs that you installed with Wine, you'll have to delete the directory it creates in your home folder.

Code: Uninstalling Wine
rm -rf ~/.wine

Note that by doing this, you'll also be removing all the Windows programs you installed, and you'll have to install them again if you decide to go back to Wine!

Useful Links

Retrieved from ""

Last modified: Sat, 11 Oct 2008 04:03:00 +0000 Hits: 30,462