HOWTO Wine
From Gentoo Linux Wiki
Contents |
[edit] Introduction
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 is a proprietary fork of Wine often more suitable for running games, with a more complete support for copy-protection and Direct3D.
[edit] 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.
[edit] Configuring Wine
The configuration file at ~/.wine/config is now deprecated. Edit your configuration with
| Code: Configuring Wine 1 |
winecfg |
or
| 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!
[edit] Configuring DOS-drives
[edit] 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 World of Warcraft and Warcraft 3.
[edit] 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: |
[edit] winecfg (new way)
Creating the symlinks can also be done via the Wine Configuration Utility (winecfg), under the Drives tab.
[edit] Alternative Configuration
[edit] WineTools
You can also use the tool that originally expanded on sidenet, WineTools. It provides you with some cool microsoft stuff, fonts, installer, and some other stuff.
[edit] 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.
[edit] Troubleshooting FAQ
[edit] Sound
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.
[edit] Video
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.
[edit] 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!
