WINE(1)

๐Ÿท WINE โ€” like, the actual man page, bestie

okay so this is from the Windows On Unix manual (that's the manual name, iykyk) and it's literally the whole vibe of running Windows stuff on Unix. sit down, grab a strawberry ๐Ÿ“, we're getting into it.


โœจ NAME โœจ

wine โ€” run Windows programs on Unix ๐Ÿ’… periodt.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

wine program [arguments]
wine --help
wine --version

quick heads up bestie: if you wanna know how arguments get passed to Windows programs, the PROGRAM/ARGUMENTS section below is your girl ๐Ÿซถ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

wine loads and runs the program you give it. and like, what even is that program? it can be a DOS, Windows 3.x, Win32 or Win64 executable (the Win64 one only on 64-bit systems, obviously โœจ).

not me forgetting to mention โ€” if you're trying to debug wine, use winedbg instead. different tool, different vibe.

and if you're running CUI executables (that's Windows console programs, for the uninitiated ๐Ÿ’€), use wineconsole instead of wine, because it shows the output in its own separate window. if you don't use wineconsole for CUI programs, you get like... very limited console support, and your program might just not function properly. no cap. ๐Ÿ˜ญ

also! when you invoke it with --help or --version as the only argument, wine just prints a tiny help message or its version respectively and dips. that's it, that's the whole interaction ๐ŸŽ€


๐ŸŒˆ PROGRAM/ARGUMENTS ๐ŸŒˆ

so the program name can be written in DOS format:

C:\\WINDOWS\\SOL.EXE

or in Unix format:

/msdos/windows/sol.exe

either slaps ๐Ÿ’… and you can pass arguments to the program you're executing by just adding them to the end of the command line that invokes wine, like:

wine notepad C:\\TEMP\\README.TXT
โš ๏ธ but careful babe โ€” you need to \ escape special characters (and spaces!) when you invoke Wine via a shell. the original example, exactly:
wine C:\\Program\ Files\\MyPrg\\test.exe

oh and the program can also be one of the Windows executables that ships with Wine ๐Ÿท in which case you don't have to specify the full path, it's not mandatory โ€” like wine explorer or wine notepad. iconic.


๐Ÿ’– ENVIRONMENT ๐Ÿ’–

wine makes the environment variables of the shell it was started from accessible to the Windows/DOS processes it starts. so basically โ€” use whatever syntax your shell needs to set environment variables, and you're set ๐Ÿซถ

  • WINEPREFIX โ€” if set, its contents get taken as the name of the directory where Wine stores its data (the default is $HOME/.wine). this directory is also used to identify the socket used to talk to the wineserver. all wine processes using the same wineserver (i.e. same user) share certain things like registry, shared memory, and config file. so by setting WINEPREFIX to different values for different wine processes, you can run a whole bunch of truly independent wine processes. main character energy, honestly ๐Ÿ‘‘
  • WINESERVER โ€” specifies the path and name of the wineserver binary. if it's not set, Wine looks for a file named wineserver in the path and in a few other likely locations ๐Ÿ”
  • WINEDEBUG โ€” turns debugging messages on or off. the syntax is of the form:
[class][+|-]channel[,[class2][+|-]channel2]

class is optional and can be one of: err, warn, fixme, or trace. if class isn't specified, all debugging messages for the specified channel get turned on. each channel prints messages about a particular component of Wine. the following character can be either + or -, to switch the specified channel on or off respectively. if there's no class part before it, a leading + can be omitted. and note โ€” spaces are not allowed anywhere in the string. ๐Ÿšซ

Examples, and these are exact:

WINEDEBUG=warn+all

turns on all warning messages (recommended for debugging) ๐Ÿ”ฅ

WINEDEBUG=warn+dll,+heap

turns on DLL warning messages and all heap messages.

WINEDEBUG=fixme-all,warn+cursor,+relay

turns off all FIXME messages, turns on cursor warning messages, and turns on all relay messages (API calls).

WINEDEBUG=relay

turns on all relay messages. for more control on including or excluding functions and dlls from the relay trace, look into the HKEY_CURRENT_USER\Software\Wine\Debug registry key ๐Ÿ‘€

for more info on debugging messages, see the Running Wine chapter of the Wine User Guide.

  • WINEDLLPATH โ€” specifies the path(s) in which to search for builtin dlls and Winelib applications. it's a list of directories separated by ":". in addition to any directory specified in WINEDLLPATH, Wine also looks in the installation directory ๐Ÿงš
  • WINEDLLOVERRIDES โ€” defines the override type and load order of dlls used in the loading process for any dll. there are currently two types of libraries that can be loaded into a process address space: native windows dlls (native) and Wine internal dlls (builtin). the type may be abbreviated with the first letter of the type (n or b). the library may also be disabled (''). each sequence of orders must be separated by commas.

each dll may have its own specific load order. the load order determines which version of the dll gets attempted to be loaded into the address space. if the first fails, then the next is tried and so on. multiple libraries with the same load order can be separated with commas. it's also possible to specify different loadorders for different libraries by separating the entries by ";".

