Wine

From Gentoo Wiki
Jump to: navigation, search

Wine (Wine Is Not an Emulator) is an application that allows Windows software to run on Linux. This article deals with installing, configuring, and maintaining a general purpose Wine environment on Gentoo.

Installation

USE flags

It is likely for many users to desire Wine to support as much media as possible, in these cases be sure to enable the related flags under the "Recommended" columns in the USE flag sections below. Pay special attention to the recommendations in the Media and Audio categories.

Media

Optional media related USE flags for app-emulation/wine:
USE flag (what is that?) Default Recommended Description
fontconfig Yes Yes Support for configuring and customizing font access via media-libs/fontconfig
gecko Yes Yes Add support for the Gecko engine when using iexplore
gsm No Add support for the gsm lossy speech compression codec
gstreamer No No Add support for media-libs/gstreamer. Warning: This uses an external patch which attempts to workaround functionality removed from dev-libs/glib. This may crash some applications.
jpeg Yes Yes Add JPEG image support
lcms Yes Yes Add lcms support (color management engine)
mp3 Yes Yes Add support for reading mp3 files
png Yes Yes Add support for libpng (PNG images)
s3tc No Pull in media-libs/libtxc_dxtn for DXTn texture compression, needed for many games. Requires the staging USE flag.
truetype Yes Yes Add support for FreeType and/or FreeType2 fonts
vaapi No Enable Video Acceleration API for hardware decoding. Requires the staging USE flag.

Audio

Optional audio related USE flags for app-emulation/wine:
USE flag (what is that?) Default Recommended Description
alsa Yes Yes Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
openal No Add support for the Open Audio Library
oss No No Add support for OSS (Open Sound System)
pulseaudio No Yes Add support for PulseAudio sound server
realtime Yes Yes Pull in sys-auth/rtkit for low-latency pulseaudio support

Input/Output

Optional I/O related USE flags for app-emulation/wine:
USE flag (what is that?) Default Recommended Description
X Yes Yes Add support for X11
cups No Add support for CUPS (Common Unix Printing System)
gphoto2 No Add digital camera support
hardened No Activate default security enhancements for toolchain (gcc, glibc, binutils)
ldap No Add LDAP support (Lightweight Directory Access Protocol)
nls Yes Yes Add Native Language Support (using gettext - GNU locale utilities)
opencl No Enable OpenCL support
opengl Yes Yes Add support for OpenGL (3D graphics)
osmesa No Add support for OpenGL in bitmaps using libOSMesa
udisks Yes Yes Support dynamic storage devices using sys-fs/udisks
v4l No Enable support for video4linux (using linux-headers or userspace libv4l libraries)
xcomposite Yes Yes Enable support for the Xorg composite extension
xinerama No Add support for the xinerama X11 extension, which is mandatory if you work in multiple monitors setup

Networking

Optional network related USE flags for app-emulation/wine:
USE flag (what is that?) Default Recommended Description
capi No Enable ISDN support via CAPI
ncurses Yes Yes Enable curses support in wineconsole.
pcap No Support packet capture software (e.g. net-analyzer/wireshark)
samba No Add support for NTLM auth. see http://wiki.winehq.org/NtlmAuthSetupGuide and http://wiki.winehq.org/NtlmSigningAndSealing
ssl Yes Yes Add support for Secure Socket Layer connections

Miscellaneous

Optional miscellaneous USE flags for app-emulation/wine:
USE flag (what is that?) Default Recommended Description
abi_x86_32 Yes Yes Support 32-bit Windows binaries
abi_x86_64 Yes Yes Support 64-bit Windows binaries
custom-cflags No No Bypass strip-flags, See Debugging.
dos No Pull in games-emulation/dosbox to run DOS applications
perl Yes Yes Install helpers written in perl (winedump/winemaker)
pipelight No Apply patches for www-plugins/pipelight support. Requires the staging USE flag for >=wine-1.7.33.
run-exes Yes Yes Use Wine to open and run .EXE and .MSI files
scanner No Add support for scanner hardware (e.g. build the sane frontend in kdegraphics)
staging No Yes Installs the external patchset from Wine-Staging. Includes many bugfixes and features, including better performance in gaming.
test No No Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
threads Yes Yes Add threads support for various packages. Usually pthreads
xml Yes Yes Add support for XML files

Emerge

Enable the USE flags of choice and emerge app-emulation/wine:

root #emerge --ask app-emulation/wine

To install the latest development version of Wine the package needs to be individually unmasked:

root #echo "app-emulation/wine" >> /etc/portage/package.accept_keywords

The above command does not apply to systems that have ~amd64 defined globally in the ACCEPT_KEYWORDS variable located in /etc/portage/make.conf

Configuration

Disabling the Menubuilder

To prevent Wine from adding menu entries and desktop links, the following .dll override can be used:

FILE ~/.bashrc
# Prevent Wine from adding menu entries and desktop links.
export WINEDLLOVERRIDES='winemenubuilder.exe=d'

Previously added entries can be deleted by removing the corresponding files from ~/.local/share/applications. See Wine FAQ for examples.

Tools and interfaces

Tools such as graphical interfaces for Wine can be helpful for users who want an alternative to the command-line:

Environment variables

The environment variables of the shell that wine is started from are made accessible to the Windows/DOS processes. Some very useful Wine-specific variables include, but are not limited to, WINEPREFIX, WINEARCH, and WINEDEBUG.

See the man wine and man wineserver manual entries for more detailed information concerning Wine's environment variables.

WINEPREFIX

To create a Wine prefix in a custom location without affecting the default:

user $WINEPREFIX=~/wine_testi wineboot

The above would create the Windows installation in the home path of the user, under ~/wine_testi

Note
Once a prefix has been created, the 'bitness' (arch) can not be changed. As such, the WINEARCH is not required to be defined for every command, unlike the WINEPREFIX variable. When using a non-default prefix without exporting it, the prefix and path need to be defined for each command.

WINEARCH

To create a 32-bit installation instead of the default (when built) 64-bit:

user $WINEARCH=win32 WINEPREFIX=~/wine_testi wineboot

The Wine executable used could be anything that runs Wine, such as winecfg, which often makes sense while creating a clean, new prefix.

WINEDEBUG

Essential in finding out why an application is misbehaving when the basic terminal output or messages boxes are not enough. See Debugging for examples.

Troubleshooting

When a user encounters a problem with an application, they should try the latest development version to see if the unwanted behavior still exists. If Wine has been built with options such as -fomit-frame-pointer or --hash-style=both, the Wine developers will likely be unable to help with the issue, and reports including output from such builds should not be reported to the Wine Bugzilla.

The custom-cflags USE flag should be enabled for debugging builds.

For more directions on reporting bugs, see Bugzilla and Bugs at wiki.winehq.

Support

Users may find additional support in the #gentoo-wine channel on Freenode.

See also

  • Game emulators - An article containing lists of game emulators available through Gentoo.

External resources