1 <chapter id="config-wine-main">
2 <title>Configuring Wine</title>
4 Now that you hopefully managed to successfully install
5 the Wine program files,
6 this chapter will tell you how to configure the Wine environment
7 properly to run your Windows programs.
10 First, we'll give you an overview about which kinds of
11 configuration and program execution aspects a fully configured
12 Windows environment has to fulfill in order to ensure that many
13 Windows programs run successfully without encountering any
14 misconfigured or missing items.
15 Next, we'll show you which easy helper programs exist
16 to enable even novice users to complete the Wine environment
17 configuration in a fast and easy way.
18 The next section will explain the purpose of the Wine configuration file,
19 and we'll list all of its settings.
20 After that, the next section will detail the most important and
21 unfortunately most difficult configuration part:
22 how to configure the file system and DOS drive environment that
23 Windows programs need.
24 In the last step we'll tell you how to establish a working Windows
26 Finally, the remaining parts of this chapter contain descriptions
27 of specific Wine configuration items that might also be
31 <sect1 id="config-requirements-windows" xreflabel="--Installing Section--">
32 <title>What are the requirements of a fully working Windows environment?</title>
35 Formerly a part of: "WWN #52 Feature: Replacing Windows".
36 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
40 A Windows installation is a very complex structure. It consists of
41 many different parts with very different functionality.
42 We'll try to outline the most important aspects of it.
48 Registry. Many keys are supposed to exist and contain
49 meaningful data, even in a newly-installed Windows.
54 Directory structure. Applications expect to find and/or
55 install things in specific predetermined locations. Most
56 of these directories are expected to exist. But unlike
57 Unix directory structures, most of these locations are
58 not hardcoded, and can be queried via the Windows API
59 and the registry. This places additional requirements on
65 System DLLs. In Windows, these usually reside in the
66 <filename>system</filename> (or
67 <filename>system32</filename>) directory. Some Windows
68 programs check for their existence in these
69 directories before attempting to load them. While Wine
70 is able to load its own internal DLLs
71 (<filename>.so</filename> files) when the program
72 asks for a DLL, Wine does not simulate the presence of
79 While the users are of course free to set up everything
80 themselves, the Wine team will make the automated Wine source
81 installation script, <filename>tools/wineinstall</filename>,
82 do everything we find necessary to do; running the
83 conventional <userinput>configure && make depend && make && make
84 install</userinput> cycle is thus not recommended, unless
85 you know what you're doing. At the moment,
86 <filename>tools/wineinstall</filename> is able to create a
87 configuration file, install the registry, and create the
88 directory structure itself.
93 <sect1 id="config-helper-programs">
94 <title>Easy configuration helper programs</title>
97 Managing the Wine configuration file settings can be a
98 difficult task, sometimes too difficult for some people.
99 That's why there are some helper applications for easily setting up an
100 initial wine configuration file with useful default settings.
103 <sect2 id="config-helper-winesetuptk">
104 <title>WineSetupTk</title>
106 WineSetupTk is a graphical Wine configuration tool with
107 incredibly easy handling of Wine configuration issues, to be
108 used for configuring the Wine environment after having
109 installed the Wine files.
110 It has been written by CodeWeavers in 2000 as part of a host
111 of other efforts to make Wine more desktop oriented.
114 If you're using Debian, simply install the winesetuptk
118 <prompt># </prompt><userinput>apt-get install winesetuptk</userinput>
121 If you're using another distribution, search for the package on
126 <sect2 id="config-helper-wineinstall">
127 <title>wineinstall</title>
129 <command>wineinstall</command> is a small configuration tool
130 residing as <filename>tools/wineinstall</filename> in a Wine
131 source code tree. It has been written to allow for an easy
132 and complete compilation/installation of Wine source code for
133 people who don't bother with reading heaps of very valuable
134 and informative documentation ;-)
137 Once you have successfully extracted the Wine source code
138 tree, change to the main directory of it and then run (as
142 <prompt>$ </prompt><userinput>./tools/wineinstall</userinput>
145 Doing so will compile Wine, install Wine and configure the
146 Wine environment (either by providing access to a Windows
147 partition or by creating a properly configured no-windows
148 directory environment).
152 <sect2 id="config-helper-winecfg">
153 <title>winecfg</title>
155 <command>winecfg</command> is a small graphical configuration tool
156 residing as <filename>programs/winecfg</filename> in a Wine
157 source code tree. It is a Winelib app making use of standard
158 Win32 GUI controls to easily customize entries in a Wine
164 <sect1 id="config-verify">
165 <title>Verification of correct configuration</title>
168 After you finished configuring Wine, you may run a Perl
169 script called <command>winecheck</command>, to be found
170 in Wine's tools/ directory. It tries to check your
171 configuration's correctness by checking for some popular
174 The latest version can always be found at
175 <ulink url="http://home.arcor.de/andi.mohr/download/winecheck">http://home.arcor.de/andi.mohr/download/winecheck</ulink>.
177 To run it, run in a <glossterm>terminal</glossterm> in the Wine source tree directory:
180 <prompt>$ </><userinput>cd tools</>
181 <prompt>$ </><userinput>perl ./winecheck</>
184 The winecheck output will be a percentage score indicating Wine
185 configuration correctness.
186 Note that winecheck is only alpha, so it's not very complete or
191 If this yields a "good" percentage score, then you can consider
192 your Wine installation to be finished successfully:
194 Otherwise (or if there are still some configuration problems
195 that <command>winecheck</command> doesn't catch properly), please check out the
196 configuration documentation below to find out more about some
197 parts, or proceed to the <link linkend="bugs">Troubleshooting
202 <sect1 id="config-file">
203 <title>The Wine Configuration File</title>
205 This section is meant to contain both an easy step-by-step introduction
206 to the Wine configuration file (for new Wine users)
207 and a complete reference to all Wine configuration file settings (for
211 Parts taken from the former file <filename>wine/documentation/config</filename>,
212 Copyright 1999 &name-adam-sacarny; <email>&email-adam-sacarny;</email>
216 <title>Configuration File Introduction</title>
218 The Wine configuration file is the central file to store
219 configuration settings for Wine.
220 This file (which is called <filename>config</filename>)
221 can be found in the sub directory <filename>.wine/</filename>
222 of your user's home directory
223 (directory <filename>/home/user/</filename>). In other words, the Wine
224 configuration file is <filename>~/.wine/config</filename>.
225 Note that since the Wine configuration file is a part of the
226 Wine registry file system, this file also
227 <emphasis>requires</emphasis> a correct "WINE REGISTRY
228 Version 2" header line to be recognized properly, just like
229 all other Wine registry text files (just in case you decided
230 to write your own registry file from scratch and wonder why
231 Wine keeps rejecting it).
234 The settings available in the configuration file include:
238 Drives and information about them
253 The Wine look and feel
263 Wine's multimedia drivers and DLL configuration
271 <title>Creating Or Modifying The Configuration File</title>
273 If you just installed Wine for the first time and want to
274 finish Wine installation by configuring it now, then you could
275 use our sample configuration file <filename>config</filename>
276 (which can be found in the directory
277 <filename>documentation/samples/</filename> of the Wine source
278 code directory) as a base for adapting the Wine configuration
279 file to the settings you want.
280 First, I should mention that you should not forget to make
281 sure that any previous configuration file at
282 <filename>~/.wine/config</filename> has been safely moved out
283 of the way instead of simply overwriting it when you will now
284 copy over the sample configuration file.
287 If you don't have a pre-existing configuration file and thus
288 need to copy over our sample configuration file to the
289 standard Wine configuration file location, do in a
290 <glossterm>terminal</glossterm>:
292 <prompt>$ </><userinput>mkdir ~/.wine/</>
293 <prompt>$ </><userinput>cp <replaceable>dir_to_wine_source_code</replaceable>/documentation/samples/config ~/.wine/config</>
295 Otherwise, simply use the already existing configuration file
296 at <filename>~/.wine/config</filename>.
299 Now you can start adapting the configuration file's settings with an
300 <glossterm>editor</glossterm> according to the documentation
302 Note that you should <emphasis>only</emphasis> change
303 configuration file settings if wineserver is not running (in
304 other words: if your user doesn't have a Wine session running),
305 otherwise Wine won't use them - and even worse, wineserver will
306 overwrite them with the old settings once wineserver quits!!
310 <sect2 id="config-file-how">
311 <title>What Does It Contain?</title>
314 Let's start by giving an overview of which sections a
315 configuration file may contain, and whether the inclusion of
316 the respective section is <emphasis>needed</emphasis> or only <emphasis>recommended</emphasis> ("recmd").
319 <informaltable frame="all">
323 <entry>Section Name</entry>
324 <entry>Needed?</entry>
325 <entry>What it Does</entry>
330 <entry>[Drive x]</entry>
332 <entry>Sets up drive mappings to be used by Wine</entry>
335 <entry>[wine]</entry>
337 <entry>General settings for Wine</entry>
340 <entry>[DllDefaults]</entry>
342 <entry>Defaults for loading DLL's</entry>
345 <entry>[DllPairs]</entry>
347 <entry>Sanity checkers for DLL's</entry>
350 <entry>[DllOverrides]</entry>
352 <entry>Overrides defaults for DLL loading</entry>
355 <entry>[x11drv]</entry>
357 <entry>Graphics driver settings</entry>
360 <entry>[fonts]</entry>
362 <entry>Font appearance and recognition</entry>
365 <entry>[serialports]</entry>
367 <entry>COM ports seen by Wine</entry>
370 <entry>[parallelports]</entry>
372 <entry>LPT ports seen by Wine</entry>
375 <entry>[ppdev]</entry>
377 <entry>Parallelport emulation</entry>
380 <entry>[spooler]</entry>
382 <entry>Print spooling</entry>
385 <entry>[ports]</entry>
387 <entry>Direct port access</entry>
390 <entry>[Debug]</entry>
392 <entry>What to do with certain debug messages</entry>
395 <entry>[Registry]</entry>
397 <entry>Specifies locations of windows registry files</entry>
400 <entry>[tweak.layout]</entry>
402 <entry>Appearance of Wine</entry>
405 <entry>[programs]</entry>
407 <entry>Programs to be run automatically</entry>
410 <entry>[Console]</entry>
412 <entry>Console settings</entry>
415 <entry>[Clipboard]</entry>
417 <entry>Interaction for Wine and X11 clipboard</entry>
420 <entry>[afmdirs]</entry>
422 <entry>Postscript driver settings</entry>
425 <entry>[WinMM]</entry>
427 <entry>Multimedia settings</entry>
430 <entry>[AppDefaults]</entry>
432 <entry>Overwrite the settings of previous sections for special programs</entry>
439 Now let's explain the configuration file sections in a
444 <title>The [Drive x] Sections</title>
446 For a detailed description of these configuration file
447 sections which are used to set up DOS drive mappings to Unix
448 directory space, please look at the <link
449 linkend="config-drive-sections">Wine file system layer
450 configuration section</link>.
454 <sect3 id="config-wine">
455 <title>The [wine] Section </title>
457 The [wine] section of the configuration file contains all kinds
458 of general settings for Wine.
462 "Windows" = "c:\\windows"
463 "System" = "c:\\windows\\system"
465 "Path" = "c:\\windows;c:\\windows\\system;c:\\blanco"
466 "ShowDirSymlinks" = "1"
468 For a detailed description of drive layer configuration and
469 the meaning of these parameters, please look at the <link
470 linkend="config-drive-main">Wine file system layer
471 configuration section</link>.
474 <programlisting>"GraphicsDriver" = "x11drv|ttydrv"</programlisting>
475 Sets the graphics driver to use for Wine output.
476 x11drv is for X11 output, ttydrv is for text console output.
477 WARNING: if you use ttydrv here, then you won't be able to run
478 a lot of Windows GUI programs (ttydrv is still pretty "broken"
479 at running graphical apps). Thus this option is mainly interesting
480 for e.g. embedded use of Wine in web server scripts.
481 Note that ttydrv is still very lacking, so if it doesn't work,
482 resort to using "xvfb", a virtual X11 server.
483 Another way to run Wine without display would be to run X11
484 via Xvnc, then connect to that VNC display using xvncviewer
485 (that way you're still able to connect to your app and
486 configure it if need be).
489 <programlisting>"Printer" = "off|on"</programlisting> Tells wine
490 whether to allow printing via printer drivers to work.
491 This option isn't needed for our built-in psdrv printer driver
493 Using these things are pretty alpha, so you might want to
494 watch out. Some people might find it useful, however. If
495 you're not planning to work on printing via windows printer
496 drivers, don't even add this to your wine configuration file
497 (It probably isn't already in it).
498 Check out the [spooler] and [parallelports] sections too.
501 <programlisting>"ShellLinker" = "wineshelllink"</programlisting>
502 This setting specifies the shell linker script to use for setting
503 up Windows icons in e.g. KDE or Gnome that are given by programs
504 making use of appropriate shell32.dll functionality to create
505 icons on the desktop/start menu during installation.
508 <programlisting>"SymbolTableFile" = "wine.sym"</programlisting>
509 Sets up the symbol table file for the wine debugger. You
510 probably don't need to fiddle with this. May be useful if
511 your wine is stripped.
515 <sect3 id="config-dlldefaults">
516 <title>The [DllDefaults] Section</title>
518 These settings provide wine's default handling of DLL loading.
521 <programlisting>"DefaultLoadOrder" =" native, builtin"</programlisting>
524 This setting is a comma-delimited list of the order in
525 which to attempt loading DLLs. If the first option fails,
526 it will try the second, and so on. The order specified
527 above is probably the best in most conditions.
532 <title>The [DllPairs] Section</title>
534 At one time, there was a section called [DllPairs] in the
535 default configuration file, but this has been obsoleted
536 because the pairing information has now been embedded into
537 Wine itself. (The purpose of this section was merely to be
538 able to issue warnings if the user attempted to pair
539 codependent 16-bit/32-bit DLLs of different types.) If you
540 still have this in your <filename>~/.wine/.config</filename> or
541 <filename>wine.conf</filename>, you may safely delete it.
545 <sect3 id="config-dlloverrides">
546 <title>The [DllOverrides] Section</title>
548 The format for this section is the same for each line:
550 <DLL>{,<DLL>,<DLL>...} = <FORM>{,<FORM>,<FORM>...}
554 For example, to load built-in KERNEL pair (case doesn't
557 "kernel,kernel32" = "builtin"
561 To load the native COMMDLG pair, but if that doesn't work
564 "commdlg,comdlg32" = "native, builtin"
568 To load the native COMCTL32:
570 "comctl32" = "native"
574 Here is a good generic setup (As it is defined in config
575 that was included with your wine package):
578 "rpcrt4" = "builtin, native"
579 "oleaut32" = "builtin, native"
580 "ole32" = "builtin, native"
581 "commdlg" = "builtin, native"
582 "comdlg32" = "builtin, native"
583 "ver" = "builtin, native"
584 "version" = "builtin, native"
585 "shell" = "builtin, native"
586 "shell32" = "builtin, native"
587 "shfolder" = "builtin, native"
588 "shlwapi" = "builtin, native"
589 "shdocvw" = "builtin, native"
590 "lzexpand" = "builtin, native"
591 "lz32" = "builtin, native"
592 "comctl32" = "builtin, native"
593 "commctrl" = "builtin, native"
594 "advapi32" = "builtin, native"
595 "crtdll" = "builtin, native"
596 "mpr" = "builtin, native"
597 "winspool.drv" = "builtin, native"
598 "ddraw" = "builtin, native"
599 "dinput" = "builtin, native"
600 "dsound" = "builtin, native"
601 "opengl32" = "builtin, native"
602 "msvcrt" = "native, builtin"
603 "msvideo" = "builtin, native"
604 "msvfw32" = "builtin, native"
605 "mcicda.drv" = "builtin, native"
606 "mciseq.drv" = "builtin, native"
607 "mciwave.drv" = "builtin, native"
608 "mciavi.drv" = "native, builtin"
609 "mcianim.drv" = "native, builtin"
610 "msacm.drv" = "builtin, native"
611 "msacm" = "builtin, native"
612 "msacm32" = "builtin, native"
613 "midimap.drv" = "builtin, native"
614 ; you can specify programs too
615 "notepad.exe" = "native, builtin"
616 ; default for all other DLLs
617 "*" = "native, builtin"
622 If loading of the libraries that are listed first fails,
623 wine will just go on by using the second or third option.
628 <sect3 id="config-fonts">
629 <title>The [fonts] Section</title>
631 This section sets up wine's font handling.
634 <programlisting>"Resolution" = "96"</programlisting>
637 Since the way X handles fonts is different from the way
638 Windows does, wine uses a special mechanism to deal with
639 them. It must scale them using the number defined in the
640 "Resolution" setting. 60-120 are reasonable values, 96 is
641 a nice in the middle one. If you have the real windows
642 fonts available (<filename><dirs to
643 wine>/documentation/ttfserver</filename> and
644 <filename>fonts</filename>), this parameter will not be as
645 important. Of course, it's always good to get your X fonts
646 working acceptably in wine.
649 <programlisting>"Default" = "-adobe-times-"</programlisting>
650 The default font wine uses. Fool around with it if you'd like.
656 The <literal>Alias</literal> setting allows you to map an X font to a font
657 used in wine. This is good for apps that need a special font you don't have,
658 but a good replacement exists. The syntax is like so:
660 "AliasX" = "[Fake windows name],[Real X name]"<,optional "masking" section>
664 Pretty straightforward. Replace "AliasX" with "Alias0",
665 then "Alias1" and so on. The fake windows name is the name
666 that the font will be under a windows app in wine. The
667 real X name is the font name as seen by X (Run
668 "xfontsel"). The optional "masking" section allows you to
669 utilize the fake windows name you define. If it is not
670 used, then wine will just try to extract the fake windows
671 name itself and not use the value you enter.
674 Here is an example of an alias without masking. The font will show up in windows
678 "Alias0" = "Foo,--google-"
682 Here is an example with masking enabled. The font will show up as "Foo" in
685 "Alias1" = "Foo,--google-,subst"
689 For more information check out the <link linkend="config-fonts-main">Fonts</link>
694 <sect3 id="config-io">
695 <title>The [serialports], [parallelports], [spooler], and [ports] Sections</title>
697 Even though it sounds like a lot of sections, these are
698 all closely related. They are all for communications and
702 The [serialports] section tells wine what serial ports it
704 <programlisting>"ComX" = "/dev/ttySY"</programlisting>
707 Replace <literal>X</literal> with the number of the COM
708 port in Windows (1-8) and <literal>Y</literal> with the
709 number of it in <literal>X</literal> (Usually the number
710 of the port in Windows minus 1). <literal>ComX</literal>
711 can actually equal any device
712 (<medialabel>/dev/modem</medialabel> is acceptable). It is
713 not always necessary to define any COM ports (An optional
714 setting). Here is an example:
715 <programlisting>"Com1" = "/dev/ttyS0"</programlisting>
718 Use as many of these as you like in the section to define
719 all of the COM ports you need.
722 The [parallelports] section sets up any parallel ports
723 that will be allowed access under wine.
724 <programlisting>"LptX" = "/dev/lpY"</programlisting>
727 Sounds familiar? Syntax is just like the COM port setting.
728 Replace <literal>X</literal> with a value from 1-4 as it
729 is in Windows and <literal>Y</literal> with a value from
730 0-3 (<literal>Y</literal> is usually the value in windows
731 minus 1, just like for COM ports). You don't always need
732 to define a parallel port (AKA, it's optional). As with
733 the other section, LptX can equal any device (Maybe
734 <medialabel>/dev/printer</medialabel>). Here is an
735 example: <programlisting>"Lpt1" = "/dev/lp0"</programlisting>
738 The [spooler] section will inform wine where to spool
739 print jobs. Use this if you want to try printing. Wine
740 docs claim that spooling is "rather primitive" at this
741 time, so it won't work perfectly. <emphasis>It is optional.</emphasis> The only
742 setting you use in this section works to map a port (LPT1,
743 for example) to a file or a command. Here is an example,
744 mapping LPT1 to the file <filename>out.ps</filename>:
745 <programlisting>"LPT1:" = "out.ps"</programlisting>
748 The following command maps printing jobs to LPT1 to the
749 command <command>lpr</command>. Notice the |:
750 <programlisting>"LPT1:" = "|lpr"</programlisting>
753 The [ports] section is usually useful only for people who
754 need direct port access for programs requiring dongles or
755 scanners. <emphasis>If you don't need it, don't use
759 <programlisting>"read" = "0x779,0x379,0x280-0x2a0"</programlisting>
760 Gives direct read access to those IO's.
763 <programlisting>"write" = "0x779,0x379,0x280-0x2a0"</programlisting>
764 Gives direct write access to those IO's. It's probably a
765 good idea to keep the values of the
766 <literal>read</literal> and <literal>write</literal>
767 settings the same. This stuff will only work when you're
772 <sect3 id="config-debug-etc">
773 <title>The [Debug], [Registry], [tweak.layout], and [programs] Sections</title>
775 [Debug] is used to include or exclude debug messages, and to
776 output them to a file. The latter is rarely used. <emphasis>These
777 are all optional and you probably don't need to add or
778 remove anything in this section to your config.</emphasis> (In extreme
779 cases you may want to use these options to manage the amount
780 of information generated by the <parameter>--debugmsg +relay
781 </parameter> option.)
784 <programlisting>"File" = "/blanco"</programlisting>
785 Sets the logfile for wine. Set to CON to log to standard out.
786 <emphasis>This is rarely used.</emphasis>
789 <programlisting>"SpyExclude" = "WM_SIZE;WM_TIMER;"</programlisting>
790 Excludes debug messages about <constant>WM_SIZE</constant>
791 and <constant>WM_TIMER</constant> in the logfile.
794 <programlisting>"SpyInclude" = "WM_SIZE;WM_TIMER;"</programlisting>
795 Includes debug messages about <constant>WM_SIZE</constant>
796 and <constant>WM_TIMER</constant> in the logfile.
799 <programlisting>"RelayInclude" = "user32.CreateWindowA;comctl32.*"</programlisting>
800 Include only the listed functions in a
801 <parameter>--debugmsg +relay</parameter> trace. This entry is
802 ignored if there is a <parameter>RelayExclude</parameter> entry.
805 <programlisting>"RelayExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"</programlisting>
806 Exclude the listed functions in a
807 <parameter>--debugmsg +relay</parameter> trace. This entry
808 overrides any settings in a <parameter>RelayInclude</parameter>
809 entry. If neither entry is present then the trace includes
813 In both entries the functions may be specified either as a
814 function name or as a module and function. In this latter
815 case specify an asterisk for the function name to include/exclude
816 all functions in the module.
819 [Registry] can be used to tell wine where your old windows
820 registry files exist. This section is completely optional
821 and useless to people using wine without an existing
822 windows installation.
825 <programlisting>"UserFileName" = "/dirs/to/user.reg"</programlisting>
826 The location of your old <filename>user.reg</filename> file.
829 [tweak.layout] is devoted to wine's look. There is only
833 <programlisting>"WineLook" = "win31|win95|win98"</programlisting>
834 Will change the look of wine from Windows 3.1 to Windows 95.
835 The <literal>win98</literal> setting behaves
836 just like <literal>win95</literal> most of the time.
839 [programs] can be used to say what programs run under
843 <programlisting>"Default" = "/program/to/execute.exe"</programlisting>
844 Sets the program to be run if wine is started without specifying a program.
847 <programlisting>"Startup" = "/program/to/execute.exe"</programlisting>
848 Sets the program to automatically be run at startup every time.
852 <sect3 id="config-winmm">
853 <title>The [WinMM] Section</title>
855 [WinMM] is used to define which multimedia drivers have to be loaded. Since
856 those drivers may depend on the multimedia interfaces available on your system
857 (OSS, ALSA... to name a few), it's needed to be able to configure which driver
862 The content of the section looks like:
865 "Drivers" = "wineoss.drv"
866 "WaveMapper" = "msacm.drv"
867 "MidiMapper" = "midimap.drv"
869 All the keys must be defined:
873 The "Drivers" key is a ';' separated list of modules name, each of
874 them containing a low level driver. All those drivers will be loaded
875 when MMSYSTEM/WINMM is started and will provide their inner features.
880 The "WaveMapper" represents the name of the module containing the Wave
881 Mapper driver. Only one wave mapper can be defined in the system.
886 The "MidiMapper" represents the name of the module containing the MIDI
887 Mapper driver. Only one MIDI mapper can be defined in the system.
894 <sect3 id="config-network">
895 <title>The [Network] Section</title>
897 [Network] contains settings related to
898 networking. Currently there is only one value that can be set.
902 <term>UseDnsComputerName</term>
905 A boolean setting (default: <literal>Y</literal>)
906 that affects the way Wine sets the computer name. The computer
907 name in the Windows world is the so-called <emphasis>NetBIOS name</emphasis>.
908 It is contained in the <varname>ComputerName</varname> in the registry entry
909 <varname>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName</varname>.
912 If this option is set to "Y" or missing, Wine will set the
913 NetBIOS name to the Unix host name of your computer, if
914 necessary truncated to 31 characters. The Unix hostname is the output
915 of the shell command <command>hostname</command>, up to but not
916 including the first dot ('.'). Among other things, this means that
917 Windows programs running under Wine cannot change the NetBIOS computer name.
920 If this option is set to "N", Wine will use the registry value above
921 to set the NetBIOS name. Only if the registry entry doesn't exist (usually
922 only during the first wine startup) it will use the Unix hostname as
923 usual. Windows programs can change the NetBIOS name. The change
924 will be effective after a "reboot", i.e. after restarting Wine.
931 <sect3 id="config-appdefaults">
932 <title>The [AppDefaults] Section</title>
934 The section is used to overwrite certain settings of this file for a
935 special program with different settings.
936 [AppDefaults] is not the real name of the section. The real name
937 consists of the leading word AppDefaults followed by the name
938 of the executable the section is valid for.
939 The end of the section name is the name of the
940 corresponding "standard" section of the configuration file
941 that should have some of its settings overwritten with the
942 program specific settings you define.
943 The three parts of the section name are separated by two backslashes.
946 Currently wine supports overriding selected settings within
947 the sections [DllOverrides], [x11drv], [version] and [dsound] only.
950 Here is an example that overrides the normal settings for a
958 ;; run install in desktop mode
959 [AppDefaults\\install.exe\\x11drv]
961 "Desktop" = "800x600"
967 <sect2 id="config-trouble">
968 <title>What If It Doesn't Work?</title>
970 There is always a chance that things will go wrong. If the
971 unthinkable happens, report the problem to
972 <ulink url="http://bugs.winehq.com/">Wine Bugzilla</ulink>,
974 <systemitem>comp.emulators.ms-windows.wine</systemitem>,
975 or the IRC channel <systemitem>#WineHQ</systemitem> found on
976 irc.freenode.net, or connected servers.
977 Make sure that you have looked over this document thoroughly,
982 <para><filename>README</filename></para>
986 <filename>http://www.winehq.org/trouble/</filename>
991 If indeed it looks like you've done your research, be
992 prepared for helpful suggestions. If you haven't, brace
993 yourself for heaving flaming.
998 <sect1 id="config-drive-main">
999 <title>The Wine File System And Drive Layer</title>
1001 <title>Extremely Important Prerequisites</title>
1003 If you're planning to include access to a CD-ROM drive in your Wine
1004 configuration on Linux, then <emphasis>make sure</emphasis> to add
1005 the <quote>unhide</quote> mount option to the CD-ROM file system
1006 entry in <filename>/etc/fstab</filename>, e.g.:
1008 /dev/cdrom /cdrom iso9660 ro,noauto,users,unhide 0 0
1010 Several Windows program setup CD-ROMs or other CD-ROMs chose
1011 to do such braindamaged things as marking very important setup
1012 helper files on the CD-ROM as <quote>hidden</quote>.
1013 That's no problem on Windows, since the Windows CD-ROM driver by
1014 default displays even files that are supposed to be
1015 <quote>hidden</quote>. But on Linux, which chose to
1016 <emphasis>hide</emphasis> <quote>hidden</quote> files on CD by
1017 default, this is <emphasis>FATAL</emphasis>!
1018 (the programs will simply abort with an <quote>installation file not found</quote> or similar error)
1019 Thus you should never forget to add this setting.
1024 <title>Short Introduction</title>
1026 Wine emulates drives by placing their virtual drive roots to
1027 user-configurable points in the Unix filesystem, so it's your
1028 choice where <medialabel>C:</medialabel>'s root should be
1029 (<filename>tools/wineinstall</filename> will even ask you). If
1030 you choose, say, <filename>~/wine</filename> (or, in other
1031 words, <filename>/home/user/wine</filename>, since "~"
1032 indicates the home directory of a user), as the root of your
1033 virtual drive <medialabel>C:</medialabel>, then you'd put this
1034 into your Wine configuration file:
1039 "Path" = "${HOME}/wine"
1042 "Filesystem" = "win95"
1046 With this configuration, what windows apps think of as
1047 "c:\windows\system" would map to
1048 <filename>/home/user/wine/windows/system</filename> in the UNIX
1049 filesystem. Note that you need to specify
1050 <literal>"Filesystem" = "win95"</literal>,
1051 <emphasis>not</emphasis>
1052 <literal>"Filesystem" = "unix"</literal>, to make Wine simulate a
1053 Windows compatible (case insensitive) filesystem, otherwise
1054 most apps won't work.
1058 <sect2 id="config-drive-dir">
1059 <title>Windows Directory Structure</title>
1061 Here's the fundamental layout that Windows programs and
1062 installers expect and that we thus need to configure properly
1063 in Wine. Without it, they seldomly operate correctly. If you
1064 intend to use a no-windows environment (not using an existing
1065 Windows partition), then it is recommended to use either
1066 <command>WineSetupTk</command>'s or
1067 <command>wineinstall</command>'s capabilities to create an
1068 initial windows directory tree, since creating a directory
1069 structure manually is tiresome and error-prone.
1073 C:\ Root directory of primary disk drive
1074 Windows\ Windows directory, containing .INI files,
1076 System\ Win3.x/95/98/ME directory for common DLLs
1077 WinNT/2000 directory for common 16-bit DLLs
1078 System32\ WinNT/2000 directory for common 32-bit DLLs
1079 Start Menu\ Program launcher directory structure
1080 Programs\ Program launcher links (.LNK files) to programs
1081 Program Files\ Application binaries (.EXE and .DLL files)
1085 <sect2 id="config-drive-sections">
1086 <title>The [Drive x] Sections</title>
1088 These sections are supposed to make certain Unix
1089 directory locations accessible to Wine as a DOS/Windows drive
1090 (drive 'x:') and thus accessible to Windows programs
1091 under the drive name you specified.
1092 Every DOS/Windows program sort of expects at least a C:
1093 drive (and sometimes also an A: floppy drive), so your
1094 configuration file should at least contain the corresponding
1095 sections, [Drive C] and [Drive A].
1096 You need to decide on whether you want to use an existing Windows
1097 partition as the C drive or whether you want to create your own
1098 Wine drive C directory tree somewhere (take care about
1100 Each drive section may specify up to 6 different settings
1104 <programlisting>[Drive x]</programlisting>
1105 The above line begins the section for a drive whose letter is x
1106 (DOS notation: drive 'x:').
1107 You could e.g. create an equivalent to a drive 'C:'
1108 under DOS/Windows by using a [Drive C] section name.
1109 Note that the drive letter is case insensitive.
1112 <programlisting>"Path" = "/dir/to/path"</programlisting>
1113 This specifies the directory where the drive will begin.
1114 When Wine is browsing in drive x, it will be able
1115 to see the files that are in the directory
1116 <filename>/dir/to/path</filename> and below.
1117 (note that symlinks to directories won't get included!
1118 see "<link linkend="dirsymlinks">ShowDirSymlinks</link>"
1119 configuration setting)
1120 You can also make use of environment variables like $HOME here,
1121 an example for using a <filename>mywinedrive</filename>
1122 directory in your home dir would be
1123 <programlisting>"Path" = "${HOME}/mywinedrive"</programlisting>
1124 Don't forget to leave off the trailing slash!
1127 <programlisting>"Type" = "hd|cdrom|network|floppy"</programlisting>
1128 Sets up the type of drive Wine will see it as. Type must
1129 equal one of the four <literal>floppy</literal>,
1130 <literal>hd</literal>, <literal>cdrom</literal>, or
1131 <literal>network</literal>. They are self-explanatory.
1132 (The |'s mean "Type = '<one of the options>'".)
1133 Usually, you choose "hd" for a drive ("hd" is default anyway).
1134 For a home directory entry, it makes sense to choose
1135 "network" sometimes, since some home directories are being
1136 exported over the network via NFS and thus can have slow response
1140 <programlisting>"Label" = "blah"</programlisting>
1141 Defines the drive label. Generally only needed
1142 for programs that look for a special CD-ROM.
1143 The label may be up to 11 characters.
1144 Note that the preferred way of managing labels and serial numbers
1145 of CD-ROMs and floppies is to give Wine raw device access for
1146 reading these on a per-CD case (see "Device" below) instead of
1147 hardcoding one specific "Label".
1150 <programlisting>"Serial" = "deadbeef"</programlisting>
1151 Tells Wine the serial number of the drive. A few programs with
1152 intense protection for pirating might need this, but otherwise
1153 it's not needed. Up to 8 characters and hexadecimal.
1154 Using a "Device" entry instead of hardcoding the "Serial" probably
1155 is a smarter choice.
1158 <programlisting>"Filesystem" = "win95|unix|msdos"</programlisting>
1159 Sets up the way Wine looks at files on the drive.
1160 This setting controls the file name lookup and mapping of
1161 Wine to existing file systems on your PC, it does
1162 <emphasis>not</emphasis> tell anything about the filesystem
1168 <term><literal>win95</literal></term>
1171 Case insensitive. Alike to Windows 9x/NT 4. This is
1172 the long filename filesystem you are probably used
1173 to working with. The filesystem behavior of choice for most
1174 programs to be run under wine. <emphasis>Probably the one
1175 you want!</emphasis>
1180 <term><literal>unix</literal></term>
1183 Case sensitive. This filesystem has almost no use
1184 (Windows apps expect case insensitive filenames),
1185 except maybe for Winelib applications.
1186 Try it if you dare, but win95 is a much better
1187 and always recommended choice.
1192 <term><literal>msdos</literal></term>
1195 Case insensitive filesystem. Alike to DOS and
1196 Windows 3.x. <literal>8.3</literal> is the maximum
1197 length of files (eightdot.123) - longer ones will be
1201 This is a <emphasis>very bad choice</emphasis> if
1202 you plan on running apps that use long filenames.
1203 win95 should work fine with apps that were designed
1204 to run under the msdos system. In other words, you
1205 might not want to use this.
1213 <programlisting>"Device" = "/dev/xx"</programlisting>
1215 Needed for raw device access and <link linkend="config-drive-cdrom-labels">label and serial number reading</link>.
1216 Use this <emphasis>only</emphasis> for floppy and cdrom devices. Using it on
1217 Extended2 or other Unix file systems can have dire results
1218 (when a windows app tries to do a lowlevel write,
1219 they do it in a FAT way -- FAT format is completely different from
1220 any Unix file system).
1221 Also, make sure that you have proper permissions to this device
1226 This setting is not really important; almost all apps
1227 will have no problem if it remains unspecified. For
1228 CD-ROMs it's quite useful in order to get automatic label
1229 detection, though. If you are unsure about specifying
1230 device names, just leave out this setting for your
1235 Here are a few sample entries:
1237 Here is a setup for Drive C, a generic hard drive:
1241 "Label" = "Hard Drive"
1242 "Filesystem" = "win95"
1243 This is a setup for Drive E, a generic CD-ROM drive:
1245 "Path" = "/mnt/cdrom"
1247 "Label" = "Total Annihilation"
1248 "Filesystem" = "win95"
1249 "Device" = "/dev/cdrom"
1250 And here is a setup for Drive A, a generic floppy drive:
1253 "Path" = "/mnt/floppy"
1254 "Label" = "Floppy Drive"
1255 "Serial" = "87654321"
1256 "Filesystem" = "win95"
1257 "Device" = "/dev/fd0"
1263 <title>File system settings in the [wine] section</title>
1265 <programlisting>"Windows" = "c:\\windows"</programlisting>
1266 This tells Wine and Windows programs where the
1267 <filename>Windows</filename> directory is. It is
1268 recommended to have this directory somewhere on your
1269 configured <medialabel>C</medialabel> drive, and it's also
1270 recommended to just call the directory "windows" (this is
1271 the default setup on Windows, and some stupid programs
1272 might rely on this). So in case you chose a "Windows"
1273 setting of "c:\\windows" and you chose to set up a drive C
1274 e.g. at <filename>/usr/local/wine_c</filename>, the
1275 corresponding directory would be
1276 <filename>/usr/local/wine_c/windows</filename>. Make one
1277 if you don't already have one. <emphasis>No trailing slash</emphasis> (<emphasis>not</emphasis>
1278 <filename>C:\\windows\</filename>)! Write access strongly
1279 recommended, as Windows programs always assume write access
1280 to the Windows directory!
1283 <programlisting>"System" = "c:\\windows\\system"</programlisting>
1284 This sets up where the windows system files are. The Windows
1285 system directory should reside below the directory used for the
1286 <literal>Windows</literal> setting.
1287 Thus when using the example above, the system directory would be
1288 <filename>/usr/local/wine_c/windows/system</filename>.
1289 Again, no trailing slash, and write access!
1292 <programlisting>"Temp" = "c:\\temp"</programlisting> This should
1293 be the directory you want your temp files stored in,
1294 /usr/local/wine_c/temp in our example.
1295 Again, no trailing slash, and <emphasis>write
1300 "Path" = "c:\\windows;c:\\windows\\system;c:\\blanco"
1304 Behaves like the <envar>PATH</envar> setting on UNIX
1305 boxes. When wine is run like <userinput>wine
1306 sol.exe</userinput>, if <filename>sol.exe</filename>
1307 resides in a directory specified in the
1308 <literal>Path</literal> setting, wine will run it (Of
1309 course, if <filename>sol.exe</filename> resides in the
1310 current directory, wine will run that one). Make sure it
1311 always has your <filename>windows</filename> directory and
1312 system directory (For this setup, it must have
1313 <filename>"c:\\windows;c:\\windows\\system"</filename>).
1315 <para id="dirsymlinks">
1317 "ShowDirSymlinks" = "1"
1319 Wine doesn't pass directory symlinks to Windows programs by
1320 default, as doing so may crash some programs that do
1321 recursive lookups of whole subdirectory trees
1322 whenever a directory symlink points back to itself or one of its
1324 That's why we disallowed the use of directory symlinks
1325 and added this setting to reenable ("1") this functionality.
1326 If you <emphasis>really</emphasis> need Wine to take into
1327 account symlinked directories, then reenable it, but
1328 <emphasis>be prepared for crashes</emphasis> in certain
1329 Windows programs when using the above method! (in other words:
1330 enabling it is certainly not recommended)
1335 <title>More detailed explanation about file system differences</title>
1337 Windows uses a different (and inferior) way than Unix to describe the
1338 location of files in a computer. Thus Windows programs also expect
1339 to find this different way supported by the system.
1340 Since we intend to run Windows programs on
1341 a Unix system, we're in trouble, as we need to translate
1342 between these different file access techniques.
1345 Windows uses drive letters to describe drives or
1346 any other form of storage media and to access files on them.
1347 For example, common drive names are
1348 <filename>C:</filename> for the main Windows system partition
1349 on the first harddisk and <filename>A:</filename> for the
1351 Also, Windows uses <filename>\</filename> (backslash) as the
1352 directory separator sign, whereas Unix uses
1353 <filename>/</filename> (slash).
1354 Thus, an example document on the first data partition in
1355 Windows might be accessed by the name of
1356 <filename>D:\mywork\mydocument.txt</filename>.
1359 So much for the Windows way of doing things.
1362 Well, the problem is, in Unix there is no such thing as
1363 <quote>drive letters</quote>. Instead, Unix chose to go the
1364 much better way of having one single uniform directory tree
1365 (starting with the root directory
1366 <filename>/</filename>), which has various storage devices
1367 such as e.g. harddisk partitions appended at various directory
1368 locations within the tree (an example would be
1369 <filename>/data1/mywork</filename>, which is the first data
1370 partition mounted/attached to a directory called data1 in the
1371 root directory <filename>/</filename>; mywork is a sub
1372 directory of the data partition file system that's mounted
1373 under <filename>/data1</filename>).
1374 In Unix, the Windows example document mentioned above could e.g.
1375 be accessed by the name of
1376 <filename>/data1/mywork/mydocument.txt</filename>,
1377 provided that the administrator decided to mount (attach) the first
1378 data partition at the directory /data1 inside the Unix
1379 directory tree. Note that in Unix, the administrator can
1380 <emphasis>choose</emphasis> any custom partition location he
1381 wants (here, <filename>/data1</filename>), whereas in Windows the system
1382 <emphasis>selects</emphasis> any drive letter it deems
1383 suitable for the first data partition (here,
1384 <filename>D:</filename>), and, even worse, if there is some
1385 change in partition order, Windows automatically
1386 <emphasis>changes</emphasis> the drive letter, and you might
1387 suddenly find yourself with a first data partition at drive
1388 letter <filename>E:</filename>, with all the file naming and
1389 referencing confusion that entails. Thus, the Windows way of
1390 using ever-changing drive letters is <emphasis>clearly
1391 inferior</emphasis> to the Unix way of assigning
1392 <emphasis>fixed</emphasis> directory tree locations for every
1393 data storage medium.
1394 As we'll see soon, fortunately this Windows limitation of
1395 changing drive letters doesn't affect us in Wine at all, since
1396 we can properly map <emphasis>never-changing</emphasis> drive letters to <emphasis>fixed</emphasis> locations inside the Unix directory tree (and even if the location of the respective Unix directory changes, we can still simply update the Wine drive mapping to reflect the updated location and at the same time keep the original drive letter).
1399 OK, now that we know some theory about Windows and Unix drive
1400 and filename mapping, it's probably time to ask how Wine
1401 achieves the magic of mapping a Unix directory location to a
1405 Wine chose to do the following:
1406 In Wine, you don't assign some real physical storage medium
1407 (such as a harddisk partition or similar) to each drive letter
1409 Instead, you choose certain sub directory trees inside the Unix
1410 directory tree (that starts with <filename>/</filename>) that
1411 you would like to assign a drive letter to.
1414 Note that for every Unix sub directory tree that you intend to
1415 start Windows programs in, it is <emphasis>absolutely
1416 required</emphasis> to have a Wine drive mapping entry:
1419 For example, if you had a publicly writable <quote>Windows
1420 directory space</quote> under <filename>/usr/mywine</filename>, then in order to be
1421 able to access this sub directory tree from Wine, you should
1422 have a drive mapping entry that maps a certain drive letter
1423 (for example, let's take drive letter <filename>P:</filename>)
1424 either to <filename>/usr/mywine</filename> or <filename>/usr</filename> (to also access any directories belonging to the parent directory) or <filename>/</filename> (to also access any directory whatsoever on this system by this drive letter mapping). The DOS drive/directory location to access files in <filename>/usr/mywine</filename> <emphasis>in Wine</emphasis> in these configuration cases would then be <filename>P:\</filename> or <filename>P:\mywine</filename> or <filename>P:\usr\mywine</filename>, respectively.
1428 <sect2 id="config-no-windows">
1429 <title>Installing Wine Without Windows</title>
1431 Written by &name-james-juran; <email>&email-james-juran;</email>
1434 (Extracted from <filename>wine/documentation/no-windows</filename>)
1438 A major goal of Wine is to allow users to run Windows programs
1439 without having to install Windows on their machine. Wine
1440 implements the functionality of the main DLLs usually
1441 provided with Windows. Therefore, once Wine is finished, you
1442 will not need to have Windows installed to use Wine.
1445 Wine has already made enough progress that it may be possible
1446 to run your target programs without Windows installed. If
1447 you want to try it, follow these steps:
1453 Point <medialabel>[Drive C]</medialabel> in
1454 <filename>~/.wine/config</filename> to the directory where you want
1455 <filename>C:</filename> to be. Refer to the wine.conf man page
1456 for more information.
1457 The directory to be used for emulating a C: drive will be
1458 the base directory for some Windows specific directories
1461 <userinput>"Filesystem" = "win95"</userinput>!
1466 Within the directory to be used for C:, create empty
1467 <filename>windows</filename>,
1468 <filename>windows/system</filename>,
1469 <filename>windows/Start Menu</filename>, and
1470 <filename>windows/Start Menu/Programs</filename>
1471 directories. Do not point Wine to a
1472 <filename>Windows</filename> directory full of old
1473 installations and a messy registry. (Wine creates a
1474 special registry in your <filename >home</filename>
1475 directory, in <filename>$HOME/.wine/*.reg</filename>.
1476 Perhaps you have to remove these files).
1478 mkdir -p windows windows/system windows/Start\ Menu windows/Start\ Menu/Programs
1483 Run and/or install your programs.
1489 Because Wine is not yet complete, some programs will work
1490 better with native Windows DLLs than with Wine's
1491 replacements. Wine has been designed to make this possible.
1492 Here are some tips by Juergen Schmied (and others) on how to
1493 proceed. This assumes that your
1494 <filename>C:\windows</filename> directory in the configuration
1495 file does not point to a native Windows installation but is in
1496 a separate Unix file system. (For instance, <quote>C:\windows</quote> is
1497 really subdirectory <quote>windows</quote> located in
1498 <quote>/home/ego/wine/drives/c</quote>).
1504 Run the program with <parameter>--debugmsg
1505 +loaddll</parameter> to find out which files are
1506 needed. Copy the required DLLs one by one to the
1507 <filename>C:\windows\system</filename> directory. Do not
1508 copy KERNEL/KERNEL32, GDI/GDI32, USER/USER32 or NTDLL. These
1509 implement the core functionality of the Windows API, and
1510 the Wine internal versions must be used.
1515 Edit the <quote>[DllOverrides]</quote> section of
1516 <filename>~/.wine/config</filename> to specify
1517 <quote>native</quote> before <quote>builtin</quote> for
1518 the Windows DLLs you want to use. For more information
1519 about this, see the Wine manpage.
1524 Note that some network DLLs are not needed even though
1525 Wine is looking for them. The Windows
1526 <filename>MPR.DLL</filename> currently does not work; you
1527 must use the internal implementation.
1532 Copy SHELL.DLL/SHELL32.DLL, COMMDLG.DLL/COMDLG32.DLL
1533 and COMMCTRL.DLL/COMCTL32.DLL
1534 only as pairs to your Wine directory (these DLLs are
1535 <quote>clean</quote> to use). Make sure you have these
1536 specified in the <quote>[DllPairs]</quote> section of
1537 <filename>~/.wine/config</filename>.
1542 Be consistent: Use only DLLs from the same Windows version
1548 Put <filename>regedit.exe</filename> in the
1549 <filename>C:\windows</filename> directory.
1550 (<application>Office 95</application> imports a
1551 <filename>*.reg</filename> file when it runs with an empty
1552 registry, don't know about
1553 <application>Office 97</application>).
1554 As of now, it might not be necessary any more to use
1555 regedit.exe, since Wine has its own regedit Winelib
1561 Also add <filename>winhelp.exe</filename> and
1562 <filename>winhlp32.exe</filename> if you want to be able
1563 to browse through your programs' help function
1564 (or in case Wine's winhelp implementation in programs/winhelp/
1565 is not good enough, for example).
1571 <sect2 id="config-with-windows">
1572 <title>Installing Wine Using An Existing Windows Partition As Base</title>
1574 Some people intend to use the data of an existing Windows partition
1575 with Wine in order to gain some better compatibility or to run already
1576 installed programs in a setup as original as possible.
1577 Note that many Windows programs assume that they have full write
1578 access to all windows directories.
1580 This means that you either have to configure the Windows
1581 partition mount point for write permission by your Wine user
1582 (see <link linkend="config-drive-vfat">Dealing with FAT/VFAT partitions</link>
1583 on how to do that), or you'll have to copy over (some parts of) the Windows
1584 partition content to a directory of a Unix partition and make
1585 sure this directory structure is writable by your user.
1586 We <emphasis>HIGHLY DISCOURAGE</emphasis> people from directly using a Windows partition with
1587 write access as a base for Wine!! (some programs, notably
1588 Explorer, corrupt large parts of the Windows partition in case
1589 of an incorrect setup; you've been warned).
1590 Not to mention that NTFS write support in Linux is still very
1591 experimental and <emphasis>dangerous</emphasis> (in case you're using an NT-based
1592 Windows version using the NTFS file system).
1593 Thus we advise you to go the Unix directory way.
1597 <sect2 id="config-drive-vfat">
1598 <title>Dealing With FAT/VFAT Partitions</title>
1600 Written by &name-steven-elliott; <email>&email-steven-elliott;</email>
1603 (Extracted from <filename>wine/documentation/linux-fat-permissions</filename>)
1606 This document describes how FAT and
1607 VFAT file system permissions work in Linux
1608 with a focus on configuring them for Wine.
1612 <title>Introduction</title>
1614 Linux is able to access DOS and Windows file systems using
1615 either the FAT (older 8.3 DOS filesystems) or VFAT (newer
1616 Windows 95 or later long filename filesystems) modules.
1617 Mounted FAT or VFAT filesystems provide the primary means
1618 for which existing programs and their data are accessed
1619 through Wine for dual boot (Linux + Windows) systems.
1622 Wine maps mounted FAT filesystems, such as
1623 <filename>/c</filename>, to driver letters, such as
1624 <quote>c:</quote>, as indicated by the
1625 <filename>~/.wine/config</filename> file. The following excerpt
1626 from a <filename>~/.wine/config</filename> file does this:
1634 Although VFAT filesystems are preferable to FAT filesystems
1635 for their long filename support, the term <quote>FAT</quote>
1636 will be used throughout the remainder of this document to
1637 refer to FAT filesystems and their derivatives. Also,
1638 <quote>/c</quote> will be used as the FAT mount point in
1639 examples throughout this document.
1642 Most modern Linux distributions either detect or allow
1643 existing FAT file systems to be configured so that they can be
1644 mounted, in a location such as <filename>/c</filename>,
1645 either persistently (on bootup) or on an as needed basis. In
1646 either case, by default, the permissions will probably be
1647 configured so that they look like:
1650 <prompt>~></prompt><userinput>cd /c</userinput>
1651 <prompt>/c></prompt><userinput>ls -l</userinput>
1652 <computeroutput>-rwxr-xr-x 1 root root 91 Oct 10 17:58 autoexec.bat
1653 -rwxr-xr-x 1 root root 245 Oct 10 17:58 config.sys
1654 drwxr-xr-x 41 root root 16384 Dec 30 1998 windows</computeroutput>
1657 where all the files are owned by "root", are in the "root"
1658 group and are only writable by "root"
1659 (<literal>755</literal> permissions). This is restrictive in
1660 that it requires that Wine be run as root in order for
1661 programs to be able to write to any part of the
1665 There are three major approaches to overcoming the restrictive
1666 permissions mentioned in the previous paragraph:
1671 Run <application>Wine</application> as root
1676 Mount the FAT filesystem with less restrictive
1682 Shadow the FAT filesystem by completely or partially
1688 Each approach will be discussed in the following sections.
1693 <title>Running Wine as root</title>
1695 Running Wine as root is the easiest and most thorough way of giving
1696 programs that Wine runs unrestricted access to FAT files systems.
1697 Running wine as root also allows programs to do things unrelated
1698 to FAT filesystems, such as listening to ports that are less than
1699 1024. Running Wine as root is dangerous since there is no limit to
1700 what the program can do to the system, so it's <emphasis>HIGHLY DISCOURAGED</emphasis>.
1705 <title>Mounting FAT filesystems</title>
1707 The FAT filesystem can be mounted with permissions less restrictive
1708 than the default. This can be done by either changing the user that
1709 mounts the FAT filesystem or by explicitly changing the permissions
1710 that the FAT filesystem is mounted with. The permissions are
1711 inherited from the process that mounts the FAT filesystem. Since the
1712 process that mounts the FAT filesystem is usually a startup script
1713 running as root the FAT filesystem inherits root's permissions. This
1714 results in the files on the FAT filesystem having permissions similar
1715 to files created by root. For example:
1718 <prompt>~></prompt><userinput>whoami</userinput>
1719 <computeroutput>root</computeroutput>
1720 <prompt>~></prompt><userinput>touch root_file</userinput>
1721 <prompt>~></prompt><userinput>ls -l root_file</userinput>
1722 <computeroutput></computeroutput>-rw-r--r-- 1 root root 0 Dec 10 00:20 root_file
1725 which matches the owner, group and permissions of files seen
1726 on the FAT filesystem except for the missing 'x's. The
1727 permissions on the FAT filesystem can be changed by changing
1728 root's umask (unset permissions bits). For example:
1731 <prompt>~></prompt><userinput>umount /c</userinput>
1732 <prompt>~></prompt><userinput>umask</userinput>
1733 <computeroutput>022</computeroutput>
1734 <prompt>~></prompt><userinput>umask 073</userinput>
1735 <prompt>~></prompt><userinput>mount /c</userinput>
1736 <prompt>~></prompt><userinput>cd /c</userinput>
1737 <prompt>/c></prompt><userinput>ls -l</userinput>
1738 <computeroutput>-rwx---r-- 1 root root 91 Oct 10 17:58 autoexec.bat
1739 -rwx---r-- 1 root root 245 Oct 10 17:58 config.sys
1740 drwx---r-- 41 root root 16384 Dec 30 1998 windows</computeroutput>
1743 Mounting the FAT filesystem with a umask of
1744 <literal>000</literal> gives all users complete control over
1745 it. Explicitly specifying the permissions of the FAT
1746 filesystem when it is mounted provides additional control.
1747 There are three mount options that are relevant to FAT
1748 permissions: <literal>uid</literal>, <literal>gid</literal>
1749 and <literal>umask</literal>. They can each be specified
1750 when the filesystem is manually mounted. For example:
1753 <prompt>~></prompt><userinput>umount /c</userinput>
1754 <prompt>~></prompt><userinput>mount -o uid=500 -o gid=500 -o umask=002 /c</userinput>
1755 <prompt>~></prompt><userinput>cd /c</userinput>
1756 <prompt>/c></prompt><userinput>ls -l</userinput>
1757 <computeroutput>-rwxrwxr-x 1 sle sle 91 Oct 10 17:58 autoexec.bat
1758 -rwxrwxr-x 1 sle sle 245 Oct 10 17:58 config.sys
1759 drwxrwxr-x 41 sle sle 16384 Dec 30 1998 windows</computeroutput>
1762 which gives "sle" complete control over
1763 <filename>/c</filename>. The options listed above can be
1764 made permanent by adding them to the
1765 <filename>/etc/fstab</filename> file:
1768 <prompt>~></prompt><userinput>grep /c /etc/fstab</userinput>
1769 <computeroutput>/dev/hda1 /c vfat uid=500,gid=500,umask=002,exec,dev,suid,rw 1 1</computeroutput>
1772 Note that the umask of <literal>002</literal> is common in
1773 the user private group file permission scheme. On FAT file
1774 systems this umask assures that all files are fully
1775 accessible by all users in the specified user group
1776 (<literal>gid</literal>).
1781 <title>Shadowing FAT filesystems</title>
1783 Shadowing provides a finer granularity of control. Parts of
1784 the original FAT filesystem can be copied so that the
1785 program can safely work with those copied parts while
1786 the program continues to directly read the remaining
1787 parts. This is done with symbolic links. For example,
1788 consider a system where a program named
1789 <application>AnApp</application> must be able to read and
1790 write to the <filename>c:\windows</filename> and
1791 <filename>c:\AnApp</filename> directories as well as have
1792 read access to the entire FAT filesystem. On this system
1793 the FAT filesystem has default permissions which should not
1794 be changed for security reasons or can not be changed due to
1795 lack of root access. On this system a shadow directory
1796 might be set up in the following manner:
1799 <prompt>~></prompt><userinput>cd /</userinput>
1800 <prompt>/></prompt><userinput>mkdir c_shadow</userinput>
1801 <prompt>/></prompt><userinput>cd c_shadow</userinput>
1802 <prompt>/c_shadow></prompt><userinput>ln -s /c_/* .</userinput>
1803 <prompt>/c_shadow></prompt><userinput>rm windows AnApp</userinput>
1804 <prompt>/c_shadow></prompt><userinput>cp -R /c_/{windows,AnApp} .</userinput>
1805 <prompt>/c_shadow></prompt><userinput>chmod -R 777 windows AnApp</userinput>
1806 <prompt>/c_shadow></prompt><userinput>perl -p -i -e 's|/c$|/c_shadow|g' ~/.wine/config</userinput>
1809 The above gives everyone complete read and write access to
1810 the <filename>windows</filename> and
1811 <filename>AnApp</filename> directories while only root has
1812 write access to all other directories.
1817 <sect2 id="config-drive-cdrom-labels">
1821 <firstname>Petr</firstname>
1822 <surname>Tomasek</surname>
1824 <address><email>&email-petr-tomasek;</email></address>
1826 <contrib>Nov 14 1999</contrib>
1829 <firstname>Andreas</firstname>
1830 <surname>Mohr</surname>
1832 <address><email>&email-andreas-mohr;</email></address>
1834 <contrib>Jan 25 2000</contrib>
1839 <title>Drive labels and serial numbers</title>
1841 Written by &name-petr-tomasek; <email>&email-petr-tomasek;</email>
1845 Changes by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
1849 (Extracted from <filename>wine/documentation/cdrom-labels</filename>)
1852 Until now, your only possibility of specifying drive volume
1853 labels and serial numbers was to set them manually in the wine
1854 configuration file. By now, wine can read them directly from the
1855 device as well. This may be useful for many Win 9x games or
1856 for setup programs distributed on CD-ROMs that check for
1861 <title>What's Supported?</title>
1863 <informaltable frame="all">
1867 <entry>File System</entry>
1868 <entry>Types</entry>
1869 <entry>Comment</entry>
1874 <entry>FAT systems</entry>
1875 <entry>hd, floppy</entry>
1876 <entry>reads labels and serial numbers</entry>
1879 <entry>ISO9660</entry>
1880 <entry>cdrom</entry>
1881 <entry>reads labels and serial numbers (not mixed-mode CDs yet!)</entry>
1890 <title>How To Set Up?</title>
1892 Reading labels and serial numbers just works automatically
1893 if you specify a <literal>"Device" =</literal> line in the
1894 [Drive x] section in your <filename>~/.wine/config</filename>.
1895 Note that the device has to exist and must be accessible by the user
1896 running Wine if you do this, though.
1899 If you don't want to read labels and serial numbers directly from
1900 the device, then you should give fixed
1901 <literal>"Label" =</literal> or <literal>"Serial" =</literal>
1902 entries in <filename>~/.wine/config</filename>, as Wine returns
1903 these entries instead if no device is given. If they don't
1904 exist, then Wine will return default values (label
1905 <literal>Drive X</literal> and serial
1906 <literal>12345678</literal>).
1909 If you want to give a <literal>"Device" =</literal> entry
1910 <emphasis>only</emphasis> for drive raw sector accesses,
1911 but not for reading the volume info from the device (i.e. you want
1912 a <emphasis>fixed</emphasis>, preconfigured label), you need
1913 to specify <literal>"ReadVolInfo" = "0"</literal> to tell Wine
1914 to skip the volume reading.
1919 <title>Examples</title>
1921 Here's a simple example of CD-ROM and floppy; labels will be
1922 read from the device on both CD-ROM and floppy; serial
1923 numbers on floppy only:
1927 "Path" = "/mnt/floppy"
1929 "Device" = "/dev/fd0"
1930 "Filesystem" = "msdos"
1933 "Path" = "/mnt/cdrom"
1935 "Device" = "/dev/hda1"
1936 "Filesystem" = "win95"
1939 Here's an example of overriding the CD-ROM label:
1943 "Path" = "/mnt/cdrom"
1945 "Label" = "X234GCDSE"
1946 ; note that the device isn't really needed here as we have a fixed label
1947 "Device" = "/dev/cdrom"
1948 "Filesystem" = "msdos"
1953 <title>Todo / Open Issues</title>
1956 The CD-ROM label can be read only if the data track of
1957 the disk resides in the first track and the cdrom is
1961 Better checking for FAT superblock (it now checks only
1965 Support for labels/serial nums WRITING.
1968 Can the label be longer than 11 chars? (iso9660 has 32
1972 What about reading ext2 volume label? ....
1981 <sect1 id="config-dll">
1982 <title>DLL configuration</title>
1985 <title>Introduction</title>
1987 If your programs don't work as expected, then it's often because one
1988 DLL or another is failing. This can often be resolved by changing
1989 certain DLLs from Wine built-in to native Windows DLL file and vice
1993 A very useful help to find out which DLLs are loaded as built-in and
1994 which are loaded as native Windows file can be the debug channel
1995 loaddll, activated via the Wine command line parameter
1996 <command>--debugmsg +loaddll</command>.
2001 <!-- FIXME intro!!! -->
2002 <title>Introduction To DLL Sections</title>
2004 There are a few things you will need to know before
2005 configuring the DLL sections in your wine configuration
2009 <title>Windows DLL Pairs</title>
2011 Most windows DLL's have a win16 (Windows 3.x) and win32
2012 (Windows 9x/NT) form. The combination of the win16 and
2013 win32 DLL versions are called the "DLL pair". This is a
2014 list of the most common pairs:
2021 <entry>Win16</entry>
2022 <entry>Win32</entry>
2027 Is it possible to use native DLL with wine?
2036 <entry>KERNEL</entry>
2037 <entry>KERNEL32</entry>
2042 <entry>USER32</entry>
2046 <entry>SHELL</entry>
2047 <entry>SHELL32</entry>
2052 <entry>GDI32</entry>
2056 <entry>COMMDLG</entry>
2057 <entry>COMDLG32</entry>
2062 <entry>VERSION</entry>
2071 <title>Different Forms Of DLL's</title>
2073 There are a few different forms of DLL's wine can load:
2078 The DLL's that are included with windows. Many
2079 windows DLL's can be loaded in their native
2080 form. Many times these native versions work
2081 better than their non-Microsoft equivalent --
2082 other times they don't.
2086 <term>builtin</term>
2088 The most common form of DLL loading. This is
2089 what you will use if the DLL is too system-specific
2090 or error-prone in native form (KERNEL for example),
2091 you don't have the native DLL, or you just want to be
2098 Native ELF libraries. Has been deprecated, ignored.
2104 ELF encapsulated windows DLL's.
2105 No longer used, ignored.
2113 <sect2 id="config-dll-overrides">
2114 <title>DLL Overrides</title>
2117 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
2120 (Extracted from <filename>wine/documentation/dll-overrides</filename>)
2124 The wine configuration file directives [DllDefaults]
2125 and [DllOverrides] are the subject of some confusion. The
2126 overall purpose of most of these directives are clear enough,
2127 though - given a choice, should Wine use its own built-in
2128 DLLs, or should it use <filename>.DLL</filename> files found
2129 in an existing Windows installation? This document explains
2130 how this feature works.
2134 <title>DLL types</title>
2139 A "native" DLL is a <filename>.DLL</filename> file
2140 written for the real Microsoft Windows.
2144 <term>builtin</term>
2146 A "built-in" DLL is a Wine DLL. These can either be a
2147 part of <filename>libwine.so</filename>, or more
2148 recently, in a special <filename>.so</filename> file
2149 that Wine is able to load on demand.
2156 <title>The [DllDefaults] section</title>
2159 <term>DefaultLoadOrder</term>
2161 This specifies in what order Wine should search for
2162 available DLL types, if the DLL in question was not
2163 found in the [DllOverrides] section.
2170 <title>The [DllPairs] section</title>
2172 At one time, there was a section called [DllPairs] in the
2173 default configuration file, but this has been obsoleted
2174 because the pairing information has now been embedded into
2175 Wine itself. (The purpose of this section was merely to be
2176 able to issue warnings if the user attempted to pair
2177 codependent 16-bit/32-bit DLLs of different types.) If you
2178 still have this in your <filename>~/.wine/config</filename> or
2179 <filename>wine.conf</filename>, you may safely delete it.
2184 <title>The [DllOverrides] section</title>
2186 This section specifies how you want specific DLLs to be
2187 handled, in particular whether you want to use "native" DLLs
2188 or not, if you have some from a real Windows configuration.
2189 Because built-ins do not mix seamlessly with native DLLs yet,
2190 certain DLL dependencies may be problematic, but workarounds
2191 exist in Wine for many popular DLL configurations. Also see
2192 WWN's [16]Status Page to figure out how well your favorite
2193 DLL is implemented in Wine.
2196 It is of course also possible to override these settings by
2197 explicitly using Wine's <parameter>--dll</parameter>
2198 command-line option (see the man page for details). Some
2199 hints for choosing your optimal configuration (listed by
2200 16/32-bit DLL pair):
2204 <term>krnl386, kernel32</term>
2206 Native versions of these will never work, so don't try. Leave
2207 at <literal>builtin</literal>.
2211 <term>gdi, gdi32</term>
2213 Graphics Device Interface. No effort has been made at trying to
2214 run native GDI. Leave at <literal>builtin</literal>.
2218 <term>user, user32</term>
2220 Window management and standard controls. It was
2221 possible to use Win95's <literal>native</literal>
2222 versions at some point (if all other DLLs that depend
2223 on it, such as comctl32 and comdlg32, were also run
2224 <literal>native</literal>). However, this is no longer
2225 possible after the Address Space Separation, so leave
2226 at <literal>builtin</literal>.
2232 NT kernel API. Although badly documented, the
2233 <literal>native</literal> version of this will never
2234 work. Leave at <literal>builtin</literal>.
2238 <term>w32skrnl</term>
2240 Win32s (for Win3.x). The <literal>native</literal>
2241 version will probably never work. Leave at
2242 <literal>builtin</literal>.
2248 Win16 support library for NT. The
2249 <literal>native</literal> version will probably never
2250 work. Leave at <literal>builtin</literal>.
2256 Win16 kernel stuff. Will never work
2257 <literal>native</literal>. Leave at
2258 <literal>builtin</literal>.
2262 <term>display</term>
2264 Display driver. Definitely leave at <literal>builtin</literal>.
2268 <term>toolhelp</term>
2270 Tool helper routines. This is rarely a source of problems.
2271 Leave at <literal>builtin</literal>.
2275 <term>ver, version</term>
2277 Versioning. Seldom useful to mess with.
2281 <term>advapi32</term>
2283 Registry and security features. Trying the
2284 <literal>native</literal> version of this may or may
2289 <term>commdlg, comdlg32</term>
2291 Common Dialogs, such as color picker, font dialog,
2292 print dialog, open/save dialog, etc. It is safe to try
2293 <literal>native</literal>.
2297 <term>commctrl, comctl32</term>
2299 Common Controls. This is toolbars, status bars, list controls,
2300 the works. It is safe to try <literal>native</literal>.
2304 <term>shell, shell32</term>
2306 Shell interface (desktop, filesystem, etc). Being one of the
2307 most undocumented pieces of Windows, you may have luck with the
2308 <literal>native</literal> version, should you need it.
2312 <term>winsock, wsock32</term>
2314 Windows Sockets. The <literal>native</literal> version
2315 will not work under Wine, so leave at
2316 <literal>builtin</literal>.
2322 ICMP routines for wsock32. As with wsock32, leave at
2323 <literal>builtin</literal>.
2329 The <literal>native</literal> version may not work due
2330 to thunking issues. Leave at
2331 <literal>builtin</literal>.
2335 <term>lzexpand, lz32</term>
2337 Lempel-Ziv decompression. Wine's
2338 <literal>builtin</literal> version ought to work fine.
2342 <term>winaspi, wnaspi32</term>
2344 Advanced SCSI Peripheral Interface. The
2345 <literal>native</literal> version will probably never
2346 work. Leave at <literal>builtin</literal>.
2352 C Runtime library. The <literal>native</literal>
2353 version will easily work better than Wine's on this
2358 <term>winspool.drv</term>
2360 Printer spooler. You are not likely to have more luck
2361 with the <literal>native</literal> version.
2367 DirectDraw/Direct3D. Since Wine does not implement the
2368 DirectX HAL, the <literal>native</literal> version
2369 will not work at this time.
2375 DirectInput. Running this <literal>native</literal>
2376 may or may not work.
2382 DirectSound. It may be possible to run this
2383 <literal>native</literal>, but don't count on it.
2387 <term>dplay/dplayx</term>
2389 DirectPlay. The <literal>native</literal> version
2390 ought to work best on this, if at all.
2394 <term>mmsystem, winmm</term>
2396 Multimedia system. The <literal>native</literal>
2397 version is not likely to work. Leave at
2398 <literal>builtin</literal>.
2402 <term>msacm, msacm32</term>
2404 Audio Compression Manager. The
2405 <literal>builtin</literal> version works best, if you
2406 set msacm.drv to the same.
2410 <term>msvideo, msvfw32</term>
2412 Video for Windows. It is safe (and recommended) to try
2413 <literal>native</literal>.
2417 <term>mcicda.drv</term>
2419 CD Audio MCI driver.
2423 <term>mciseq.drv</term>
2425 MIDI Sequencer MCI driver (<filename>.MID</filename>
2430 <term>mciwave.drv</term>
2432 Wave audio MCI driver (<filename>.WAV</filename> playback).
2436 <term>mciavi.drv</term>
2438 AVI MCI driver (<filename>.AVI</filename> video
2439 playback). Best to use <literal>native</literal>.
2443 <term>mcianim.drv</term>
2445 Animation MCI driver.
2449 <term>msacm.drv</term>
2451 Audio Compression Manager. Set to same as msacm32.
2455 <term>midimap.drv</term>
2463 This is a pseudo-DLL used by Wine for thunking
2464 purposes. A <literal>native</literal> version of this
2472 <sect2 id="config-system-dlls">
2473 <title>System DLLs</title>
2475 The Wine team has determined that it is necessary to create
2476 fake DLL files to trick many programs that check for
2477 file existence to determine whether a particular feature
2478 (such as Winsock and its TCP/IP networking) is available. If
2479 this is a problem for you, you can create empty files in the
2480 configured <filename>c:\windows\system</filename> directory
2481 to make the program think it's there, and Wine's built-in DLL
2482 will be loaded when the program actually asks for it.
2483 (Unfortunately, <filename>tools/wineinstall</filename> does
2484 not create such empty files itself.)
2487 Applications sometimes also try to inspect the version
2488 resources from the physical files (for example, to determine
2489 the DirectX version). Empty files will not do in this case,
2490 it is rather necessary to install files with complete
2491 version resources. This problem is currently being worked
2492 on. In the meantime, you may still need to grab some real
2493 DLL files to fool these apps with.
2496 And there are of course DLLs that wine does not currently
2497 implement very well (or at all). If you do not have a real
2498 Windows you can steal necessary DLLs from, you can always
2499 get some from one of the Windows DLL archive sites
2500 that can be found via internet search engine.
2501 Please make sure to obey any licenses on the DLLs you fetch...
2502 (some are redistributable, some aren't).
2506 <sect2 id="config-dll-missing">
2507 <title>Missing DLLs</title>
2510 Written by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
2514 In case Wine complains about a missing DLL, you should check whether
2515 this file is a publicly available DLL or a custom DLL belonging
2516 to your program (by searching for its name on the internet).
2517 If you managed to get hold of the DLL, then you should make sure
2518 that Wine is able to find and load it.
2519 DLLs usually get loaded according to the mechanism of the
2520 SearchPath() function.
2521 This function searches directories in the following order:
2526 The directory the program was started from.
2531 The current directory.
2536 The Windows system directory.
2541 The Windows directory.
2546 The PATH variable directories.
2551 In short: either put the required DLL into your program
2552 directory (might be ugly), or usually put it into the Windows system
2553 directory. Just find out its directory by having a look at the Wine
2554 configuration file variable "System" (which indicates the location of the
2555 Windows system directory) and the associated drive entry.
2556 Note that you probably shouldn't use NT-based native DLLs,
2557 since Wine's NT API support is somewhat weaker than its Win9x
2558 API support (thus leading to even worse compatibility with NT DLLs
2559 than with a no-windows setup!), so better use Win9x native DLLs
2560 instead or no native DLLs at all.
2564 <sect2 id="config-dll-windows">
2565 <title>Fetching native DLLs from a Windows CD</title>
2568 Written by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
2572 The Linux <command>cabextract</command> utility can be used to
2573 extract native Windows .dll files from .cab files that are to be
2574 found on many Windows installation CDs.
2579 <sect1 id="config-graphics-driver">
2580 <title>Configuring the graphics driver (x11drv, ttydrv etc.)</title>
2583 Wine currently supports several different display subsystems
2584 (graphics / text) that are available on various operating
2586 For each of these, Wine implements its own interfacing driver.
2587 This section explains how to select one of these drivers
2588 and how to further configure the respective driver.
2589 Once you're finished with that, you can consider your Wine installation
2594 The display drivers currently implemented in Wine are:
2595 x11drv, which is used for interfacing to X11 graphics
2596 (the one you'll most likely want to use) and ttydrv
2597 (used for text mode console apps mainly that don't really need
2598 any graphics output).
2599 Once you have decided which display driver to use, it is chosen
2600 with the <literal>GraphicsDriver</literal> option in the
2601 [wine] section of <filename>~/.wine/config</filename>.
2605 <title>Configuring the x11drv graphics driver</title>
2608 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
2611 (Extracted from <filename>wine/documentation/x11drv</filename>)
2615 <title>x11drv modes of operation</title>
2618 The x11drv driver consists of two conceptually distinct
2619 pieces, the graphics driver (GDI part), and the windowing
2620 driver (USER part). Both of these are linked into the
2621 <filename>libx11drv.so</filename> module, though (which you
2622 load with the <literal>GraphicsDriver</literal> option). In
2623 Wine, running on X11, the graphics driver must draw on
2624 drawables (window interiors) provided by the windowing
2625 driver. This differs a bit from the Windows model, where the
2626 windowing system creates and configures device contexts
2627 controlled by the graphics driver, and programs are
2628 allowed to hook into this relationship anywhere they like.
2629 Thus, to provide any reasonable tradeoff between
2630 compatibility and usability, the x11drv has three different
2636 <term>Managed</term>
2639 The default. Specified by using the <literal>Managed</literal>
2640 wine configuration file option (see below).
2641 Ordinary top-level frame windows with thick borders,
2642 title bars, and system menus will be managed by your
2643 window manager. This lets these programs integrate
2644 better with the rest of your desktop, but may not
2645 always work perfectly (a rewrite of this mode of
2646 operation, to make it more robust and less patchy, is
2647 currently being done, though, and it's planned to be
2648 finished before the Wine 1.0 release).
2653 <term>Unmanaged / Normal</term>
2656 Window manager independent (any running
2657 window manager is ignored completely). Window
2658 decorations (title bars, borders, etc) are drawn by
2659 Wine to look and feel like the real Windows. This is
2660 compatible with programs that depend on being able
2661 to compute the exact sizes of any such decorations, or
2662 that want to draw their own.
2663 Unmanaged mode is only used if both Managed and Desktop
2664 are set to disabled.
2669 <term>Desktop-in-a-Box</term>
2672 Specified by using the <literal>Desktop</literal>
2673 wine configuration file option (see below).
2674 (adding a geometry, e.g. <literal>800x600</literal>
2675 for a such-sized desktop, or
2676 even <literal>800x600+0+0</literal> to
2677 automatically position the desktop at the upper-left
2678 corner of the display). This is the mode most
2679 compatible with the Windows model. All program
2680 windows will just be Wine-drawn windows inside the
2681 Wine-provided desktop window (which will itself be
2682 managed by your window manager), and Windows
2683 programs can roam freely within this virtual
2684 workspace and think they own it all, without
2685 disturbing your other X apps.
2686 Note: currently there's one desktop window for every
2687 program; this will be fixed at some time.
2695 <title>The [x11drv] section</title>
2699 <term>Managed</term>
2702 Wine can let frame windows be managed by your window
2703 manager. This option specifies whether you want that
2709 <term>Desktop</term>
2712 Creates a main desktop window of a specified size
2713 to display all Windows programs in.
2714 The size argument could e.g. be "800x600".
2722 If you don't use DGA, you may want an alternative
2723 means to convince the mouse cursor to stay within the
2724 game window. This option does that. Of course, as with
2725 DGA, if Wine crashes, you're in trouble (although not
2726 as badly as in the DGA case, since you can still use
2727 the keyboard to get out of X).
2735 This specifies whether you want DirectDraw to use
2736 XFree86's <firstterm>Direct Graphics
2737 Architecture</firstterm> (DGA), which is able to
2738 take over the entire display and run the game
2739 full-screen at maximum speed. (With DGA1 (XFree86
2740 3.x), you still have to configure the X server to the
2741 game's requested bpp first, but with DGA2 (XFree86
2742 4.x), runtime depth-switching may be possible,
2743 depending on your driver's capabilities.) But be aware
2744 that if Wine crashes while in DGA mode, it may not be
2745 possible to regain control over your computer without
2746 rebooting. DGA normally requires either root
2747 privileges or read/write access to
2748 <filename>/dev/mem</filename>.
2753 <term>UseXShm</term>
2756 If you don't want DirectX to use DGA, you can at least
2757 use X Shared Memory extensions (XShm). It is much
2758 slower than DGA, since the app doesn't have direct
2759 access to the physical frame buffer, but using shared
2760 memory to draw the frame is at least faster than
2761 sending the data through the standard X11 socket, even
2762 though Wine's XShm support is still known to crash
2768 <term>DesktopDoubleBuffered</term>
2771 Applies only if you use the
2772 <parameter>--desktop</parameter> command-line option
2773 to run in a desktop window. Specifies whether to
2774 create the desktop window with a double-buffered
2775 visual, something most OpenGL games need to run
2781 <term>AllocSystemColors</term>
2784 Applies only if you have a palette-based display, i.e.
2785 if your X server is set to a depth of 8bpp, and if you
2786 haven't requested a private color map. It specifies
2787 the maximum number of shared colormap cells (palette
2788 entries) Wine should occupy. The higher this value,
2789 the less colors will be available to other
2795 <term>PrivateColorMap</term>
2798 Applies only if you have a palette-based display, i.e.
2799 if your X server is set to a depth of 8bpp. It
2800 specifies that you don't want to use the shared color
2801 map, but a private color map, where all 256 colors are
2802 available. The disadvantage is that Wine's private
2803 color map is only seen while the mouse pointer is
2804 inside a Wine window, so psychedelic flashing and
2805 funky colors will become routine if you use the mouse
2811 <term>Synchronous</term>
2814 To be used for debugging X11 operations.
2815 If Wine crashes with an X11 error, then you should enable
2816 Synchronous mode to disable X11 request caching in order
2817 to make sure that the X11 error happens directly after
2818 the corresponding X11 call in the log file appears.
2819 Will slow down X11 output!
2824 <term>ScreenDepth</term>
2827 Applies only to multi-depth displays. It specifies
2828 which of the available depths Wine should use (and
2829 tell Windows apps about).
2834 <term>Display</term>
2837 This specifies which X11 display to use, and if
2838 specified, will override the
2839 <envar>DISPLAY</envar> environment variable.
2844 <term>PerfectGraphics</term>
2847 This option only determines whether fast X11 routines
2848 or exact Wine routines will be used for certain ROP
2849 codes in blit operations. Most users won't notice any
2859 <title>Configuring the ttydrv graphics driver</title>
2861 Currently, the ttydrv doesn't have any special configuration
2862 options to set in the configuration file.
2868 <sect1 id="config-windows-versions">
2870 <title>Setting the Windows and DOS version value</title>
2873 Written by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
2878 The windows and DOS version value a program gets e.g. by calling the
2879 Windows function GetVersion() plays a very important role:
2880 If your Wine installation for whatever reason fails to provide
2881 to your program the correct version value that it expects,
2882 then the program might assume some very bad things and fail (in
2883 the worst case even silently!).
2885 Fortunately Wine contains some more or less intelligent Windows
2886 version guessing algorithm that will try to guess the Windows
2887 version a program might expect and pass that one on to the
2890 Thus you should <emphasis>not</emphasis> lightly configure a version value, as this will be a "forced" value and thus turn out to be rather harmful to proper operation. In other words: only explicitly set a Windows version value in case Wine's own version detection was unable to provide the correct Windows version and the program fails.
2894 <title>How to configure the Windows and DOS version value Wine
2895 should return</title>
2898 The version values can be configured in the wine configuration file in
2899 the [Version] section.
2904 <term>"Windows" = "<version string>"</term>
2907 default: none; chosen by semi-intelligent detection
2908 mechanism based on DLL environment.
2909 Used to specify which Windows version to return to
2910 programs (forced value, overrides standard detection
2911 mechanism!). Valid settings are e.g. "win31", "win95",
2912 "win98", "win2k", "winxp".
2914 <link linkend="config-appdefaults">AppDefaults</link>
2915 setting (recommended/preferred use).
2920 <term>"DOS"="<version string>"</term>
2923 Used to specify the DOS version that should be returned
2924 to programs. Only takes effect in case Wine acts as
2925 "win31" Windows version! Common DOS version settings
2926 include 6.22, 6.20, 6.00, 5.00, 4.00, 3.30, 3.10.
2928 <link linkend="config-appdefaults">AppDefaults</link>
2929 setting (recommended/preferred use).
2940 <sect1 id="config-win95look">
2941 <title>Win95/98 Look And Feel</title>
2943 Written by &name-david-cuthbert; <email>&email-david-cuthbert;</email>
2946 (Extracted from <filename>wine/documentation/win95look</filename>)
2949 Win95/Win98 interface code is being introduced.
2952 Instead of compiling Wine for Win3.1 vs. Win95 using
2953 <constant>#define</constant> switches, the code now looks in a
2954 special [Tweak.Layout] section of
2955 <filename>~/.wine/config</filename> for a
2956 <literal>"WineLook" = "Win95"</literal> or
2957 <literal>"WineLook" = "Win98"</literal> entry.
2960 A few new sections and a number of entries have been added to
2961 the <filename>~/.wine/config</filename> file -- these are for
2962 debugging the Win95 tweaks only and may be removed in a future
2963 release! These entries/sections are:
2967 "System.Height" = "<point size>" # Sets the height of the system typeface
2968 "System.Bold" = "[true|false]" # Whether the system font should be boldfaced
2969 "System.Italic" = "[true|false]" # Whether the system font should be italicized
2970 "System.Underline" = "[true|false]" # Whether the system font should be underlined
2971 "System.StrikeOut" = "[true|false]" # Whether the system font should be struck out
2972 "OEMFixed.xxx" # Same parameters for the OEM fixed typeface
2973 "AnsiFixed.xxx" # Same parameters for the Ansi fixed typeface
2974 "AnsiVar.xxx" # Same parameters for the Ansi variable typeface
2975 "SystemFixed.xxx" # Same parameters for the System fixed typeface
2978 "WineLook" = "[Win31|Win95|Win98]" # Changes Wine's look and feel
2982 <sect1 id="config-keyboard">
2983 <title>Keyboard</title>
2986 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
2989 (Extracted from <filename>wine/documentation/keyboard</filename>)
2993 Wine now needs to know about your keyboard layout. This
2994 requirement comes from a need from many apps to have the
2995 correct scancodes available, since they read these directly,
2996 instead of just taking the characters returned by the X
2997 server. This means that Wine now needs to have a mapping from
2998 X keys to the scancodes these programs expect.
3001 On startup, Wine will try to recognize the active X layout by
3002 seeing if it matches any of the defined tables. If it does,
3003 everything is alright. If not, you need to define it.
3006 To do this, open the file
3007 <filename>dlls/x11drv/keyboard.c</filename> and take a look
3008 at the existing tables. Make a backup copy of it, especially
3009 if you don't use CVS.
3012 What you really would need to do, is find out which scancode
3013 each key needs to generate. Find it in the
3014 <function>main_key_scan</function> table, which looks like
3018 static const int main_key_scan[MAIN_LEN] =
3020 /* this is my (102-key) keyboard layout, sorry if it doesn't quite match yours */
3021 0x29,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,
3022 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,
3023 0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2B,
3024 0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,
3025 0x56 /* the 102nd key (actually to the right of l-shift) */
3029 Next, assign each scancode the characters imprinted on the
3030 keycaps. This was done (sort of) for the US 101-key keyboard,
3031 which you can find near the top in
3032 <filename>keyboard.c</filename>. It also shows that if there
3033 is no 102nd key, you can skip that.
3036 However, for most international 102-key keyboards, we have
3037 done it easy for you. The scancode layout for these already
3038 pretty much matches the physical layout in the
3039 <function>main_key_scan</function>, so all you need to do is
3040 to go through all the keys that generate characters on your
3041 main keyboard (except spacebar), and stuff those into an
3042 appropriate table. The only exception is that the 102nd key,
3043 which is usually to the left of the first key of the last line
3044 (usually <keycap>Z</keycap>), must be placed on a separate
3045 line after the last line.
3048 For example, my Norwegian keyboard looks like this
3051 § ! " # ¤ % & / ( ) = ? ` Back-
3052 | 1 2@ 3£ 4$ 5 6 7{ 8[ 9] 0} + \´ space
3054 Tab Q W E R T Y U I O P Ã… ^
3057 Caps A S D F G H J K L Ø Æ *
3060 Sh- > Z X C V B N M ; : _ Shift
3063 Ctrl Alt Spacebar AltGr Ctrl
3066 Note the 102nd key, which is the <keycap><></keycap> key, to
3067 the left of <keycap>Z</keycap>. The character to the right of
3068 the main character is the character generated by
3069 <keycap>AltGr</keycap>.
3072 This keyboard is defined as follows:
3075 static const char main_key_NO[MAIN_LEN][4] =
3077 "|§","1!","2\"@","3#£","4¤$","5%","6&","7/{","8([","9)]","0=}","+?","\\´",
3078 "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","åÅ","¨^~",
3079 "aA","sS","dD","fF","gG","hH","jJ","kK","lL","øØ","æÆ","'*",
3080 "zZ","xX","cC","vV","bB","nN","mM",",;",".:","-_",
3085 Except that " and \ needs to be quoted with a backslash, and
3086 that the 102nd key is on a separate line, it's pretty
3090 After you have written such a table, you need to add it to the
3091 <function>main_key_tab[]</function> layout index table. This
3092 will look like this:
3096 WORD lang, ansi_codepage, oem_codepage;
3097 const char (*key)[MAIN_LEN][4];
3101 {MAKELANGID(LANG_NORWEGIAN,SUBLANG_DEFAULT), 1252, 865, &main_key_NO},
3105 After you have added your table, recompile Wine and test that
3106 it works. If it fails to detect your table, try running
3109 wine --debugmsg +key,+keyboard >& key.log
3112 and look in the resulting <filename>key.log</filename> file to
3113 find the error messages it gives for your layout.
3116 Note that the <constant>LANG_*</constant> and
3117 <constant>SUBLANG_*</constant> definitions are in
3118 <filename>include/winnls.h</filename>, which you might need to
3119 know to find out which numbers your language is assigned, and
3120 find it in the debugmsg output. The numbers will be
3121 <literal>(SUBLANG * 0x400 + LANG)</literal>, so, for example
3122 the combination <literal>LANG_NORWEGIAN (0x14)</literal> and
3123 <literal>SUBLANG_DEFAULT (0x1)</literal> will be (in hex)
3124 <literal>14 + 1*400 = 414</literal>, so since I'm Norwegian, I
3125 could look for <literal>0414</literal> in the debugmsg output
3126 to find out why my keyboard won't detect.
3129 Once it works, submit it to the Wine project. If you use CVS,
3130 you will just have to do
3133 cvs -z3 diff -u dlls/x11drv/keyboard.c > layout.diff
3136 from your main Wine directory, then submit
3137 <filename>layout.diff</filename> to
3138 <email>wine-patches@winehq.com</email> along with a brief note
3142 If you don't use CVS, you need to do
3145 diff -u the_backup_file_you_made dlls/x11drv/keyboard.c > layout.diff
3148 and submit it as explained above.
3151 If you did it right, it will be included in the next Wine
3152 release, and all the troublesome programs (especially
3153 remote-control programs) and games that use scancodes will
3154 be happily using your keyboard layout, and you won't get those
3155 annoying fixme messages either.
3162 <sect1 id="config-scsi-support">
3163 <title>SCSI Support</title>
3165 Written by &name-bruce-milner; <email>&email-bruce-milner;</email>;
3166 Additions by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
3169 (Extracted from <filename>wine/documentation/aspi</filename>)
3173 This file describes setting up the Windows ASPI interface.
3177 <warning><title>Warning/Warning/Warning!!!!!!</title>
3178 <para>This may trash your system if used incorrectly. It may
3179 even trash your system when used <emphasis>correctly</>!
3185 Now that I have said that. ASPI is a direct link to SCSI devices from
3186 windows programs. ASPI just forwards the SCSI commands that programs send
3187 to it to the SCSI bus.
3190 If you use the wrong SCSI device in your setup file, you can send
3191 completely bogus commands to the wrong device - An example would be
3192 formatting your hard drives (assuming the device gave you permission -
3193 if you're running as root, all bets are off).
3196 So please make sure that <emphasis>all</emphasis> SCSI devices not needed by the program
3197 have their permissions set as restricted as possible!
3201 Cookbook for setting up scanner: (At least how mine is to work)
3202 (well, for other devices such as CD burners, MO drives, ..., too)
3206 <title>Windows requirements</title>
3210 The scanner software needs to use the "Adaptec"
3211 compatible drivers (ASPI). At least with Mustek, they
3212 allow you the choice of using the built-in card or the
3213 "Adaptec (AHA)" compatible drivers. This will not work
3214 any other way. Software that accesses the scanner via a
3215 DOS ASPI driver (e.g. ASPI2DOS) is supported, too. [AM]
3220 You probably need a real windows install of the software
3221 to set the LUN's/SCSI id's up correctly. I'm not exactly
3229 <title>Linux requirements</title>
3233 Your SCSI card must be supported under Linux. This will
3234 not work with an unknown SCSI card. Even for cheap'n
3235 crappy "scanner only" controllers some special Linux
3236 drivers exist on the net.
3237 If you intend to use your IDE device, you need to use the
3240 <ulink url="http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html">
3241 http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html</ulink>
3242 for ide-scsi setup instructions.
3247 Compile generic SCSI drivers into your kernel.
3252 This seems to be not required any more for newer (2.2.x) kernels:
3253 Linux by default uses smaller SCSI buffers than Windows.
3254 There is a kernel build define <literal>SG_BIG_BUFF</literal> (in
3255 <filename>sg.h</filename>) that is by default set too
3256 low. The SANE project recommends
3257 <literal>130560</literal> and this seems to work just
3258 fine. This does require a kernel rebuild.
3263 Make the devices for the scanner (generic SCSI devices)
3264 - look at the SCSI programming HOWTO at
3265 <ulink url="http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html">
3266 http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html</ulink>
3267 for device numbering.
3272 I would recommend making the scanner device writable by
3273 a group. I made a group called
3274 <literal>scanner</literal> and added myself to it.
3275 Running as root increases your risk of sending bad SCSI
3276 commands to the wrong device. With a regular user, you
3277 are better protected.
3282 For Win32 software (WNASPI32), Wine has auto-detection in place.
3283 For Win16 software (WINASPI), you need to add a SCSI device entry
3284 for your particular scanner to ~/.wine/config. The format is
3285 <literal>[scsi cCtTdD]</literal> where
3286 <literal>"C" = "controller"</literal>,
3287 <literal>"T" = "target"</literal>, <literal>D=LUN</literal>
3290 For example, I set mine up as controller <literal>0</literal>,
3291 Target <literal>6</literal>, LUN <literal>0</literal>.
3294 "Device" = "/dev/sgi"
3296 Yours will vary with your particular SCSI setup.
3303 <title>General Information</title>
3305 The mustek scanner I have was shipped with a package
3306 "ipplus". This program uses the TWAIN driver specification
3314 ipplus.exe <-> (TWAIN INTERFACE) <-> (TWAIN DATA SOURCE.ASPI) -> WINASPI
3320 <title>NOTES/BUGS</title>
3322 The biggest drwback is that it only works under Linux at the moment.
3325 The ASPI code has only been tested with:
3330 a Mustek 800SP with a Buslogic controller under Linux [BM]
3335 a Siemens Nixdorf 9036 with Adaptec AVA-1505 under Linux
3336 accessed via DOSASPI. Note that I had color problems,
3337 though (barely readable result) [AM]
3342 a Fujitsu M2513A MO drive (640MB) using generic SCSI
3343 drivers. Formatting and ejecting worked perfectly.
3344 Thanks to Uwe Bonnes for access to the hardware! [AM]
3349 I make no warranty to the ASPI code. It makes my scanner
3350 work. Your devices may explode. I have no way of determining
3351 this. I take zero responsibility!
3356 <sect1 id="config-odbc">
3357 <title>Using ODBC</title>
3359 This section describes how ODBC works within Wine and how to configure
3360 it to do what you want (if it can do what you want).
3363 The ODBC system within Wine, as with the printing system, is designed
3364 to hook across to the Unix system at a high level. Rather than
3365 ensuring that all the windows code works under wine it uses a suitable
3366 Unix ODBC provider, such as UnixODBC. Thus if you configure Wine to
3367 use the built-in odbc32.dll, that Wine DLL will interface to your
3368 Unix ODBC package and let that do the work, whereas if you configure
3369 Wine to use the native odbc32.dll it will try to use the native
3373 <title>Using a Unix ODBC system with Wine</title>
3375 The first step in using a Unix ODBC system with Wine is, of course,
3376 to get the Unix ODBC system working itself. This may involve
3377 downloading code or RPMs etc. There are several Unix ODBC systems
3378 available; the one the author is used to is unixODBC (with the
3379 IBM DB2 driver). Typically such systems will include a tool, such
3380 as <command>isql</command>, which will allow you to access the data from the command
3381 line so that you can check that the system is working.
3384 The next step is to hook the Unix ODBC library to the wine built-in
3385 odbc32 DLL. The built-in odbc32 (currently) looks to the
3386 environment variable <emphasis>LIB_ODBC_DRIVER_MANAGER</emphasis>
3387 for the name of the ODBC library. For example in the author's
3388 .bashrc file is the line:
3391 export LIB_ODBC_DRIVER_MANAGER=/usr/lib/libodbc.so.1.0.0
3394 If that environment variable is not set then it looks for a
3395 library called libodbc.so and so you can add a symbolic link to
3396 equate that to your own library. For example as root you could
3400 <prompt># </prompt><userinput>ln -s libodbc.so.1.0.0 /usr/lib/libodbc.so</userinput>
3401 <prompt># </prompt><userinput>/sbin/ldconfig</userinput>
3404 The last step in configuring this is to ensure that Wine is set up
3405 to run the built-in version of odbc32.dll, by modifying the DLL
3406 configuration. This built-in DLL merely acts as a stub between the
3407 calling code and the Unix ODBC library.
3410 If you have any problems then you can use the debugmsg channel
3411 odbc32 to trace what is happening. One word of warning. Some
3412 programs actually cheat a little and bypass the ODBC library. For
3413 example the Crystal Reports engine goes to the registry to check on
3414 the DSN. The fix for this is documented at unixODBC's site where
3415 there is a section on using unixODBC with Wine.
3419 <title>Using Windows ODBC drivers</title>
3421 Does anyone actually have any experience of this and anything to
3429 <!-- Keep this comment at the end of the file
3432 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")