the load order for a 16-bit dll is always defined by the load order of the 32-bit dll that contains it (you can identify that by looking at the symbolic link of the 16-bit .dll.so file). for instance, if ole32.dll is configured as builtin, storage.dll will be loaded as builtin too, since the 32-bit ole32.dll contains the 16-bit storage.dll. the way that works is so cool honestly ๐Ÿ’œ

Examples:

WINEDLLOVERRIDES="comdlg32,shell32=n,b"

try to load comdlg32 and shell32 as native windows dll first, and try the builtin version if the native load fails.

WINEDLLOVERRIDES="comdlg32,shell32=n;c:\\foo\\bar\\baz=b"

try to load the libraries comdlg32 and shell32 as native windows dlls. furthermore, if an application requests to load c:\foo\bar\baz.dll, load the builtin library baz.

WINEDLLOVERRIDES="comdlg32=b,n;shell32=b;comctl32=n;oleaut32="

try to load comdlg32 as builtin first and try the native version if the builtin load fails; load shell32 always as builtin and comctl32 always as native; oleaut32 will be disabled.

  • WINEPATH โ€” specifies additional path(s) to be prepended to the default Windows PATH environment variable. it's a list of Windows-style directories separated by ";". ๐Ÿช„

for a permanent alternative, edit (create if needed) the PATH value under the HKEY_CURRENT_USER\Environment registry key.

  • WINEARCH โ€” specifies the Windows architecture to support. it can be set to win32 (support only 32-bit applications), to win64 (support both 64-bit applications and 32-bit ones), or to wow64 (support 64-bit applications and 32-bit ones, using a 64-bit host process in all cases).
๐Ÿ’€ the architecture supported by a given Wine prefix is set at prefix creation time and cannot be changed afterwards. when running with an existing prefix, Wine will refuse to start if WINEARCH doesn't match the prefix architecture. it is possible, however, to switch freely between win64 and wow64 with an existing 64-bit prefix. so like, choose wisely bestie.
  • WINE_D3D_CONFIG โ€” specifies Direct3D configuration options. it can be used instead of modifying the HKEY_CURRENT_USER\Software\Wine\Direct3D registry key. the value is a comma- or semicolon-separated list of key-value pairs. for example:
WINE_D3D_CONFIG="renderer=vulkan;VideoPciVendorID=0xc0de"

if an individual setting is specified in both the environment variable and the registry, the former takes precedence. env var wins, slay ๐Ÿ†

  • DISPLAY โ€” specifies the X11 display to use.

OSS sound driver configuration variables (yes, a whole lil subcategory, adorable):

  • AUDIODEV โ€” set the device for audio input / output. default /dev/dsp.
  • MIXERDEV โ€” set the device for mixer controls. default /dev/mixer.
  • MIDIDEV โ€” set the MIDI (sequencer) device. default /dev/sequencer.

๐ŸŽ€ FILES ๐ŸŽ€

  • wine โ€” the Wine program loader.
  • wineconsole โ€” the Wine program loader for CUI (console) applications.
  • wineserver โ€” the Wine server.
  • winedbg โ€” the Wine debugger.
  • $WINEPREFIX/dosdevices โ€” directory containing the DOS device mappings. each file in that directory is a symlink to the Unix device file implementing a given device. for instance, if COM1 is mapped to /dev/ttyS0 you'd have a symlink of the form $WINEPREFIX/dosdevices/com1 -> /dev/ttyS0.

DOS drives are also specified with symlinks; for instance if drive D: corresponds to the CDROM mounted at /mnt/cdrom, you'd have a symlink $WINEPREFIX/dosdevices/d: -> /mnt/cdrom. the Unix device corresponding to a DOS drive can be specified the same way, except with '::' instead of ':'. so for the previous example, if the CDROM device is mounted from /dev/hdc, the corresponding symlink would be $WINEPREFIX/dosdevices/d:: -> /dev/hdc. see how that works? cute little double colon ๐Ÿ’…


๐ŸŒŸ AUTHORS ๐ŸŒŸ

Wine is available thanks to the work of many developers ๐Ÿซถ for a listing of the authors, please see the file AUTHORS in the top-level directory of the source distribution.


Wine can be distributed under the terms of the LGPL license. a copy of the license is in the file COPYING.LIB in the top-level directory of the source distribution.


๐Ÿ’€ BUGS ๐Ÿ’€

a status report on many applications is available from the Wine Application Database. please add entries to this list for applications you currently run, if necessary ๐Ÿ“

bugs can be reported on the Wine bug tracker.


โญ AVAILABILITY โญ

the most recent public version of wine is available through WineHQ, the Wine development headquarters ๐ŸŒˆ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

wineserver(1), winedbg(1), Wine documentation and support.


๐ŸŒธ okay that's the whole page bestie, you're officially educated ๐ŸŒธ

sign-off time: this glorious document is Wine 11.21, dated July 2013 โ€” yes, that's the version and the date at the bottom of the page, and honestly? we respect the archive energy ๐ŸŽ€โœจ