Support Darwin ".dylib".
[wine] / documentation / configuring.sgml
1   <chapter id="config-wine-main">
2     <title>Configuring Wine</title>
3     <para>
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.
8     </para>
9     <para>
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
25       registry base.
26       Finally, the remaining parts of this chapter contain descriptions
27       of specific Wine configuration items that might also be
28       of interest to you.
29     </para>
30
31     <sect1 id="config-requirements-windows" xreflabel="--Installing Section--">
32       <title>What are the requirements of a fully working Windows environment?</title>
33
34         <para>
35           A Windows installation is a very complex structure. It consists of
36           many different parts with very different functionality.
37           We'll try to outline the most important aspects of it.
38         </para>
39
40         <itemizedlist>
41           <listitem>
42             <para>
43               Registry. Many keys are supposed to exist and contain
44               meaningful data, even in a newly-installed Windows.
45             </para>
46           </listitem>
47           <listitem>
48             <para>
49               Directory structure. Applications expect to find and/or
50               install things in specific predetermined locations. Most
51               of these directories are expected to exist. But unlike
52               Unix directory structures, most of these locations are
53               not hardcoded, and can be queried via the Windows API
54               and the registry. This places additional requirements on
55               a Wine installation.
56             </para>
57           </listitem>
58           <listitem>
59             <para>
60               System DLLs. In Windows, these usually reside in the
61               <filename>system</filename> (or
62               <filename>system32</filename>) directory. Some Windows
63               programs check for their existence in these
64               directories before attempting to load them. While Wine
65               is able to load its own internal DLLs
66               (<filename>.so</filename> files) when the program
67               asks for a DLL, Wine does not simulate the presence of
68               non-existent files.
69             </para>
70           </listitem>
71         </itemizedlist>
72
73         <para>
74           While the users are of course free to set up everything
75           themselves, the Wine team will make the automated Wine source
76           installation script, <filename>tools/wineinstall</filename>,
77           do everything we find necessary to do; running the
78           conventional <userinput>configure && make depend && make && make
79             install</userinput> cycle is thus not recommended, unless
80           you know what you're doing. At the moment,
81           <filename>tools/wineinstall</filename> is able to create a
82           configuration file, install the registry, and create the
83           directory structure itself.
84         </para>
85
86     </sect1>
87
88     <sect1 id="config-helper-programs">
89       <title>Easy configuration helper programs</title>
90
91       <para>
92         Managing the Wine configuration file settings can be a
93         difficult task, sometimes too difficult for some people.
94         That's why there are some helper applications for easily setting up an
95         initial wine configuration file with useful default settings.
96       </para>
97
98       <sect2 id="config-helper-winesetuptk">
99         <title>WineSetupTk</title>
100         <para>
101           WineSetupTk is a graphical Wine configuration tool with
102           incredibly easy handling of Wine configuration issues, to be
103           used for configuring the Wine environment after having
104           installed the Wine files.
105           It has been written by CodeWeavers in 2000 as part of a host
106           of other efforts to make Wine more desktop oriented, and updated
107           in 2003 by Vincent BĂ©ron, Alex Pasadyn and Ivan Leo Murray-Smith.
108         </para>
109         <para>
110           If you're using Debian, simply install the WineSetupTk
111           package (as root):
112         </para>
113   <screen>
114   <prompt># </prompt><userinput>apt-get install winesetuptk</userinput>
115   </screen>
116         <para>
117           If you're using another distribution, you can get WineSetupTk from the
118           <ulink url="http://sourceforge.net/project/showfiles.php?group_id=6241">
119           sourceforge.net Wine download page</ulink>
120         </para>
121       </sect2>
122       
123       <sect2 id="config-helper-wineinstall">
124         <title>wineinstall</title>
125         <para>
126           <command>wineinstall</command> is a small configuration tool
127           residing as <filename>tools/wineinstall</filename> in a Wine
128           source code tree.  It has been written to allow for an easy
129           and complete compilation/installation of Wine source code for
130           people who don't bother with reading heaps of very valuable
131           and informative documentation ;-)
132         </para>
133         <para>
134           Once you have successfully extracted the Wine source code
135           tree, change to the main directory of it and then run (as
136           user):
137         </para>
138   <screen>
139   <prompt>$ </prompt><userinput>./tools/wineinstall</userinput>
140   </screen>
141         <para>
142           Doing so will compile Wine, install Wine and configure the
143           Wine environment (either by providing access to a Windows
144           partition or by creating a properly configured no-windows
145           directory environment).
146         </para>
147
148       </sect2>
149 <!--
150       Commenting out until winecfg doesn't actually do something.
151       <sect2 id="config-helper-winecfg">
152         <title>winecfg</title>
153         <para>
154           <command>winecfg</command> is a small graphical configuration tool
155           residing as <filename>programs/winecfg</filename> in a Wine
156           source code tree. It is a Winelib app making use of standard
157           Win32 GUI controls to easily customize entries in a Wine
158           configuration file.
159         </para>
160       </sect2>
161 -->
162     </sect1>
163
164     <sect1 id="config-verify">
165       <title>Verification of correct configuration</title>
166
167       <para>
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
172         problems.  To run it, run in a <glossterm>terminal</glossterm> 
173         in the Wine source tree directory:
174       </para>
175   <screen>
176   <prompt>$ </><userinput>cd tools</>
177   <prompt>$ </><userinput>perl ./winecheck</>
178   </screen>
179       <para>
180         The winecheck output will be a percentage score indicating Wine
181         configuration correctness.  Please note that winecheck is not 
182         100% accurate.
183       </para>
184
185       <para>
186         If this yields a "good" percentage score, then you can consider
187         your Wine installation to be finished successfully:
188         Congratulations!
189         Otherwise (or if there are still some configuration problems
190         that <command>winecheck</command> doesn't catch properly), please check out the
191         configuration documentation below to find out more about some
192         parts, or proceed to the <link linkend="bugs">Troubleshooting
193         chapter</link>.
194       </para>
195     </sect1>
196
197     <sect1 id="config-file">
198       <title>The Wine Configuration File</title>
199       <para>
200         This section is meant to contain both an easy step-by-step introduction
201         to the Wine configuration file (for new Wine users)
202         and a complete reference to all Wine configuration file settings (for
203         advanced users).
204       </para>
205
206       <sect2>
207         <title>Configuration File Introduction</title>
208         <para>
209           The Wine configuration file is the central file to store
210           configuration settings for Wine.
211           This file (which is called <filename>config</filename>)
212           can be found in the sub directory <filename>.wine/</filename>
213           of your user's home directory
214           (directory <filename>/home/user/</filename>). In other words, the Wine
215           configuration file is <filename>~/.wine/config</filename>.
216           Note that since the Wine configuration file is a part of the
217           Wine registry file system, this file also
218           <emphasis>requires</emphasis> a correct "WINE REGISTRY
219           Version 2" header line to be recognized properly, just like
220           all other Wine registry text files (just in case you decided
221           to write your own registry file from scratch and wonder why
222           Wine keeps rejecting it).
223         </para>
224         <para>
225           The settings available in the configuration file include:
226           <itemizedlist>
227             <listitem>
228               <para>
229                 Drives and information about them
230               </para>
231             </listitem>
232             <listitem>
233               <para>
234                 Directory settings
235               </para>
236             </listitem>
237             <listitem>
238               <para>
239                 Port settings
240               </para>
241             </listitem>
242             <listitem>
243               <para>
244                 The Wine look and feel
245               </para>
246             </listitem>
247             <listitem>
248               <para>
249                 Wine's DLL usage
250               </para>
251             </listitem>
252             <listitem>
253               <para>
254                 Wine's multimedia drivers and DLL configuration
255               </para>
256             </listitem>
257           </itemizedlist>
258         </para>
259       </sect2>
260
261       <sect2>
262         <title>Creating Or Modifying The Configuration File</title>
263         <para>
264           If you just installed Wine for the first time and want to
265           finish Wine installation by configuring it now, then you could
266           use our sample configuration file <filename>config</filename>
267           (which can be found in the directory
268           <filename>documentation/samples/</filename> of the Wine source
269           code directory) as a base for adapting the Wine configuration
270           file to the settings you want.
271           First, I should mention that you should not forget to make
272           sure that any previous configuration file at
273           <filename>~/.wine/config</filename> has been safely moved out
274           of the way instead of simply overwriting it when you will now
275           copy over the sample configuration file.
276         </para>
277         <para>
278           If you don't have a pre-existing configuration file and thus
279           need to copy over our sample configuration file to the
280           standard Wine configuration file location, do in a
281           <glossterm>terminal</glossterm>:
282   <screen>
283   <prompt>$ </><userinput>mkdir ~/.wine/</>
284   <prompt>$ </><userinput>cp <replaceable>dir_to_wine_source_code</replaceable>/documentation/samples/config ~/.wine/config</>
285   </screen>
286           Otherwise, simply use the already existing configuration file
287           at <filename>~/.wine/config</filename>.
288         </para>
289         <para>
290           Now you can start adapting the configuration file's settings with an
291           <glossterm>editor</glossterm> according to the documentation
292           below.
293           Note that you should <emphasis>only</emphasis> change
294           configuration file settings if wineserver is not running (in
295           other words: if your user doesn't have a Wine session running),
296           otherwise Wine won't use them - and even worse, wineserver will
297           overwrite them with the old settings once wineserver quits!!
298         </para>
299       </sect2>
300
301       <sect2 id="config-file-how">
302         <title>What Does It Contain?</title>
303
304         <para>
305           Let's start by giving an overview of which sections a
306           configuration file may contain, and whether the inclusion of
307           the respective section is <emphasis>needed</emphasis> or only <emphasis>recommended</emphasis> ("recmd").
308         </para>
309
310         <informaltable frame="all">
311           <tgroup cols="3">
312             <thead>
313               <row>
314                 <entry>Section Name</entry>
315                 <entry>Needed?</entry>
316                 <entry>What it Does</entry>
317               </row>
318             </thead>
319             <tbody>
320               <row>
321                 <entry>[Drive x]</entry>
322                 <entry>yes</entry>
323                 <entry>Sets up drive mappings to be used by Wine</entry>
324               </row>
325               <row>
326                 <entry>[wine]</entry>
327                 <entry>yes</entry>
328                 <entry>General settings for Wine</entry>
329               </row>
330               <row>
331                 <entry>[DllOverrides]</entry>
332                 <entry>recmd</entry>
333                 <entry>Overrides defaults for DLL loading</entry>
334               </row>
335               <row>
336                 <entry>[x11drv]</entry>
337                 <entry>recmd</entry>
338                 <entry>Graphics driver settings</entry>
339               </row>
340               <row>
341                 <entry>[fonts]</entry>
342                 <entry>yes</entry>
343                 <entry>Font appearance and recognition</entry>
344               </row>
345               <row>
346                 <entry>[serialports]</entry>
347                 <entry>no</entry>
348                 <entry>COM ports seen by Wine</entry>
349               </row>
350               <row>
351                 <entry>[parallelports]</entry>
352                 <entry>no</entry>
353                 <entry>LPT ports seen by Wine</entry>
354               </row>
355               <row>
356                 <entry>[ppdev]</entry>
357                 <entry>no</entry>
358                 <entry>Parallelport emulation</entry>
359               </row>
360               <row>
361                 <entry>[spooler]</entry>
362                 <entry>no</entry>
363                 <entry>Print spooling</entry>
364               </row>
365               <row>
366                 <entry>[ports]</entry>
367                 <entry>no</entry>
368                 <entry>Direct port access</entry>
369               </row>
370               <row>
371                 <entry>[Debug]</entry>
372                 <entry>no</entry>
373                 <entry>What to do with certain debug messages</entry>
374               </row>
375               <row>
376                 <entry>[Registry]</entry>
377                 <entry>no</entry>
378                 <entry>Specifies locations of windows registry files</entry>
379               </row>
380               <row>
381                 <entry>[tweak.layout]</entry>
382                 <entry>recmd</entry>
383                 <entry>Appearance of Wine</entry>
384               </row>
385               <row>
386                 <entry>[programs]</entry>
387                 <entry>no</entry>
388                 <entry>Programs to be run automatically</entry>
389               </row>
390               <row>
391                 <entry>[Console]</entry>
392                 <entry>no</entry>
393                 <entry>Console settings</entry>
394               </row>
395               <row>
396                 <entry>[Clipboard]</entry>
397                 <entry>no</entry>
398                 <entry>Interaction for Wine and X11 clipboard</entry>
399               </row>
400               <row>
401                 <entry>[afmdirs]</entry>
402                 <entry>no</entry>
403                 <entry>Postscript driver settings</entry>
404               </row>
405               <row>
406                 <entry>[WinMM]</entry>
407                 <entry>yes</entry>
408                 <entry>Multimedia settings</entry>
409               </row>
410               <row>
411                 <entry>[AppDefaults]</entry>
412                 <entry>no</entry>
413                 <entry>Overwrite the settings of previous sections for special programs</entry>
414               </row>
415             </tbody>
416           </tgroup>
417         </informaltable>
418
419         <para>
420           Now let's explain the configuration file sections in a
421           detailed way.
422         </para>
423         
424         <sect3>
425           <title>The [Drive x] Sections</title>
426           <para>
427             For a detailed description of these configuration file
428             sections which are used to set up DOS drive mappings to Unix
429             directory space, please look at the <link
430             linkend="config-drive-sections">Wine file system layer
431             configuration section</link>.
432           </para>
433         </sect3>
434
435         <sect3 id="config-wine">
436           <title>The [wine] Section </title>
437           <para>
438             The [wine] section of the configuration file contains all kinds
439             of general settings for Wine.
440           </para>
441           <para>
442             <programlisting>
443 "Windows" = "c:\\windows"
444 "System" = "c:\\windows\\system"
445 "Temp" = "c:\\temp"
446 "Path" = "c:\\windows;c:\\windows\\system;c:\\blanco"
447 "ShowDirSymlinks" = "1"
448             </programlisting>
449             For a detailed description of drive layer configuration and
450             the meaning of these parameters, please look at the <link
451             linkend="config-drive-main">Wine file system layer
452             configuration section</link>.
453           </para>
454           <para>
455             <programlisting>"GraphicsDriver" = "x11drv|ttydrv"</programlisting>
456             Sets the graphics driver to use for Wine output.
457             x11drv is for X11 output, ttydrv is for text console output.
458             WARNING: if you use ttydrv here, then you won't be able to run
459             a lot of Windows GUI programs (ttydrv is still pretty "broken"
460             at running graphical apps). Thus this option is mainly interesting
461             for e.g. embedded use of Wine in web server scripts.
462             Note that ttydrv is still very lacking, so if it doesn't work,
463             resort to using "xvfb", a virtual X11 server.
464             Another way to run Wine without display would be to run X11
465             via Xvnc, then connect to that VNC display using xvncviewer
466             (that way you're still able to connect to your app and
467             configure it if need be).
468           </para>
469           <para>
470             <programlisting>"Printer" = "off|on"</programlisting> Tells wine
471             whether to allow printing via printer drivers to work.
472             This option isn't needed for our built-in psdrv printer driver
473             at all.
474             Using these things are pretty alpha, so you might want to
475             watch out. Some people might find it useful, however. If
476             you're not planning to work on printing via windows printer
477             drivers, don't even add this to your wine configuration file
478             (It probably isn't already in it).
479             Check out the [spooler] and [parallelports] sections too.
480           </para>
481           <para>
482             <programlisting>"ShellLinker" = "wineshelllink"</programlisting>
483             This setting specifies the shell linker script to use for setting
484             up Windows icons in e.g. KDE or Gnome that are given by programs
485             making use of appropriate shell32.dll functionality to create
486             icons on the desktop/start menu during installation.
487           </para>
488           <para>
489             <programlisting>"SymbolTableFile" = "wine.sym"</programlisting>
490             Sets up the symbol table file for the wine debugger. You
491             probably don't need to fiddle with this. May be useful if
492             your wine is stripped.
493           </para>
494         </sect3>
495
496         <sect3 id="config-dlloverrides">
497           <title>The [DllOverrides] Section</title>
498           <para>
499             The format for this section is the same for each line:
500             <programlisting>&lt;DLL>{,&lt;DLL>,&lt;DLL>...} = &lt;FORM>{,&lt;FORM>,&lt;FORM>...}</programlisting>
501             For example, to load built-in KERNEL pair (case doesn't
502             matter here):
503             <programlisting>"kernel,kernel32" = "builtin"</programlisting>
504             To load the native COMMDLG pair, but if that doesn't work
505             try built-in:
506             <programlisting>"commdlg,comdlg32" = "native, builtin"</programlisting>
507             To load the native COMCTL32:
508             <programlisting>"comctl32" = "native"</programlisting>
509             Here is a good generic setup (As it is defined in config
510             that was included with your wine package):
511             <programlisting>
512 [DllOverrides]
513 "rpcrt4"       = "builtin, native"
514 "oleaut32"     = "builtin, native"
515 "ole32"        = "builtin, native"
516 "commdlg"      = "builtin, native"
517 "comdlg32"     = "builtin, native"
518 "ver"          = "builtin, native"
519 "version"      = "builtin, native"
520 "shell"        = "builtin, native"
521 "shell32"      = "builtin, native"
522 "shfolder"     = "builtin, native"
523 "shlwapi"      = "builtin, native"
524 "shdocvw"      = "builtin, native"
525 "lzexpand"     = "builtin, native"
526 "lz32"         = "builtin, native"
527 "comctl32"     = "builtin, native"
528 "commctrl"     = "builtin, native"
529 "advapi32"     = "builtin, native"
530 "crtdll"       = "builtin, native"
531 "mpr"          = "builtin, native"
532 "winspool.drv" = "builtin, native"
533 "ddraw"        = "builtin, native"
534 "dinput"       = "builtin, native"
535 "dsound"       = "builtin, native"
536 "opengl32"     = "builtin, native"
537 "msvcrt"       = "native, builtin"
538 "msvideo"      = "builtin, native"
539 "msvfw32"      = "builtin, native"
540 "mcicda.drv"   = "builtin, native"
541 "mciseq.drv"   = "builtin, native"
542 "mciwave.drv"  = "builtin, native"
543 "mciavi.drv"   = "native, builtin"
544 "mcianim.drv"  = "native, builtin"
545 "msacm.drv"    = "builtin, native"
546 "msacm"        = "builtin, native"
547 "msacm32"      = "builtin, native"
548 "midimap.drv"  = "builtin, native"
549 ; you can specify programs too
550 "notepad.exe"  = "native, builtin"
551 ; default for all other DLLs
552 "*" = "native, builtin"
553             </programlisting>
554           </para>
555           <note>
556             <para>
557               If loading of the libraries that are listed first fails,
558               wine will just go on by using the second or third option.
559             </para>
560           </note>
561         </sect3>
562
563         <sect3 id="config-fonts">
564           <title>The [fonts] Section</title>
565           <para>
566             This section sets up wine's font handling.
567           </para>
568           <para>
569             <programlisting>"Resolution" = "96"</programlisting>
570             Since the way X handles fonts is different from the way
571             Windows does, wine uses a special mechanism to deal with
572             them. It must scale them using the number defined in the
573             "Resolution" setting. 60-120 are reasonable values, 96 is
574             a nice in the middle one. If you have the real windows
575             fonts available , this parameter will not be as
576             important. Of course, it's always good to get your X fonts
577             working acceptably in wine.
578           </para>
579           <para>
580             <programlisting>"Default" = "-adobe-times-"</programlisting>
581             The default font wine uses. Fool around with it if you'd like.
582           </para>
583           <para>
584   OPTIONAL:
585           </para>
586           <para>
587             The <literal>Alias</literal> setting allows you to map an X font to a font
588             used in wine. This is good for apps that need a special font you don't have,
589             but a good replacement exists. The syntax is like so:
590             <programlisting>"AliasX" = "[Fake windows name],[Real X name]"&lt;,optional "masking" section></programlisting>
591             Pretty straightforward. Replace "AliasX" with "Alias0",
592             then "Alias1" and so on. The fake windows name is the name
593             that the font will be under a windows app in wine. The
594             real X name is the font name as seen by X (Run
595             "xfontsel"). The optional "masking" section allows you to
596             utilize the fake windows name you define. If it is not
597             used, then wine will just try to extract the fake windows
598             name itself and not use the value you enter.
599           </para>
600           <para>
601             Here is an example of an alias without masking. The font will show up in windows
602             apps as "Google".
603             <programlisting>"Alias0" = "Foo,--google-"</programlisting>
604             Here is an example with masking enabled. The font will show up as "Foo" in
605             windows apps.
606             <programlisting>"Alias1" = "Foo,--google-,subst"</programlisting>
607             For more information check out the <link linkend="config-fonts-main">Fonts</link>
608             chapter.
609           </para>
610         </sect3>
611
612         <sect3 id="config-io">
613           <title>The [serialports], [parallelports], [spooler], and [ports] Sections</title>
614           <para>
615             Even though it sounds like a lot of sections, these are
616             all closely related. They are all for communications and
617             parallel ports.
618           </para>
619           <para>
620             The [serialports] section tells wine what serial ports it
621             is allowed to use.
622             <programlisting>"ComX" = "/dev/ttySY"</programlisting>
623             Replace <literal>X</literal> with the number of the COM
624             port in Windows (1-8) and <literal>Y</literal> with the
625             number of it in <literal>X</literal> (Usually the number
626             of the port in Windows minus 1). <literal>ComX</literal>
627             can actually equal any device
628             (<medialabel>/dev/modem</medialabel> is acceptable). It is
629             not always necessary to define any COM ports (An optional
630             setting). Here is an example:
631             <programlisting>"Com1" = "/dev/ttyS0"</programlisting>
632             Use as many of these as you like in the section to define
633             all of the COM ports you need.
634           </para>
635           <para>
636             The [parallelports] section sets up any parallel ports
637             that will be allowed access under wine.
638             <programlisting>"LptX" = "/dev/lpY"</programlisting>
639             Sounds familiar? Syntax is just like the COM port setting.
640             Replace <literal>X</literal> with a value from 1-4 as it
641             is in Windows and <literal>Y</literal> with a value from
642             0-3 (<literal>Y</literal> is usually the value in windows
643             minus 1, just like for COM ports). You don't always need
644             to define a parallel port (AKA, it's optional). As with
645             the other section, LptX can equal any device (Maybe
646             <medialabel>/dev/printer</medialabel>). Here is an
647             example:  <programlisting>"Lpt1" = "/dev/lp0"</programlisting>
648             The [spooler] section will inform wine where to spool
649             print jobs. Use this if you want to try printing. Wine
650             docs claim that spooling is "rather primitive" at this
651             time, so it won't work perfectly. <emphasis>It is optional.</emphasis> The only
652             setting you use in this section works to map a port (LPT1,
653             for example) to a file or a command. Here is an example,
654             mapping LPT1 to the file <filename>out.ps</filename>:
655             <programlisting>"LPT1:" = "out.ps"</programlisting>
656             The following command maps printing jobs to LPT1 to the
657             command <command>lpr</command>. Notice  the |:
658             <programlisting>"LPT1:" = "|lpr"</programlisting>
659             The [ports] section is usually useful only for people who
660             need direct port access for programs requiring dongles or
661             scanners. <emphasis>If you don't need it, don't use
662             it!</emphasis>
663           </para>
664           <para>
665             <programlisting>"read" = "0x779,0x379,0x280-0x2a0"</programlisting>
666             Gives direct read access to those IO's.
667           </para>
668           <para>
669             <programlisting>"write" = "0x779,0x379,0x280-0x2a0"</programlisting>
670             Gives direct write access to those IO's. It's probably a
671             good idea to keep the values of the
672             <literal>read</literal> and <literal>write</literal>
673             settings the same. This stuff will only work when you're
674             root.
675           </para>
676         </sect3>
677
678         <sect3 id="config-debug-etc">
679           <title>The [Debug], [Registry], [tweak.layout], and [programs] Sections</title>
680           <para>
681             [Debug] is used to include or exclude debug messages, and to
682             output them to a file. The latter is rarely used. <emphasis>These
683             are all optional and you probably don't need to add or
684             remove anything in this section to your config.</emphasis> (In extreme
685             cases you may want to use these options to manage the amount
686             of information generated by the <parameter>--debugmsg +relay
687             </parameter> option.)
688           </para>
689           <para>
690             <programlisting>"File" = "/blanco"</programlisting>
691             Sets the logfile for wine. Set to CON to log to standard out.
692             <emphasis>This is rarely used.</emphasis>
693           </para>
694           <para>
695             <programlisting>"SpyExclude" = "WM_SIZE;WM_TIMER;"</programlisting>
696             Excludes debug messages about <constant>WM_SIZE</constant>
697             and <constant>WM_TIMER</constant> in the logfile.
698           </para>
699           <para>
700             <programlisting>"SpyInclude" = "WM_SIZE;WM_TIMER;"</programlisting>
701             Includes debug messages about <constant>WM_SIZE</constant>
702             and <constant>WM_TIMER</constant> in the logfile.
703           </para>
704           <para>
705             <programlisting>"RelayInclude" = "user32.CreateWindowA;comctl32.*"</programlisting>
706             Include only the listed functions in a
707             <parameter>--debugmsg +relay</parameter> trace.  This entry is
708             ignored if there is a <parameter>RelayExclude</parameter> entry.
709           </para>
710           <para>
711             <programlisting>"RelayExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"</programlisting>
712             Exclude the listed functions in a
713             <parameter>--debugmsg +relay</parameter> trace.  This entry
714             overrides any settings in a <parameter>RelayInclude</parameter>
715             entry.  If neither entry is present then the trace includes
716             everything.
717           </para>
718           <para>
719             In both entries the functions may be specified either as a
720             function name or as a module and function.  In this latter
721             case specify an asterisk for the function name to include/exclude
722             all functions in the module.
723           </para>
724           <para>
725             [Registry] can be used to tell wine where your old windows
726             registry files exist. This section is completely optional
727             and useless to people using wine without an existing
728             windows installation.
729           </para>
730           <para>
731             <programlisting>"UserFileName" = "/dirs/to/user.reg"</programlisting>
732             The location of your old <filename>user.reg</filename> file.
733           </para>
734           <para>
735             [tweak.layout] is devoted to wine's look. There is only
736             one setting for it.
737           </para>
738           <para>
739             <programlisting>"WineLook" = "win31|win95|win98"</programlisting>
740             Will change the look of wine from Windows 3.1 to Windows 95.
741             The <literal>win98</literal> setting behaves
742             just like <literal>win95</literal> most of the time.
743           </para>
744           <para>
745             [programs] can be used to say what programs run under
746             special conditions.
747           </para>
748           <para>
749             <programlisting>"Default" = "/program/to/execute.exe"</programlisting>
750             Sets the program to be run if wine is started without specifying a program.
751           </para>
752           <para>
753             <programlisting>"Startup" = "/program/to/execute.exe"</programlisting>
754             Sets the program to automatically be run at startup every time.
755           </para>
756         </sect3>
757
758         <sect3 id="config-winmm">
759           <title>The [WinMM] Section</title>
760           <para>
761             [WinMM] is used to define which multimedia drivers have to be loaded. Since
762             those drivers may depend on the multimedia interfaces available on your system
763             (OSS, ALSA... to name a few), it's needed to be able to configure which driver
764             has to be loaded.
765           </para>
766
767           <para>
768             The content of the section looks like:
769             <programlisting>
770 [WinMM]
771 "Drivers" = "wineoss.drv"
772 "WaveMapper" = "msacm.drv"
773 "MidiMapper" = "midimap.drv"
774             </programlisting>
775             All the keys must be defined:
776             <itemizedlist>
777               <listitem>
778                 <para>
779                   The "Drivers" key is a ';' separated list of modules name, each of
780                   them containing a low level driver. All those drivers will be loaded
781                   when MMSYSTEM/WINMM is started and will provide their inner features.
782                 </para>
783               </listitem>
784               <listitem>
785                 <para>
786                   The "WaveMapper" represents the name of the module containing the Wave
787                   Mapper driver. Only one wave mapper can be defined in the system.
788                 </para>
789               </listitem>
790               <listitem>
791                 <para>
792                   The "MidiMapper" represents the name of the module containing the MIDI
793                   Mapper driver. Only one MIDI mapper can be defined in the system.
794                 </para>
795               </listitem>
796             </itemizedlist>
797           </para>
798         </sect3>
799
800         <sect3 id="config-network">
801           <title>The [Network] Section</title>
802           <para>
803             [Network] contains settings related to
804             networking. Currently there is only one value that can be set.
805           </para>
806           <variablelist>
807             <varlistentry>
808               <term>UseDnsComputerName</term>
809               <listitem>
810                 <para>
811                   A boolean setting (default: <literal>Y</literal>)
812                   that affects the way Wine sets the computer name. The computer
813                   name in the Windows world is the so-called <emphasis>NetBIOS name</emphasis>.
814                   It is contained in the <varname>ComputerName</varname> in the registry entry
815                   <varname>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName</varname>.
816                 </para>
817                 <para>
818                   If this option is set to "Y" or missing, Wine will set the
819                   NetBIOS name to the Unix host name of your computer, if
820                   necessary truncated to 31 characters. The Unix hostname is the output
821                   of the shell command <command>hostname</command>, up to but not
822                   including the first dot ('.'). Among other things, this means that
823                   Windows programs running under Wine cannot change the NetBIOS computer name.
824                 </para>
825                 <para>
826                   If this option is set to "N", Wine will use the registry value above
827                   to set the NetBIOS name. Only if the registry entry doesn't exist (usually
828                   only during the first wine startup) it will use the Unix hostname as
829                   usual. Windows programs can change the NetBIOS name. The change
830                   will be effective after a "reboot", i.e. after restarting Wine.
831                 </para>
832               </listitem>
833             </varlistentry>
834           </variablelist>
835         </sect3>
836
837         <sect3 id="config-appdefaults">
838           <title>The [AppDefaults] Section</title>
839           <para>
840             The section is used to overwrite certain settings of this file for a
841             special program with different settings.
842             [AppDefaults] is not the real name of the section. The real name
843             consists of the leading word AppDefaults followed by the name
844             of the executable the section is valid for.
845             The end of the section name is the name of the
846             corresponding "standard" section of the configuration file
847             that should have some of its settings overwritten with the
848             program specific settings you define.
849             The three parts of the section name are separated by two backslashes.
850           </para>
851           <para>
852             Currently wine supports overriding selected settings within
853             the sections [DllOverrides], [x11drv], [version] and [dsound] only.
854           </para>
855           <para>
856             Here is an example that overrides the normal settings for a
857             program:
858             <programlisting>
859 ;; default settings
860 [x11drv]
861 "Managed" = "Y"
862 "Desktop" = "N"
863
864 ;; run install in desktop mode
865 [AppDefaults\\install.exe\\x11drv]
866 "Managed" = "N"
867 "Desktop" = "800x600"
868             </programlisting>
869           </para>
870         </sect3>
871       </sect2>
872
873       <sect2 id="config-trouble">
874         <title>What If It Doesn't Work?</title>
875         <para>
876           There is always a chance that things will go wrong. If the
877           unthinkable happens, report the problem to
878           <ulink url="http://bugs.winehq.org/">Wine Bugzilla</ulink>,
879           try the newsgroup
880           <systemitem>comp.emulators.ms-windows.wine</systemitem>,
881           or the IRC channel <systemitem>#WineHQ</systemitem> found on
882           irc.freenode.net, or connected servers.
883           Make sure that you have looked over this document thoroughly,
884           and have also read:
885         </para>
886         <itemizedlist>
887           <listitem>
888             <para>
889               <filename>README</filename>
890             </para>
891           </listitem>
892           <listitem>
893             <para>
894               <filename>http://www.winehq.org/trouble/</filename>
895             </para>
896           </listitem>
897         </itemizedlist>
898         <para>
899           If indeed it looks like you've done your research, be
900           prepared for helpful suggestions. If you haven't, brace
901           yourself for heaving flaming.
902         </para>
903       </sect2>
904     </sect1>
905
906     <sect1 id="config-drive-main">
907       <title>The Wine File System And Drive Layer</title>
908       <sect2>
909         <title>Extremely Important Prerequisites</title>
910         <para>
911           If you're planning to include access to a CD-ROM drive in your Wine
912           configuration on Linux, then <emphasis>make sure</emphasis> to add
913           the <quote>unhide</quote> mount option to the CD-ROM file system
914           entry in <filename>/etc/fstab</filename>, e.g.:
915           <programlisting>/dev/cdrom /cdrom  iso9660 ro,noauto,users,unhide 0 0</programlisting>
916           Several Windows program setup CD-ROMs or other CD-ROMs chose
917           to do such braindamaged things as marking very important setup
918           helper files on the CD-ROM as <quote>hidden</quote>.
919           That's no problem on Windows, since the Windows CD-ROM driver by
920           default displays even files that are supposed to be
921           <quote>hidden</quote>. But on Linux, which chose to
922           <emphasis>hide</emphasis> <quote>hidden</quote> files on CD by
923           default, this is <emphasis>FATAL</emphasis>!
924           (the programs will simply abort with an <quote>installation file not found</quote> or similar error)
925           Thus you should never forget to add this setting.
926         </para>
927       </sect2>
928
929       <sect2>
930         <title>Short Introduction</title>
931         <para>
932           Wine emulates drives by placing their virtual drive roots to
933           user-configurable points in the Unix filesystem, so it's your
934           choice where <medialabel>C:</medialabel>'s root should be
935           (<filename>tools/wineinstall</filename> will even ask you). If
936           you choose, say, <filename>~/wine</filename> (or, in other
937           words, <filename>/home/user/wine</filename>, since "~"
938           indicates the home directory of a user), as the root of your
939           virtual drive <medialabel>C:</medialabel>, then you'd put this
940           into your Wine configuration file:
941         </para>
942
943         <programlisting>
944 [Drive C]
945 "Path" = "%HOME%/wine"
946 "Type" = "hd"
947         </programlisting>
948
949         <para>
950           With this configuration, what windows apps think of as
951           "c:\windows\system" would map to
952           <filename>/home/user/wine/windows/system</filename> in the UNIX
953           filesystem.
954         </para>
955       </sect2>
956
957       <sect2 id="config-drive-dir">
958         <title>Windows Directory Structure</title>
959         <para>
960           Here's the fundamental layout that Windows programs and
961           installers expect and that we thus need to configure properly
962           in Wine. Without it, they seldomly operate correctly.  If you
963           intend to use a no-windows environment (not using an existing
964           Windows partition), then it is recommended to use either
965           <command>WineSetupTk</command>'s or
966           <command>wineinstall</command>'s capabilities to create an
967           initial windows directory tree, since creating a directory
968           structure manually is tiresome and error-prone.
969         </para>
970
971 <programlisting>
972 C:\                Root directory of primary disk drive
973   Windows\         Windows directory, containing .INI files,
974                      accessories, etc.
975     System\        Win3.x/95/98/ME directory for common DLLs
976                      WinNT/2000 directory for common 16-bit DLLs
977     System32\      WinNT/2000 directory for common 32-bit DLLs
978     Start Menu\    Program launcher directory structure
979       Programs\    Program launcher links (.LNK files) to programs
980   Program Files\   Application binaries (.EXE and .DLL files)
981 </programlisting>
982       </sect2>
983
984       <sect2 id="config-drive-sections">
985         <title>The [Drive x] Sections</title>
986         <para>
987             These sections are supposed to make certain Unix
988             directory locations accessible to Wine as a DOS/Windows drive
989             (drive 'x:') and thus accessible to Windows programs
990             under the drive name you specified.
991             Every DOS/Windows program sort of expects at least a C:
992             drive (and sometimes also an A: floppy drive), so your
993             configuration file should at least contain the corresponding
994             sections, [Drive C] and [Drive A].
995             You need to decide on whether you want to use an existing Windows
996             partition as the C drive or whether you want to create your own
997             Wine drive C directory tree somewhere (take care about
998             permissions!).
999             Each drive section may specify up to 6 different settings
1000             as explained below.
1001         </para>
1002         <para>
1003           <programlisting>[Drive x]</programlisting>
1004           The above line begins the section for a drive whose letter is x
1005             (DOS notation: drive 'x:').
1006             You could e.g. create an equivalent to a drive 'C:'
1007             under DOS/Windows by using a [Drive C] section name.
1008             Note that the drive letter is case insensitive.
1009         </para>
1010         <para>
1011           <programlisting>"Path" = "/dir/to/path"</programlisting>
1012             This specifies the directory where the drive will begin.
1013             When Wine is browsing in drive x, it will be able
1014             to see the files that are in the directory
1015             <filename>/dir/to/path</filename> and below.
1016             (note that symlinks to directories won't get included!
1017             see "<link linkend="dirsymlinks">ShowDirSymlinks</link>"
1018             configuration setting)
1019             You can also make use of environment variables like $HOME here,
1020             an example for using a <filename>mywinedrive</filename>
1021             directory in your home dir would be
1022             <programlisting>"Path" = "%HOME%/mywinedrive"</programlisting>,
1023             but don't forget to put it as a DOS environment variable,
1024             ie surrounded by '%' signs rather than preceded by a '$'.
1025             Don't forget to leave off the trailing slash!
1026         </para>
1027         <para>
1028           <programlisting>"Type" = "hd|cdrom|network|floppy"</programlisting>
1029           Sets up the type of drive Wine will see it as. Type must
1030           equal one of the four <literal>floppy</literal>,
1031           <literal>hd</literal>, <literal>cdrom</literal>, or
1032           <literal>network</literal>. They are self-explanatory.
1033           (The |'s mean "Type = '&lt;one of the options&gt;'".)
1034           Usually, you choose "hd" for a drive ("hd" is default anyway).
1035           For a home directory entry, it makes sense to choose
1036           "network" sometimes, since some home directories are being
1037           exported over the network via NFS and thus can have slow response
1038           times.
1039         </para>
1040
1041         <programlisting>"Device" = "/dev/xx"</programlisting>
1042         <para>
1043           Needed for raw device access and <link linkend="config-drive-cdrom-labels">label and serial number reading</link>.
1044           Use this <emphasis>only</emphasis> for floppy and cdrom devices. Using it on
1045           Extended2 or other Unix file systems can have dire results
1046           (when a windows app tries to do a lowlevel write,
1047           they do it in a FAT way -- FAT format is completely different from
1048           any Unix file system).
1049           Also, make sure that you have proper permissions to this device
1050           file.
1051         </para>
1052         <note>
1053           <para>
1054             This setting is not really important; almost all apps
1055             will have no problem if it remains unspecified. For
1056             CD-ROMs it's quite useful in order to get automatic label
1057             detection, though. If you are unsure about specifying
1058             device names, just leave out this setting for your
1059             drives.
1060           </para>
1061         </note>
1062         <para>
1063             Here are a few sample entries:
1064           <programlisting>
1065 Here is a setup for Drive C, a generic hard drive:
1066 [Drive C]
1067 "Path" = "/dosc"
1068 "Type" = "hd"
1069 This is a setup for Drive E, a generic CD-ROM drive:
1070 [Drive E]
1071 "Path" = "/mnt/cdrom"
1072 "Type" = "cdrom"
1073 "Device" = "/dev/cdrom"
1074 And here is a setup for Drive A, a generic floppy drive:
1075 [Drive A]
1076 "Type" = "floppy"
1077 "Path" = "/mnt/floppy"
1078 "Device" = "/dev/fd0"
1079           </programlisting>
1080         </para>
1081       </sect2>
1082
1083       <sect2>
1084           <title>File system settings in the [wine] section</title>
1085         <para>
1086           <programlisting>"Windows" = "c:\\windows"</programlisting>
1087           This tells Wine and Windows programs where the
1088           <filename>Windows</filename> directory is.  It is
1089           recommended to have this directory somewhere on your
1090           configured <medialabel>C</medialabel> drive, and it's also
1091           recommended to just call the directory "windows" (this is
1092           the default setup on Windows, and some stupid programs
1093           might rely on this).  So in case you chose a "Windows"
1094           setting of "c:\\windows" and you chose to set up a drive C
1095           e.g. at <filename>/usr/local/wine_c</filename>, the
1096           corresponding directory would be
1097           <filename>/usr/local/wine_c/windows</filename>.  Make one
1098           if you don't already have one. <emphasis>No trailing slash</emphasis> (<emphasis>not</emphasis>
1099           <filename>C:\\windows\</filename>)! Write access strongly
1100           recommended, as Windows programs always assume write access
1101             to the Windows directory!
1102         </para>
1103         <para>
1104           <programlisting>"System" = "c:\\windows\\system"</programlisting>
1105           This sets up where the windows system files are. The Windows
1106             system directory should reside below the directory used for the
1107           <literal>Windows</literal> setting.
1108             Thus when using the example above, the system directory would be
1109             <filename>/usr/local/wine_c/windows/system</filename>.
1110           Again, no trailing slash, and write access!
1111         </para>
1112         <para>
1113           <programlisting>"Temp" = "c:\\temp"</programlisting> This should
1114           be the directory you want your temp files stored in,
1115             /usr/local/wine_c/temp in our example.
1116           Again, no trailing slash, and <emphasis>write
1117             access</emphasis>!!
1118         </para>
1119         <para>
1120           <programlisting>"Path" = "c:\\windows;c:\\windows\\system;c:\\blanco"</programlisting>
1121           Behaves like the <envar>PATH</envar> setting on UNIX
1122           boxes. When wine is run like <userinput>wine
1123             sol.exe</userinput>, if <filename>sol.exe</filename>
1124           resides in a directory specified in the
1125           <literal>Path</literal> setting, wine will run it (Of
1126           course, if <filename>sol.exe</filename> resides in the
1127           current directory, wine will run that one). Make sure it
1128           always has your <filename>windows</filename> directory and
1129           system directory (For this setup, it must have
1130           <filename>"c:\\windows;c:\\windows\\system"</filename>).
1131         </para>
1132         <para id="dirsymlinks">
1133           <programlisting>"ShowDirSymlinks" = "1"</programlisting>
1134           Wine doesn't pass directory symlinks to Windows programs by
1135           default, as doing so may crash some programs that do
1136           recursive lookups of whole subdirectory trees
1137           whenever a directory symlink points back to itself or one of its
1138           parent directories.
1139           That's why we disallowed the use of directory symlinks
1140           and added this setting to reenable ("1") this functionality.
1141           If you <emphasis>really</emphasis> need Wine to take into
1142           account symlinked directories, then reenable it, but
1143           <emphasis>be prepared for crashes</emphasis> in certain
1144           Windows programs when using the above method! (in other words:
1145           enabling it is certainly not recommended)
1146         </para>
1147       </sect2>
1148
1149       <sect2>
1150         <title>More detailed explanation about file system differences</title>
1151         <para>
1152           Windows uses a different (and inferior) way than Unix to describe the
1153           location of files in a computer. Thus Windows programs also expect
1154           to find this different way supported by the system.
1155           Since we intend to run Windows programs on
1156           a Unix system, we're in trouble, as we need to translate
1157           between these different file access techniques.
1158         </para>
1159         <para>
1160           Windows uses drive letters to describe drives or
1161           any other form of storage media and to access files on them.
1162           For example, common drive names are
1163           <filename>C:</filename> for the main Windows system partition
1164           on the first harddisk and <filename>A:</filename> for the
1165           first floppy drive.
1166           Also, Windows uses <filename>\</filename> (backslash) as the
1167           directory separator sign, whereas Unix uses
1168           <filename>/</filename> (slash).
1169           Thus, an example document on the first data partition in
1170           Windows might be accessed by the name of
1171           <filename>D:\mywork\mydocument.txt</filename>.
1172         </para>
1173         <para>
1174           So much for the Windows way of doing things.
1175         </para>
1176         <para>
1177           Well, the problem is, in Unix there is no such thing as
1178           <quote>drive letters</quote>. Instead, Unix chose to go the
1179           much better way of having one single uniform directory tree
1180           (starting with the root directory
1181           <filename>/</filename>), which has various storage devices
1182           such as e.g. harddisk partitions appended at various directory
1183           locations within the tree (an example would be
1184           <filename>/data1/mywork</filename>, which is the first data
1185           partition mounted/attached to a directory called data1 in the
1186           root directory <filename>/</filename>; mywork is a sub
1187           directory of the data partition file system that's mounted
1188           under <filename>/data1</filename>).
1189           In Unix, the Windows example document mentioned above could e.g.
1190           be accessed by the name of
1191           <filename>/data1/mywork/mydocument.txt</filename>,
1192           provided that the administrator decided to mount (attach) the first
1193           data partition at the directory /data1 inside the Unix
1194           directory tree. Note that in Unix, the administrator can
1195           <emphasis>choose</emphasis> any custom partition location he
1196           wants (here, <filename>/data1</filename>), whereas in Windows the system
1197           <emphasis>selects</emphasis> any drive letter it deems
1198           suitable for the first data partition (here,
1199           <filename>D:</filename>), and, even worse, if there is some
1200           change in partition order, Windows automatically
1201           <emphasis>changes</emphasis> the drive letter, and you might
1202           suddenly find yourself with a first data partition at drive
1203           letter <filename>E:</filename>, with all the file naming and
1204           referencing confusion that entails. Thus, the Windows way of
1205           using ever-changing drive letters is <emphasis>clearly
1206           inferior</emphasis> to the Unix way of assigning
1207           <emphasis>fixed</emphasis> directory tree locations for every
1208           data storage medium.
1209           As we'll see soon, fortunately this Windows limitation of
1210           changing drive letters doesn't affect us in Wine at all, since
1211           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).
1212         </para>
1213         <para>
1214           OK, now that we know some theory about Windows and Unix drive
1215           and filename mapping, it's probably time to ask how Wine
1216           achieves the magic of mapping a Unix directory location to a
1217           Windows drive...
1218         </para>
1219         <para>
1220           Wine chose to do the following:
1221           In Wine, you don't assign some real physical storage medium
1222           (such as a harddisk partition or similar) to each drive letter
1223           mapping entry.
1224           Instead, you choose certain sub directory trees inside the Unix
1225           directory tree (that starts with <filename>/</filename>) that
1226           you would like to assign a drive letter to.
1227         </para>
1228         <para>
1229           Note that for every Unix sub directory tree that you intend to
1230           start Windows programs in, it is <emphasis>absolutely
1231           required</emphasis> to have a Wine drive mapping entry:
1232         </para>
1233         <para>
1234           For example, if you had a publicly writable <quote>Windows
1235           directory space</quote> under <filename>/usr/mywine</filename>, then in order to be
1236           able to access this sub directory tree from Wine, you should
1237           have a drive mapping entry that maps a certain drive letter
1238           (for example, let's take drive letter <filename>P:</filename>)
1239           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.
1240         </para>
1241       </sect2>
1242
1243       <sect2 id="config-no-windows">
1244         <title>Installing Wine Without Windows</title>
1245
1246         <para>
1247           A major goal of Wine is to allow users to run Windows programs
1248           without having to install Windows on their machine. Wine
1249           implements the functionality of the main DLLs usually
1250           provided with Windows. Therefore, once Wine is finished, you
1251           will not need to have Windows installed to use Wine.
1252         </para>
1253         <para>
1254           Wine has already made enough progress that it may be possible
1255           to run your target programs without Windows installed. If
1256           you want to try it, follow these steps:
1257         </para>
1258
1259         <orderedlist>
1260           <listitem>
1261             <para>
1262               Point <medialabel>[Drive C]</medialabel> in
1263               <filename>~/.wine/config</filename> to the directory where you want
1264               <filename>C:</filename> to be. Refer to the wine.conf man page
1265               for more information.
1266             The directory to be used for emulating a C: drive will be
1267             the base directory for some Windows specific directories
1268             created below.
1269             </para>
1270           </listitem>
1271           <listitem>
1272             <para>
1273             Within the directory to be used for C:, create empty
1274             <filename>windows</filename>,
1275               <filename>windows/system</filename>,
1276               <filename>windows/Start Menu</filename>, and
1277               <filename>windows/Start Menu/Programs</filename>
1278               directories. Do not point Wine to a
1279               <filename>Windows</filename> directory full of old
1280               installations and a messy registry. (Wine creates a
1281               special registry in your <filename >home</filename>
1282               directory, in <filename>$HOME/.wine/*.reg</filename>.
1283               Perhaps you have to remove these files).
1284             In one line:
1285             mkdir -p windows windows/system windows/Start\ Menu windows/Start\ Menu/Programs
1286             </para>
1287           </listitem>
1288           <listitem>
1289             <para>
1290               Run and/or install your programs.
1291             </para>
1292           </listitem>
1293         </orderedlist>
1294
1295         <para>
1296           Because Wine is not yet complete, some programs will work
1297           better with native Windows DLLs than with Wine's
1298           replacements. Wine has been designed to make this possible.
1299           Here are some tips by Juergen Schmied (and others) on how to
1300           proceed. This assumes that your
1301           <filename>C:\windows</filename> directory in the configuration
1302           file does not point to a native Windows installation but is in
1303           a separate Unix file system. (For instance, <quote>C:\windows</quote> is
1304           really subdirectory <quote>windows</quote> located in
1305           <quote>/home/ego/wine/drives/c</quote>).
1306         </para>
1307
1308         <itemizedlist>
1309           <listitem>
1310             <para>
1311               Run the program with <parameter>--debugmsg
1312                 +loaddll</parameter> to find out which files are
1313               needed. Copy the required DLLs one by one to the
1314               <filename>C:\windows\system</filename> directory. Do not
1315               copy KERNEL/KERNEL32, GDI/GDI32, USER/USER32 or NTDLL. These
1316               implement the core functionality of the Windows API, and
1317               the Wine internal versions must be used.
1318             </para>
1319           </listitem>
1320           <listitem>
1321             <para>
1322               Edit the <quote>[DllOverrides]</quote> section of
1323               <filename>~/.wine/config</filename> to specify
1324               <quote>native</quote> before <quote>builtin</quote> for
1325               the Windows DLLs you want to use. For more information
1326               about this, see the Wine manpage.
1327             </para>
1328           </listitem>
1329           <listitem>
1330             <para>
1331               Note that some network DLLs are not needed even though
1332               Wine is looking for them. The Windows
1333               <filename>MPR.DLL</filename> currently does not work; you
1334               must use the internal implementation.
1335             </para>
1336           </listitem>
1337           <listitem>
1338             <para>
1339               Copy SHELL.DLL/SHELL32.DLL, COMMDLG.DLL/COMDLG32.DLL
1340               and COMMCTRL.DLL/COMCTL32.DLL
1341               only as pairs to your Wine directory (these DLLs are
1342               <quote>clean</quote> to use).  Make sure you have these
1343               specified in the <quote>[DllPairs]</quote> section of
1344               <filename>~/.wine/config</filename>.
1345             </para>
1346           </listitem>
1347           <listitem>
1348             <para>
1349               Be consistent: Use only DLLs from the same Windows version
1350               together.
1351             </para>
1352           </listitem>
1353           <listitem>
1354             <para>
1355               Put <filename>regedit.exe</filename> in the
1356               <filename>C:\windows</filename> directory.
1357               (<application>Office 95</application> imports a
1358               <filename>*.reg</filename> file when it runs with an empty
1359               registry, don't know about
1360               <application>Office 97</application>).
1361               As of now, it might not be necessary any more to use
1362               regedit.exe, since Wine has its own regedit Winelib
1363               application now.
1364             </para>
1365           </listitem>
1366           <listitem>
1367             <para>
1368               Also add <filename>winhelp.exe</filename> and
1369               <filename>winhlp32.exe</filename> if you want to be able
1370               to browse through your programs' help function
1371             (or in case Wine's winhelp implementation in programs/winhelp/
1372             is not good enough, for example).
1373             </para>
1374           </listitem>
1375         </itemizedlist>
1376       </sect2>
1377
1378       <sect2 id="config-with-windows">
1379         <title>Installing Wine Using An Existing Windows Partition As Base</title>
1380         <para>
1381           Some people intend to use the data of an existing Windows partition
1382         with Wine in order to gain some better compatibility or to run already
1383         installed programs in a setup as original as possible.
1384         Note that many Windows programs assume that they have full write
1385         access to all windows directories.
1386
1387         This means that you either have to configure the Windows
1388         partition mount point for write permission by your Wine user
1389         (see <link linkend="config-drive-vfat">Dealing with FAT/VFAT partitions</link>
1390         on how to do that), or you'll have to copy over (some parts of) the Windows
1391         partition content to a directory of a Unix partition and make
1392         sure this directory structure is writable by your user.
1393         We <emphasis>HIGHLY DISCOURAGE</emphasis> people from directly using a Windows partition with
1394         write access as a base for Wine!! (some programs, notably
1395         Explorer, corrupt large parts of the Windows partition in case
1396         of an incorrect setup; you've been warned).
1397         Not to mention that NTFS write support in Linux is still very
1398         experimental and <emphasis>dangerous</emphasis> (in case you're using an NT-based
1399         Windows version using the NTFS file system).
1400         Thus we advise you to go the Unix directory way.
1401         </para>
1402       </sect2>
1403
1404       <sect2 id="config-drive-vfat">
1405         <title>Dealing With FAT/VFAT Partitions</title>
1406         <para>
1407           This document describes how FAT and
1408           VFAT file system permissions work in Linux
1409           with a focus on configuring them for Wine.
1410         </para>
1411
1412         <sect3>
1413           <title>Introduction</title>
1414           <para>
1415             Linux is able to access DOS and Windows file systems using
1416             either the FAT (older 8.3 DOS filesystems) or VFAT (newer
1417             Windows 95 or later long filename filesystems) modules.
1418             Mounted FAT or VFAT filesystems provide the primary means
1419             for which existing programs and their data are accessed
1420             through Wine for dual boot (Linux + Windows) systems.
1421           </para>
1422           <para>
1423             Wine maps mounted FAT filesystems, such as
1424             <filename>/c</filename>, to driver letters, such as
1425             <quote>c:</quote>, as indicated by the
1426             <filename>~/.wine/config</filename> file.  The following excerpt
1427             from a <filename>~/.wine/config</filename> file does this:
1428           </para>
1429           <programlisting>
1430 [Drive C]
1431 "Path" = "/c"
1432 "Type" = "hd"
1433           </programlisting>
1434           <para>
1435             Although VFAT filesystems are preferable to FAT filesystems
1436             for their long filename support, the term <quote>FAT</quote>
1437             will be used throughout the remainder of this document to
1438             refer to FAT filesystems and their derivatives. Also,
1439             <quote>/c</quote> will be used as the FAT mount point in
1440             examples throughout this document.
1441           </para>
1442           <para>
1443             Most modern Linux distributions either detect or allow
1444             existing FAT file systems to be configured so that they can be
1445             mounted, in a location such as <filename>/c</filename>,
1446             either persistently (on bootup) or on an as needed basis. In
1447             either case, by default, the permissions will probably be
1448             configured so that they look like:
1449           </para>
1450   <screen>
1451   <prompt>~></prompt><userinput>cd /c</userinput>
1452   <prompt>/c></prompt><userinput>ls -l</userinput>
1453   <computeroutput>-rwxr-xr-x   1 root     root           91 Oct 10 17:58 autoexec.bat
1454   -rwxr-xr-x   1 root     root          245 Oct 10 17:58 config.sys
1455   drwxr-xr-x  41 root     root        16384 Dec 30  1998 windows</computeroutput>
1456   </screen>
1457           <para>
1458             where all the files are owned by "root", are in the "root"
1459             group and are only writable by "root"
1460             (<literal>755</literal> permissions). This is restrictive in
1461             that it requires that Wine be run as root in order for
1462             programs to be able to write to any part of the
1463             filesystem.
1464           </para>
1465           <para>
1466             There are three major approaches to overcoming the restrictive
1467             permissions mentioned in the previous paragraph:
1468           </para>
1469           <orderedlist>
1470             <listitem>
1471               <para>
1472                 Run <application>Wine</application> as root
1473               </para>
1474             </listitem>
1475             <listitem>
1476               <para>
1477                 Mount the FAT filesystem with less restrictive
1478                 permissions
1479               </para>
1480             </listitem>
1481             <listitem>
1482               <para>
1483                 Shadow the FAT filesystem by completely or partially
1484                 copying it
1485               </para>
1486             </listitem>
1487           </orderedlist>
1488           <para>
1489             Each approach will be discussed in the following sections.
1490           </para>
1491         </sect3>
1492
1493         <sect3>
1494           <title>Running Wine as root</title>
1495           <para>
1496             Running Wine as root is the easiest and most thorough way of giving
1497             programs that Wine runs unrestricted access to FAT files systems.
1498             Running wine as root also allows programs to do things unrelated
1499             to FAT filesystems, such as listening to ports that are less than
1500             1024.  Running Wine as root is dangerous since there is no limit to
1501             what the program can do to the system, so it's <emphasis>HIGHLY DISCOURAGED</emphasis>.
1502           </para>
1503         </sect3>
1504
1505         <sect3>
1506           <title>Mounting FAT filesystems</title>
1507           <para>
1508             The FAT filesystem can be mounted with permissions less restrictive
1509             than the default.  This can be done by either changing the user that
1510             mounts the FAT filesystem or by explicitly changing the permissions
1511             that the FAT filesystem is mounted with.  The permissions are
1512             inherited from the process that mounts the FAT filesystem.  Since the
1513             process that mounts the FAT filesystem is usually a startup script
1514             running as root the FAT filesystem inherits root's permissions.  This
1515             results in the files on the FAT filesystem having permissions similar
1516             to files created by root.  For example:
1517           </para>
1518   <screen>
1519   <prompt>~></prompt><userinput>whoami</userinput>
1520   <computeroutput>root</computeroutput>
1521   <prompt>~></prompt><userinput>touch root_file</userinput>
1522   <prompt>~></prompt><userinput>ls -l root_file</userinput>
1523   <computeroutput></computeroutput>-rw-r--r--   1 root     root            0 Dec 10 00:20 root_file
1524   </screen>
1525           <para>
1526             which matches the owner, group and permissions of files seen
1527             on the FAT filesystem except for the missing 'x's.  The
1528             permissions on the FAT filesystem can be changed by changing
1529             root's umask (unset permissions bits).  For example:
1530           </para>
1531   <screen>
1532   <prompt>~></prompt><userinput>umount /c</userinput>
1533   <prompt>~></prompt><userinput>umask</userinput>
1534   <computeroutput>022</computeroutput>
1535   <prompt>~></prompt><userinput>umask 073</userinput>
1536   <prompt>~></prompt><userinput>mount /c</userinput>
1537   <prompt>~></prompt><userinput>cd /c</userinput>
1538   <prompt>/c></prompt><userinput>ls -l</userinput>
1539   <computeroutput>-rwx---r--   1 root     root           91 Oct 10 17:58 autoexec.bat
1540   -rwx---r--   1 root     root          245 Oct 10 17:58 config.sys
1541   drwx---r--  41 root     root        16384 Dec 30  1998 windows</computeroutput>
1542   </screen>
1543           <para>
1544             Mounting the FAT filesystem with a umask of
1545             <literal>000</literal> gives all users complete control over
1546             it. Explicitly specifying the permissions of the FAT
1547             filesystem when it is mounted provides additional control.
1548             There are three mount options that are relevant to FAT
1549             permissions: <literal>uid</literal>, <literal>gid</literal>
1550             and <literal>umask</literal>.  They can each be specified
1551             when the filesystem is manually mounted.  For example:
1552           </para>
1553   <screen>
1554   <prompt>~></prompt><userinput>umount /c</userinput>
1555   <prompt>~></prompt><userinput>mount -o uid=500 -o gid=500 -o umask=002 /c</userinput>
1556   <prompt>~></prompt><userinput>cd /c</userinput>
1557   <prompt>/c></prompt><userinput>ls -l</userinput>
1558   <computeroutput>-rwxrwxr-x   1 sle      sle            91 Oct 10 17:58 autoexec.bat
1559   -rwxrwxr-x   1 sle      sle           245 Oct 10 17:58 config.sys
1560   drwxrwxr-x  41 sle      sle         16384 Dec 30  1998 windows</computeroutput>
1561   </screen>
1562           <para>
1563             which gives "sle" complete control over
1564             <filename>/c</filename>.  The options listed above can be
1565             made permanent by adding them to the
1566             <filename>/etc/fstab</filename> file:
1567           </para>
1568   <screen>
1569   <prompt>~></prompt><userinput>grep /c /etc/fstab</userinput>
1570   <computeroutput>/dev/hda1  /c  vfat  uid=500,gid=500,umask=002,exec,dev,suid,rw 1 1</computeroutput>
1571   </screen>
1572           <para>
1573             Note that the umask of <literal>002</literal> is common in
1574             the user private group file permission scheme.  On FAT file
1575             systems this umask assures that all files are fully
1576             accessible by all users in the specified user group
1577             (<literal>gid</literal>).
1578           </para>
1579         </sect3>
1580
1581         <sect3>
1582           <title>Shadowing FAT filesystems</title>
1583           <para>
1584             Shadowing provides a finer granularity of control.  Parts of
1585             the original FAT filesystem can be copied so that the
1586             program can safely work with those copied parts while
1587             the program continues to directly read the remaining
1588             parts.  This is done with symbolic links. For example,
1589             consider a system where a program named
1590             <application>AnApp</application> must be able to read and
1591             write to the <filename>c:\windows</filename> and
1592             <filename>c:\AnApp</filename> directories as well as have
1593             read access to the entire FAT filesystem.  On this system
1594             the FAT filesystem has default permissions which should not
1595             be changed for security reasons or can not be changed due to
1596             lack of root access.  On this system a shadow directory
1597             might be set up in the following manner:
1598           </para>
1599   <screen>
1600   <prompt>~></prompt><userinput>cd /</userinput>
1601   <prompt>/></prompt><userinput>mkdir c_shadow</userinput>
1602   <prompt>/></prompt><userinput>cd c_shadow</userinput>
1603   <prompt>/c_shadow></prompt><userinput>ln -s /c_/* .</userinput>
1604   <prompt>/c_shadow></prompt><userinput>rm windows AnApp</userinput>
1605   <prompt>/c_shadow></prompt><userinput>cp -R /c_/{windows,AnApp} .</userinput>
1606   <prompt>/c_shadow></prompt><userinput>chmod -R 777 windows AnApp</userinput>
1607   <prompt>/c_shadow></prompt><userinput>perl -p -i -e 's|/c$|/c_shadow|g' ~/.wine/config</userinput>
1608   </screen>
1609           <para>
1610           The above gives everyone complete read and write access to
1611           the <filename>windows</filename> and
1612           <filename>AnApp</filename> directories while only root has
1613           write access to all other directories.
1614           </para>
1615         </sect3>
1616       </sect2>
1617
1618       <sect2 id="config-drive-cdrom-labels">
1619
1620       <title>Drive labels and serial numbers</title>
1621       <para>
1622         Until now, your only possibility of specifying drive volume
1623         labels and serial numbers was to set them manually in the wine
1624         configuration file. By now, wine can read them directly from the
1625         device as well. This may be useful for many Win 9x games or
1626         for setup programs distributed on CD-ROMs that check for
1627         volume label.
1628       </para>
1629
1630       <sect3>
1631         <title>What's Supported?</title>
1632
1633         <informaltable frame="all">
1634           <tgroup cols="3">
1635             <thead>
1636         <row>
1637           <entry>File System</entry>
1638           <entry>Types</entry>
1639           <entry>Comment</entry>
1640         </row>
1641             </thead>
1642             <tbody>
1643         <row>
1644           <entry>FAT systems</entry>
1645           <entry>hd, floppy</entry>
1646           <entry>reads labels and serial numbers</entry>
1647         </row>
1648         <row>
1649           <entry>ISO9660</entry>
1650           <entry>cdrom</entry>
1651           <entry>reads labels and serial numbers (not mixed-mode CDs yet!)</entry>
1652         </row>
1653             </tbody>
1654           </tgroup>
1655         </informaltable>
1656
1657       </sect3>
1658
1659       <sect3>
1660         <title>How To Set Up?</title>
1661         <para>
1662           Reading labels and serial numbers just works automatically
1663           if you specify a <literal>"Device" =</literal> line in the
1664           [Drive x] section in your <filename>~/.wine/config</filename>.
1665           Note that the device has to exist and must be accessible by the user
1666           running Wine if you do this, though.
1667         </para>
1668         <para>
1669           If you don't want to read labels and serial numbers directly from
1670           the device, you can create files at the root of the drive
1671           named <filename>.windows-label</filename> and
1672           <filename>.windows-serial</filename> respectively. These are
1673           simple ASCII files that you can create with any text editor;
1674           the label can be set to any string you like, the serial
1675           number should be expressed as an hexadecimal number.
1676         </para>
1677       </sect3>
1678
1679       <sect3>
1680         <title>Examples</title>
1681         <para>
1682           Here's a simple example of CD-ROM and floppy:
1683         </para>
1684         <programlisting>
1685 [Drive A]
1686 "Path" = "/mnt/floppy"
1687 "Type" = "floppy"
1688 "Device" = "/dev/fd0"
1689
1690 [Drive R]
1691 "Path" = "/mnt/cdrom"
1692 "Type" = "cdrom"
1693 "Device" = "/dev/hda1"
1694         </programlisting>
1695       </sect3>
1696
1697       <sect3>
1698         <title>Todo / Open Issues</title>
1699         <itemizedlist>
1700           <listitem> <para>
1701         The CD-ROM label can be read only if the data track of
1702         the disk resides in the first track and the cdrom is
1703         iso9660.
1704             </para> </listitem>
1705           <listitem> <para>
1706         Support for labels/serial nums WRITING.
1707             </para> </listitem>
1708           <listitem> <para>
1709         What about reading ext2 volume label? ....
1710             </para> </listitem>
1711         </itemizedlist>
1712       </sect3>
1713     </sect2>
1714   </sect1>
1715
1716   &registry;
1717
1718 <sect1 id="config-dll">
1719 <title>DLL configuration</title>
1720
1721 <sect2>
1722 <title>Introduction</title>
1723 <para>
1724   If your programs don't work as expected, then it's often because one
1725   DLL or another is failing. This can often be resolved by changing
1726   certain DLLs from Wine built-in to native Windows DLL file and vice
1727   versa.
1728 </para>
1729 <para>
1730   A very useful help to find out which DLLs are loaded as built-in and
1731   which are loaded as native Windows file can be the debug channel
1732   loaddll, activated via the Wine command line parameter
1733   <command>--debugmsg +loaddll</command>.
1734 </para>
1735 </sect2>
1736
1737 <sect2>
1738 <!-- FIXME intro!!! -->
1739 <title>Introduction To DLL Sections</title>
1740 <para>
1741   There are a few things you will need to know before
1742   configuring the DLL sections in your wine configuration
1743   file.
1744 </para>
1745 <sect3>
1746   <title>Windows DLL Pairs</title>
1747   <para>
1748     Most windows DLL's have a win16 (Windows 3.x) and win32
1749     (Windows 9x/NT) form.  The combination of the win16 and
1750     win32 DLL versions are called the "DLL pair". This is a
1751     list of the most common pairs:
1752   </para>
1753
1754   <informaltable>
1755     <tgroup cols="3">
1756       <thead>
1757         <row>
1758           <entry>Win16</entry>
1759           <entry>Win32</entry>
1760           <entry>
1761             Native
1762             <footnote>
1763               <para>
1764                 Is it possible to use native DLL with wine?
1765                 (See next section)
1766               </para>
1767             </footnote>
1768           </entry>
1769         </row>
1770       </thead>
1771       <tbody>
1772         <row>
1773           <entry>KERNEL</entry>
1774           <entry>KERNEL32</entry>
1775           <entry>No!</entry>
1776         </row>
1777         <row>
1778           <entry>USER</entry>
1779           <entry>USER32</entry>
1780           <entry>No!</entry>
1781         </row>
1782         <row>
1783           <entry>SHELL</entry>
1784           <entry>SHELL32</entry>
1785           <entry>Yes</entry>
1786         </row>
1787         <row>
1788           <entry>GDI</entry>
1789           <entry>GDI32</entry>
1790           <entry>No!</entry>
1791         </row>
1792         <row>
1793           <entry>COMMDLG</entry>
1794           <entry>COMDLG32</entry>
1795           <entry>Yes</entry>
1796         </row>
1797         <row>
1798           <entry>VER</entry>
1799           <entry>VERSION</entry>
1800           <entry>Yes</entry>
1801         </row>
1802       </tbody>
1803     </tgroup>
1804   </informaltable>
1805 </sect3>
1806
1807 <sect3>
1808   <title>Different Forms Of DLL's</title>
1809   <para>
1810     There are a few different forms of DLL's wine can load:
1811     <variablelist>
1812       <varlistentry>
1813         <term>native</term>
1814         <listitem><para>
1815             The DLL's that are included with windows. Many
1816             windows DLL's can be loaded in their native
1817             form. Many times these native versions work
1818             better than their non-Microsoft equivalent --
1819             other times they don't.
1820           </para></listitem>
1821       </varlistentry>
1822       <varlistentry>
1823         <term>builtin</term>
1824         <listitem><para>
1825             The most common form of DLL loading. This is
1826             what you will use if the DLL is too system-specific
1827               or error-prone in native form (KERNEL for example),
1828               you don't have the native DLL, or you just want to be
1829             Microsoft-free.
1830           </para></listitem>
1831       </varlistentry>
1832       <varlistentry>
1833         <term>so</term>
1834         <listitem><para>
1835             Native ELF libraries. Has been deprecated, ignored.
1836           </para></listitem>
1837       </varlistentry>
1838       <varlistentry>
1839         <term>elfdll</term>
1840         <listitem><para>
1841             ELF encapsulated windows DLL's.
1842               No longer used, ignored.
1843           </para></listitem>
1844       </varlistentry>
1845     </variablelist>
1846   </para>
1847 </sect3>
1848 </sect2>
1849
1850 <sect2 id="config-dll-overrides">
1851 <title>DLL Overrides</title>
1852
1853 <para>
1854   The wine configuration file directives [DllDefaults]
1855   and [DllOverrides] are the subject of some confusion. The
1856   overall purpose of most of these directives are clear enough,
1857   though - given a choice, should Wine use its own built-in
1858   DLLs, or should it use <filename>.DLL</filename> files found
1859   in an existing Windows installation? This document explains
1860   how this feature works.
1861 </para>
1862
1863 <sect3>
1864   <title>DLL types</title>
1865   <variablelist>
1866     <varlistentry>
1867       <term>native</term>
1868       <listitem> <para>
1869           A "native" DLL is a <filename>.DLL</filename> file
1870           written for the real Microsoft Windows.
1871         </para> </listitem>
1872     </varlistentry>
1873     <varlistentry>
1874       <term>builtin</term>
1875       <listitem> <para>
1876           A "built-in" DLL is a Wine DLL. These can either be a
1877           part of <filename>libwine.so</filename>, or more
1878           recently, in a special <filename>.so</filename> file
1879           that Wine is able to load on demand.
1880         </para> </listitem>
1881     </varlistentry>
1882   </variablelist>
1883 </sect3>
1884
1885 <sect3>
1886   <title>The [DllDefaults] section</title>
1887   <variablelist>
1888     <varlistentry>
1889       <term>DefaultLoadOrder</term>
1890       <listitem> <para>
1891           This specifies in what order Wine should search for
1892           available DLL types, if the DLL in question was not
1893           found in the [DllOverrides] section.
1894         </para> </listitem>
1895     </varlistentry>
1896   </variablelist>
1897 </sect3>
1898
1899 <sect3>
1900   <title>The [DllPairs] section</title>
1901   <para>
1902     At one time, there was a section called [DllPairs] in the
1903     default configuration file, but this has been obsoleted
1904     because the pairing information has now been embedded into
1905     Wine itself. (The purpose of this section was merely to be
1906     able to issue warnings if the user attempted to pair
1907     codependent 16-bit/32-bit DLLs of different types.) If you
1908     still have this in your <filename>~/.wine/config</filename> or
1909     <filename>wine.conf</filename>, you may safely delete it.
1910   </para>
1911 </sect3>
1912
1913 <sect3>
1914   <title>The [DllOverrides] section</title>
1915   <para>
1916     This section specifies how you want specific DLLs to be
1917     handled, in particular whether you want to use "native" DLLs
1918     or not, if you have some from a real Windows configuration.
1919     Because built-ins do not mix seamlessly with native DLLs yet,
1920     certain DLL dependencies may be problematic, but workarounds
1921     exist in Wine for many popular DLL configurations. Also see
1922     WWN's [16]Status Page to figure out how well your favorite
1923     DLL is implemented in Wine.
1924   </para>
1925   <para>
1926     It is of course also possible to override these settings by
1927     explicitly using Wine's <parameter>--dll</parameter>
1928     command-line option (see the man page for details).  Some
1929     hints for choosing your optimal configuration (listed by
1930     16/32-bit DLL pair):
1931   </para>
1932   <variablelist>
1933     <varlistentry>
1934       <term>krnl386, kernel32</term>
1935       <listitem> <para>
1936           Native versions of these will never work, so don't try. Leave
1937           at <literal>builtin</literal>.
1938         </para> </listitem>
1939     </varlistentry>
1940     <varlistentry>
1941       <term>gdi, gdi32</term>
1942       <listitem> <para>
1943           Graphics Device Interface. No effort has been made at trying to
1944           run native GDI. Leave at <literal>builtin</literal>.
1945         </para> </listitem>
1946     </varlistentry>
1947     <varlistentry>
1948       <term>user, user32</term>
1949       <listitem> <para>
1950           Window management and standard controls. It was
1951           possible to use Win95's <literal>native</literal>
1952           versions at some point (if all other DLLs that depend
1953           on it, such as comctl32 and comdlg32, were also run
1954           <literal>native</literal>). However, this is no longer
1955           possible after the Address Space Separation, so leave
1956           at <literal>builtin</literal>.
1957         </para> </listitem>
1958     </varlistentry>
1959     <varlistentry>
1960       <term>ntdll</term>
1961       <listitem> <para>
1962           NT kernel API. Although badly documented, the
1963           <literal>native</literal> version of this will never
1964           work. Leave at <literal>builtin</literal>.
1965         </para> </listitem>
1966     </varlistentry>
1967     <varlistentry>
1968       <term>w32skrnl</term>
1969       <listitem> <para>
1970           Win32s (for Win3.x). The <literal>native</literal>
1971           version will probably never work. Leave at
1972           <literal>builtin</literal>.
1973         </para> </listitem>
1974     </varlistentry>
1975     <varlistentry>
1976       <term>wow32</term>
1977       <listitem> <para>
1978           Win16 support library for NT. The
1979           <literal>native</literal> version will probably never
1980           work. Leave at <literal>builtin</literal>.
1981         </para> </listitem>
1982     </varlistentry>
1983     <varlistentry>
1984       <term>system</term>
1985       <listitem> <para>
1986           Win16 kernel stuff. Will never work
1987           <literal>native</literal>. Leave at
1988           <literal>builtin</literal>.
1989         </para> </listitem>
1990     </varlistentry>
1991     <varlistentry>
1992       <term>display</term>
1993       <listitem> <para>
1994           Display driver. Definitely leave at <literal>builtin</literal>.
1995         </para> </listitem>
1996     </varlistentry>
1997     <varlistentry>
1998       <term>toolhelp</term>
1999       <listitem> <para>
2000           Tool helper routines. This is rarely a source of problems.
2001           Leave at <literal>builtin</literal>.
2002         </para> </listitem>
2003     </varlistentry>
2004     <varlistentry>
2005       <term>ver, version</term>
2006       <listitem> <para>
2007           Versioning. Seldom useful to mess with.
2008         </para> </listitem>
2009     </varlistentry>
2010     <varlistentry>
2011       <term>advapi32</term>
2012       <listitem> <para>
2013           Registry and security features. Trying the
2014           <literal>native</literal> version of this may or may
2015           not work.
2016         </para> </listitem>
2017     </varlistentry>
2018     <varlistentry>
2019       <term>commdlg, comdlg32</term>
2020       <listitem> <para>
2021           Common Dialogs, such as color picker, font dialog,
2022           print dialog, open/save dialog, etc. It is safe to try
2023           <literal>native</literal>.
2024         </para> </listitem>
2025     </varlistentry>
2026     <varlistentry>
2027       <term>commctrl, comctl32</term>
2028       <listitem> <para>
2029           Common Controls. This is toolbars, status bars, list controls,
2030           the works. It is safe to try <literal>native</literal>.
2031         </para> </listitem>
2032     </varlistentry>
2033     <varlistentry>
2034       <term>shell, shell32</term>
2035       <listitem> <para>
2036           Shell interface (desktop, filesystem, etc). Being one of the
2037           most undocumented pieces of Windows, you may have luck with the
2038           <literal>native</literal> version, should you need it.
2039         </para> </listitem>
2040     </varlistentry>
2041     <varlistentry>
2042       <term>winsock, wsock32</term>
2043       <listitem> <para>
2044           Windows Sockets. The <literal>native</literal> version
2045           will not work under Wine, so leave at
2046           <literal>builtin</literal>.
2047         </para> </listitem>
2048     </varlistentry>
2049     <varlistentry>
2050       <term>icmp</term>
2051       <listitem> <para>
2052           ICMP routines for wsock32. As with wsock32, leave at
2053           <literal>builtin</literal>.
2054         </para> </listitem>
2055     </varlistentry>
2056     <varlistentry>
2057       <term>mpr</term>
2058       <listitem> <para>
2059           The <literal>native</literal> version may not work due
2060           to thunking issues. Leave at
2061           <literal>builtin</literal>.
2062         </para> </listitem>
2063     </varlistentry>
2064     <varlistentry>
2065       <term>lzexpand, lz32</term>
2066       <listitem> <para>
2067           Lempel-Ziv decompression. Wine's
2068           <literal>builtin</literal> version ought to work fine.
2069         </para> </listitem>
2070     </varlistentry>
2071     <varlistentry>
2072       <term>winaspi, wnaspi32</term>
2073       <listitem> <para>
2074           Advanced SCSI Peripheral Interface. The
2075           <literal>native</literal> version will probably never
2076           work. Leave at <literal>builtin</literal>.
2077         </para> </listitem>
2078     </varlistentry>
2079     <varlistentry>
2080       <term>crtdll</term>
2081       <listitem> <para>
2082           C Runtime library. The <literal>native</literal>
2083           version will easily work better than Wine's on this
2084           one.
2085         </para> </listitem>
2086     </varlistentry>
2087     <varlistentry>
2088       <term>winspool.drv</term>
2089       <listitem> <para>
2090           Printer spooler. You are not likely to have more luck
2091           with the <literal>native</literal> version.
2092         </para> </listitem>
2093     </varlistentry>
2094     <varlistentry>
2095       <term>ddraw</term>
2096       <listitem> <para>
2097           DirectDraw/Direct3D. Since Wine does not implement the
2098           DirectX HAL, the <literal>native</literal> version
2099           will not work at this time.
2100         </para> </listitem>
2101     </varlistentry>
2102     <varlistentry>
2103       <term>dinput</term>
2104       <listitem> <para>
2105           DirectInput. Running this <literal>native</literal>
2106           may or may not work.
2107         </para> </listitem>
2108     </varlistentry>
2109     <varlistentry>
2110       <term>dsound</term>
2111       <listitem> <para>
2112           DirectSound. It may be possible to run this
2113           <literal>native</literal>, but don't count on it.
2114         </para> </listitem>
2115     </varlistentry>
2116     <varlistentry>
2117       <term>dplay/dplayx</term>
2118       <listitem> <para>
2119           DirectPlay. The <literal>native</literal> version
2120           ought to work best on this, if at all.
2121         </para> </listitem>
2122     </varlistentry>
2123     <varlistentry>
2124       <term>mmsystem, winmm</term>
2125       <listitem> <para>
2126           Multimedia system. The <literal>native</literal>
2127           version is not likely to work. Leave at
2128           <literal>builtin</literal>.
2129         </para> </listitem>
2130     </varlistentry>
2131     <varlistentry>
2132       <term>msacm, msacm32</term>
2133       <listitem> <para>
2134           Audio Compression Manager. The
2135           <literal>builtin</literal> version works best, if you
2136           set msacm.drv to the same.
2137         </para> </listitem>
2138     </varlistentry>
2139     <varlistentry>
2140       <term>msvideo, msvfw32</term>
2141       <listitem> <para>
2142           Video for Windows. It is safe (and recommended) to try
2143           <literal>native</literal>.
2144         </para> </listitem>
2145     </varlistentry>
2146     <varlistentry>
2147       <term>mcicda.drv</term>
2148       <listitem> <para>
2149           CD Audio MCI driver.
2150         </para> </listitem>
2151     </varlistentry>
2152     <varlistentry>
2153       <term>mciseq.drv</term>
2154       <listitem> <para>
2155           MIDI Sequencer MCI driver (<filename>.MID</filename>
2156           playback).
2157         </para> </listitem>
2158     </varlistentry>
2159     <varlistentry>
2160       <term>mciwave.drv</term>
2161       <listitem> <para>
2162           Wave audio MCI driver (<filename>.WAV</filename> playback).
2163         </para> </listitem>
2164     </varlistentry>
2165     <varlistentry>
2166       <term>mciavi.drv</term>
2167       <listitem> <para>
2168           AVI MCI driver (<filename>.AVI</filename> video
2169           playback). Best to use <literal>native</literal>.
2170         </para> </listitem>
2171     </varlistentry>
2172     <varlistentry>
2173       <term>mcianim.drv</term>
2174       <listitem> <para>
2175           Animation MCI driver.
2176         </para> </listitem>
2177     </varlistentry>
2178     <varlistentry>
2179       <term>msacm.drv</term>
2180       <listitem> <para>
2181           Audio Compression Manager. Set to same as msacm32.
2182         </para> </listitem>
2183     </varlistentry>
2184     <varlistentry>
2185       <term>midimap.drv</term>
2186       <listitem> <para>
2187           MIDI Mapper.
2188         </para> </listitem>
2189     </varlistentry>
2190     <varlistentry>
2191       <term>wprocs</term>
2192       <listitem> <para>
2193           This is a pseudo-DLL used by Wine for thunking
2194           purposes. A <literal>native</literal> version of this
2195           doesn't exist.
2196         </para> </listitem>
2197     </varlistentry>
2198   </variablelist>
2199 </sect3>
2200 </sect2>
2201
2202 <sect2 id="config-system-dlls">
2203 <title>System DLLs</title>
2204 <para>
2205   The Wine team has determined that it is necessary to create
2206   fake DLL files to trick many programs that check for
2207   file existence to determine whether a particular feature
2208   (such as Winsock and its TCP/IP networking) is available. If
2209   this is a problem for you, you can create empty files in the
2210   configured <filename>c:\windows\system</filename> directory
2211   to make the program think it's there, and Wine's built-in DLL
2212   will be loaded when the program actually asks for it.
2213   (Unfortunately, <filename>tools/wineinstall</filename> does
2214   not create such empty files itself.)
2215 </para>
2216 <para>
2217   Applications sometimes also try to inspect the version
2218   resources from the physical files (for example, to determine
2219   the DirectX version). Empty files will not do in this case,
2220   it is rather necessary to install files with complete
2221   version resources. This problem is currently being worked
2222   on. In the meantime, you may still need to grab some real
2223   DLL files to fool these apps with.
2224 </para>
2225 <para>
2226   And there are of course DLLs that wine does not currently
2227   implement very well (or at all). If you do not have a real
2228   Windows you can steal necessary DLLs from, you can always
2229   get some from one of the Windows DLL archive sites
2230   that can be found via internet search engine.
2231   Please make sure to obey any licenses on the DLLs you fetch...
2232   (some are redistributable, some aren't).
2233 </para>
2234 </sect2>
2235
2236 <sect2 id="config-dll-missing">
2237 <title>Missing DLLs</title>
2238
2239 <para>
2240   In case Wine complains about a missing DLL, you should check whether
2241   this file is a publicly available DLL or a custom DLL belonging
2242   to your program (by searching for its name on the internet).
2243   If you managed to get hold of the DLL, then you should make sure
2244   that Wine is able to find and load it.
2245   DLLs usually get loaded according to the mechanism of the
2246   SearchPath() function.
2247   This function searches directories in the following order:
2248
2249   <orderedlist>
2250     <listitem>
2251       <para>
2252         The directory the program was started from.
2253       </para>
2254     </listitem>
2255     <listitem>
2256       <para>
2257         The current directory.
2258       </para>
2259     </listitem>
2260     <listitem>
2261       <para>
2262         The Windows system directory.
2263       </para>
2264     </listitem>
2265     <listitem>
2266       <para>
2267         The Windows directory.
2268       </para>
2269     </listitem>
2270     <listitem>
2271       <para>
2272         The PATH variable directories.
2273       </para>
2274     </listitem>
2275   </orderedlist>
2276
2277   In short: either put the required DLL into your program
2278   directory (might be ugly), or usually put it into the Windows system
2279   directory. Just find out its directory by having a look at the Wine
2280   configuration file variable "System" (which indicates the location of the
2281   Windows system directory) and the associated drive entry.
2282   Note that you probably shouldn't use NT-based native DLLs,
2283   since Wine's NT API support is somewhat weaker than its Win9x
2284   API support (thus leading to even worse compatibility with NT DLLs
2285   than with a no-windows setup!), so better use Win9x native DLLs
2286   instead or no native DLLs at all.
2287 </para>
2288 </sect2>
2289
2290 <sect2 id="config-dll-windows">
2291 <title>Fetching native DLLs from a Windows CD</title>
2292
2293 <para>
2294 The Linux <command>cabextract</command> utility can be used to
2295 extract native Windows .dll files from .cab files that are to be
2296 found on many Windows installation CDs.
2297 </para>
2298 </sect2>
2299 </sect1>
2300
2301 <sect1 id="config-graphics-driver">
2302 <title>Configuring the graphics driver (x11drv, ttydrv etc.)</title>
2303
2304 <para>
2305 Wine currently supports several different display subsystems
2306 (graphics / text) that are available on various operating
2307 systems today.
2308 For each of these, Wine implements its own interfacing driver.
2309 This section explains how to select one of these drivers
2310 and how to further configure the respective driver.
2311 Once you're finished with that, you can consider your Wine installation
2312 to be finished.
2313 </para>
2314
2315 <para>
2316 The display drivers currently implemented in Wine are:
2317 x11drv, which is used for interfacing to X11 graphics
2318 (the one you'll most likely want to use) and ttydrv
2319 (used for text mode console apps mainly that don't really need
2320 any graphics output).
2321 Once you have decided which display driver to use, it is chosen
2322 with the <literal>GraphicsDriver</literal> option in the
2323 [wine] section of <filename>~/.wine/config</filename>.
2324 </para>
2325
2326 <sect2>
2327 <title>Configuring the x11drv graphics driver</title>
2328
2329 <sect3>
2330   <title>x11drv modes of operation</title>
2331
2332   <para>
2333     The x11drv driver consists of two conceptually distinct
2334     pieces, the graphics driver (GDI part), and the windowing
2335     driver (USER part). Both of these are linked into the
2336     <filename>libx11drv.so</filename> module, though (which you
2337     load with the <literal>GraphicsDriver</literal> option). In
2338     Wine, running on X11, the graphics driver must draw on
2339     drawables (window interiors) provided by the windowing
2340     driver. This differs a bit from the Windows model, where the
2341     windowing system creates and configures device contexts
2342     controlled by the graphics driver, and programs are
2343     allowed to hook into this relationship anywhere they like.
2344     Thus, to provide any reasonable tradeoff between
2345     compatibility and usability, the x11drv has three different
2346     modes of operation.
2347   </para>
2348
2349   <variablelist>
2350     <varlistentry>
2351       <term>Managed</term>
2352       <listitem>
2353         <para>
2354           The default. Specified by using the <literal>Managed</literal>
2355           wine configuration file option (see below).
2356           Ordinary top-level frame windows with thick borders,
2357           title bars, and system menus will be managed by your
2358           window manager. This lets these programs integrate
2359           better with the rest of your desktop, but may not
2360           always work perfectly (a rewrite of this mode of
2361           operation, to make it more robust and less patchy, is
2362           currently being done, though, and it's planned to be
2363           finished before the Wine 1.0 release).
2364         </para>
2365       </listitem>
2366     </varlistentry>
2367     <varlistentry>
2368       <term>Unmanaged / Normal</term>
2369       <listitem>
2370         <para>
2371           Window manager independent (any running
2372           window manager is ignored completely). Window
2373           decorations (title bars, borders, etc) are drawn by
2374           Wine to look and feel like the real Windows. This is
2375           compatible with programs that depend on being able
2376           to compute the exact sizes of any such decorations, or
2377           that want to draw their own.
2378           Unmanaged mode is only used if both Managed and Desktop
2379           are set to disabled.
2380         </para>
2381       </listitem>
2382     </varlistentry>
2383     <varlistentry>
2384       <term>Desktop-in-a-Box</term>
2385       <listitem>
2386         <para>
2387           Specified by using the <literal>Desktop</literal>
2388         wine configuration file option (see below).
2389           (adding a geometry, e.g. <literal>800x600</literal>
2390         for a such-sized desktop, or
2391           even <literal>800x600+0+0</literal> to
2392           automatically position the desktop at the upper-left
2393           corner of the display). This is the mode most
2394           compatible with the Windows model. All program
2395           windows will just be Wine-drawn windows inside the
2396           Wine-provided desktop window (which will itself be
2397           managed by your window manager), and Windows
2398           programs can roam freely within this virtual
2399           workspace and think they own it all, without
2400           disturbing your other X apps.
2401         Note: currently there's one desktop window for every
2402         program; this will be fixed at some time.
2403         </para>
2404       </listitem>
2405     </varlistentry>
2406   </variablelist>
2407 </sect3>
2408
2409 <sect3>
2410   <title>The [x11drv] section</title>
2411
2412   <variablelist>
2413     <varlistentry>
2414       <term>Managed</term>
2415       <listitem>
2416         <para>
2417           Wine can let frame windows be managed by your window
2418           manager. This option specifies whether you want that
2419           by default.
2420         </para>
2421       </listitem>
2422     </varlistentry>
2423     <varlistentry>
2424       <term>Desktop</term>
2425       <listitem>
2426         <para>
2427           Creates a main desktop window of a specified size
2428         to display all Windows programs in.
2429         The size argument could e.g. be "800x600".
2430         </para>
2431       </listitem>
2432     </varlistentry>
2433     <varlistentry>
2434       <term>DXGrab</term>
2435       <listitem>
2436         <para>
2437           If you don't use DGA, you may want an alternative
2438           means to convince the mouse cursor to stay within the
2439           game window. This option does that. Of course, as with
2440           DGA, if Wine crashes, you're in trouble (although not
2441           as badly as in the DGA case, since you can still use
2442           the keyboard to get out of X).
2443         </para>
2444       </listitem>
2445     </varlistentry>
2446     <varlistentry>
2447       <term>UseDGA</term>
2448       <listitem>
2449         <para>
2450           This specifies whether you want DirectDraw to use
2451           XFree86's <firstterm>Direct Graphics
2452             Architecture</firstterm> (DGA), which is able to
2453           take over the entire display and run the game
2454           full-screen at maximum speed. (With DGA1 (XFree86
2455           3.x), you still have to configure the X server to the
2456           game's requested bpp first, but with DGA2 (XFree86
2457           4.x), runtime depth-switching may be possible,
2458           depending on your driver's capabilities.) But be aware
2459           that if Wine crashes while in DGA mode, it may not be
2460           possible to regain control over your computer without
2461           rebooting. DGA normally requires either root
2462           privileges or read/write access to
2463           <filename>/dev/mem</filename>.
2464         </para>
2465       </listitem>
2466     </varlistentry>
2467     <varlistentry>
2468       <term>DesktopDoubleBuffered</term>
2469       <listitem>
2470         <para>
2471           Applies only if you use the
2472           <parameter>--desktop</parameter> command-line option
2473           to run in a desktop window. Specifies whether to
2474           create the desktop window with a double-buffered
2475           visual, something most OpenGL games need to run
2476           correctly.
2477         </para>
2478       </listitem>
2479     </varlistentry>
2480     <varlistentry>
2481       <term>AllocSystemColors</term>
2482       <listitem>
2483         <para>
2484           Applies only if you have a palette-based display, i.e.
2485           if your X server is set to a depth of 8bpp, and if you
2486           haven't requested a private color map. It specifies
2487           the maximum number of shared colormap cells (palette
2488           entries) Wine should occupy. The higher this value,
2489           the less colors will be available to other
2490           programs.
2491         </para>
2492       </listitem>
2493     </varlistentry>
2494     <varlistentry>
2495       <term>PrivateColorMap</term>
2496       <listitem>
2497         <para>
2498           Applies only if you have a palette-based display, i.e.
2499           if your X server is set to a depth of 8bpp. It
2500           specifies that you don't want to use the shared color
2501           map, but a private color map, where all 256 colors are
2502           available. The disadvantage is that Wine's private
2503           color map is only seen while the mouse pointer is
2504           inside a Wine window, so psychedelic flashing and
2505           funky colors will become routine if you use the mouse
2506           a lot.
2507         </para>
2508       </listitem>
2509     </varlistentry>
2510     <varlistentry>
2511       <term>Synchronous</term>
2512       <listitem>
2513         <para>
2514           To be used for debugging X11 operations.
2515         If Wine crashes with an X11 error, then you should enable
2516         Synchronous mode to disable X11 request caching in order
2517         to make sure that the X11 error happens directly after
2518         the corresponding X11 call in the log file appears.
2519         Will slow down X11 output!
2520         </para>
2521       </listitem>
2522     </varlistentry>
2523     <varlistentry>
2524       <term>ScreenDepth</term>
2525       <listitem>
2526         <para>
2527           Applies only to multi-depth displays. It specifies
2528           which of the available depths Wine should use (and
2529           tell Windows apps about).
2530         </para>
2531       </listitem>
2532     </varlistentry>
2533     <varlistentry>
2534       <term>Display</term>
2535       <listitem>
2536         <para>
2537           This specifies which X11 display to use, and if
2538           specified, will override the
2539           <envar>DISPLAY</envar> environment variable.
2540         </para>
2541       </listitem>
2542     </varlistentry>
2543     <varlistentry>
2544       <term>PerfectGraphics</term>
2545       <listitem>
2546         <para>
2547           This option only determines whether fast X11 routines
2548           or exact Wine routines will be used for certain ROP
2549           codes in blit operations. Most users won't notice any
2550           difference.
2551         </para>
2552       </listitem>
2553     </varlistentry>
2554   </variablelist>
2555 </sect3>
2556 </sect2>
2557
2558 <sect2>
2559 <title>Configuring the ttydrv graphics driver</title>
2560 <para>
2561   Currently, the ttydrv doesn't have any special configuration
2562   options to set in the configuration file.
2563 </para>
2564 </sect2>
2565
2566 </sect1>
2567
2568 <sect1 id="config-windows-versions">
2569
2570 <title>Setting the Windows and DOS version value</title>
2571
2572 <para>
2573 The windows and DOS version value a program gets e.g. by calling the
2574 Windows function GetVersion() plays a very important role:
2575 If your Wine installation for whatever reason fails to provide
2576 to your program the correct version value that it expects,
2577 then the program might assume some very bad things and fail (in
2578 the worst case even silently!).
2579
2580 Fortunately Wine contains some more or less intelligent Windows
2581 version guessing algorithm that will try to guess the Windows
2582 version a program might expect and pass that one on to the
2583 program.
2584
2585 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.
2586 </para>
2587
2588 <sect2>
2589 <title>How to configure the Windows and DOS version value Wine
2590 should return</title>
2591
2592 <para>
2593 The version values can be configured in the wine configuration file in
2594 the [Version] section.
2595 </para>
2596
2597 <variablelist>
2598   <varlistentry>
2599     <term>"Windows" = "&lt;version string&gt;"</term>
2600     <listitem>
2601       <para>
2602         default: none; chosen by semi-intelligent detection
2603         mechanism based on DLL environment.
2604         Used to specify which Windows version to return to
2605         programs  (forced  value, overrides standard detection
2606         mechanism!). Valid  settings are e.g. "win31", "win95",
2607         "win98",  "win2k",  "winxp".
2608         Also valid as an
2609         <link linkend="config-appdefaults">AppDefaults</link>
2610         setting (recommended/preferred use).
2611       </para>
2612     </listitem>
2613   </varlistentry>
2614   <varlistentry>
2615     <term>"DOS"="&lt;version string&gt;"</term>
2616     <listitem>
2617       <para>
2618         Used to specify the DOS version that should be returned
2619         to programs. Only takes effect in case Wine acts as
2620         "win31" Windows version! Common DOS version settings
2621         include 6.22, 6.20, 6.00, 5.00, 4.00, 3.30, 3.10.
2622         Also valid as an
2623         <link linkend="config-appdefaults">AppDefaults</link>
2624         setting (recommended/preferred use).
2625       </para>
2626     </listitem>
2627   </varlistentry>
2628 </variablelist>
2629 </sect2>
2630 </sect1>
2631
2632 &fonts;
2633 &printing;
2634
2635 <sect1 id="config-win95look">
2636 <title>Win95/98 Look And Feel</title>
2637 <para>
2638 Instead of compiling Wine for Win3.1 vs. Win95 using
2639 <constant>#define</constant> switches, the code now looks in a
2640 special [Tweak.Layout] section of
2641 <filename>~/.wine/config</filename> for a
2642 <literal>"WineLook" = "Win95"</literal> or
2643 <literal>"WineLook" = "Win98"</literal> entry.
2644 </para>
2645 <para>
2646 A few new sections and a number of entries have been added to
2647 the <filename>~/.wine/config</filename> file -- these are for
2648 debugging the Win95 tweaks only and may be removed in a future
2649 release!  These entries/sections are:
2650 </para>
2651 <programlisting>
2652 [Tweak.Fonts]
2653 "System.Height" = "&lt;point size>"    # Sets the height of the system typeface
2654 "System.Bold" = "[true|false]"      # Whether the system font should be boldfaced
2655 "System.Italic" = "[true|false]"    # Whether the system font should be italicized
2656 "System.Underline" = "[true|false]" # Whether the system font should be underlined
2657 "System.StrikeOut" = "[true|false]" # Whether the system font should be struck out
2658 "OEMFixed.xxx"                  # Same parameters for the OEM fixed typeface
2659 "AnsiFixed.xxx"                 # Same parameters for the Ansi fixed typeface
2660 "AnsiVar.xxx"                   # Same parameters for the Ansi variable typeface
2661 "SystemFixed.xxx"               # Same parameters for the System fixed typeface
2662
2663 [Tweak.Layout]
2664 "WineLook" = "[Win31|Win95|Win98]"  # Changes Wine's look and feel
2665 </programlisting>
2666 </sect1>
2667
2668     <sect1 id="config-scsi-support">
2669       <title>SCSI Support</title>
2670       <para>
2671         This file describes setting up the Windows ASPI interface.
2672         ASPI is a direct link to SCSI devices from windows programs. 
2673         ASPI just forwards the SCSI commands that programs send
2674         to it to the SCSI bus.
2675       </para>
2676       <para>
2677         If you use the wrong SCSI device in your setup file, you can send
2678         completely bogus commands to the wrong device - An example would be
2679         formatting your hard drives (assuming the device gave you permission -
2680         if you're running as root, all bets are off).
2681       </para>
2682       <para>
2683         So please make sure that <emphasis>all</emphasis> SCSI devices not needed by the program
2684         have their permissions set as restricted as possible!
2685       </para>
2686
2687       <sect2>
2688         <title>Windows requirements</title>
2689         <orderedlist>
2690           <listitem>
2691             <para>
2692               The software needs to use the "Adaptec"
2693               compatible drivers (ASPI). At least with Mustek, they
2694               allow you the choice of using the built-in card or the
2695               "Adaptec (AHA)" compatible drivers. This will not work
2696               any other way. Software that accesses the scanner via a
2697               DOS ASPI driver (e.g. ASPI2DOS) is supported, too.
2698             </para>
2699           </listitem>
2700           <listitem>
2701             <para>
2702               You probably need a real windows install of the software
2703               to set the LUN's/SCSI id's up correctly. I'm not exactly
2704               sure.
2705             </para>
2706           </listitem>
2707         </orderedlist>
2708       </sect2>
2709
2710       <sect2>
2711         <title>Linux requirements</title>
2712         <orderedlist>
2713           <listitem>
2714             <para>
2715               Your SCSI card must be supported under Linux. This will
2716               not work with an unknown SCSI card. Even for cheap'n
2717               crappy "scanner only" controllers some special Linux
2718               drivers exist on the net.
2719               If you intend to use your IDE device, you need to use the
2720               ide-scsi emulation.
2721               Read
2722               <ulink url="http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html">
2723                           http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html</ulink>
2724               for ide-scsi setup instructions.
2725             </para>
2726           </listitem>
2727           <listitem>
2728             <para>
2729               Compile generic SCSI drivers into your kernel.
2730             </para>
2731           </listitem>
2732           <listitem>
2733             <para>
2734               This seems to be not required any more for newer (2.2.x) kernels:
2735               Linux by default uses smaller SCSI buffers than Windows.
2736               There is a kernel build define <literal>SG_BIG_BUFF</literal> (in
2737               <filename>sg.h</filename>) that is by default set too
2738               low. The SANE project recommends
2739               <literal>130560</literal> and this seems to work just
2740               fine. This does require a kernel rebuild.
2741             </para>
2742           </listitem>
2743           <listitem>
2744             <para>
2745               Make the devices for the scanner (generic SCSI devices)
2746               - look at the SCSI programming HOWTO at
2747               <ulink url="http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html">
2748                           http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html</ulink>
2749               for device numbering.
2750             </para>
2751           </listitem>
2752           <listitem>
2753             <para>
2754               I would recommend making the scanner device writable by
2755               a group. I made a group called
2756               <literal>scanner</literal> and added myself to it.
2757               Running as root increases your risk of sending bad SCSI
2758               commands to the wrong device. With a regular user, you
2759               are better protected.
2760             </para>
2761           </listitem>
2762           <listitem>
2763             <para>
2764               For Win32 software (WNASPI32), Wine has auto-detection in place.
2765               For Win16 software (WINASPI), you need to add a SCSI device entry
2766               for your particular scanner to ~/.wine/config. The format is
2767               <literal>[scsi cCtTdD]</literal> where
2768               <literal>"C" = "controller"</literal>,
2769               <literal>"T" = "target"</literal>, <literal>D=LUN</literal>
2770             </para>
2771             <para>
2772               For example, I set mine up as  controller <literal>0</literal>,
2773               Target <literal>6</literal>, LUN <literal>0</literal>.
2774               <programlisting>
2775 [scsi c0t6d0]
2776 "Device" = "/dev/sgi"
2777               </programlisting>
2778               Yours will vary with your particular SCSI setup.
2779             </para>
2780           </listitem>
2781         </orderedlist>
2782       </sect2>
2783
2784       <sect2>
2785         <title>Notes</title>
2786         <para>
2787           The biggest drawback is that it only works under Linux at the moment.
2788           The ASPI code has only been tested with:
2789         </para>
2790         <itemizedlist>
2791           <listitem>
2792             <para>
2793               a Mustek 800SP with a Buslogic controller under Linux [BM]
2794             </para>
2795           </listitem>
2796           <listitem>
2797             <para>
2798               a Siemens Nixdorf 9036 with Adaptec AVA-1505 under Linux
2799               accessed via DOSASPI. Note that I had color problems,
2800               though (barely readable result) [AM]
2801             </para>
2802           </listitem>
2803           <listitem>
2804             <para>
2805               a Fujitsu M2513A MO drive (640MB) using generic SCSI
2806               drivers. Formatting and ejecting worked perfectly.
2807               Thanks to Uwe Bonnes for access to the hardware! [AM]
2808             </para>
2809           </listitem>
2810         </itemizedlist>
2811       </sect2>
2812     </sect1>
2813
2814     <sect1 id="config-odbc">
2815       <title>Using ODBC</title>
2816       <para>
2817         This section describes how ODBC works within Wine and how to configure it.
2818       </para>
2819       <para>
2820         The ODBC system within Wine, as with the printing system, is designed
2821         to hook across to the Unix system at a high level.  Rather than
2822         ensuring that all the windows code works under wine it uses a suitable
2823         Unix ODBC provider, such as UnixODBC.  Thus if you configure Wine to
2824         use the built-in odbc32.dll, that Wine DLL will interface to your
2825         Unix ODBC package and let that do the work, whereas if you configure
2826         Wine to use the native odbc32.dll it will try to use the native
2827         ODBC32 drivers etc.
2828       </para>
2829       <sect2>
2830         <title>Using a Unix ODBC system with Wine</title>
2831         <para>
2832           The first step in using a Unix ODBC system with Wine is, of course,
2833           to get the Unix ODBC system working itself.  This may involve
2834           downloading code or RPMs etc.  There are several Unix ODBC systems
2835           available; the one the author is used to is unixODBC (with the
2836           IBM DB2 driver). Typically such systems will include a tool, such
2837           as <command>isql</command>, which will allow you to access the data from the command
2838           line so that you can check that the system is working.
2839         </para>
2840         <para>
2841           The next step is to hook the Unix ODBC library to the wine built-in
2842           odbc32 DLL.  The built-in odbc32 (currently) looks to the
2843           environment variable <emphasis>LIB_ODBC_DRIVER_MANAGER</emphasis>
2844           for the name of the ODBC library.  For example in the author's
2845           .bashrc file is the line:
2846         </para>
2847         <programlisting>
2848 export LIB_ODBC_DRIVER_MANAGER=/usr/lib/libodbc.so.1.0.0
2849         </programlisting>
2850         <para>
2851           If that environment variable is not set then it looks for a
2852           library called libodbc.so and so you can add a symbolic link to
2853           equate that to your own library.  For example as root you could
2854           run the commands:
2855         </para>
2856         <screen>
2857 <prompt># </prompt><userinput>ln -s libodbc.so.1.0.0 /usr/lib/libodbc.so</userinput>
2858 <prompt># </prompt><userinput>/sbin/ldconfig</userinput>
2859         </screen>
2860         <para>
2861           The last step in configuring this is to ensure that Wine is set up
2862           to run the built-in version of odbc32.dll, by modifying the DLL
2863           configuration.  This built-in DLL merely acts as a stub between the
2864           calling code and the Unix ODBC library.
2865         </para>
2866         <para>
2867           If you have any problems then you can use the debugmsg channel
2868           odbc32 to trace what is happening.  One word of warning.  Some
2869           programs actually cheat a little and bypass the ODBC library.  For
2870           example the Crystal Reports engine goes to the registry to check on
2871           the DSN.  The fix for this is documented at unixODBC's site where
2872           there is a section on using unixODBC with Wine.
2873         </para>
2874       </sect2>
2875       <sect2>
2876         <title>Using Windows ODBC drivers</title>
2877         <para>
2878           Does anyone actually have any experience of this and anything to
2879           add?
2880         </para>
2881       </sect2>
2882     </sect1>
2883
2884   </chapter>
2885
2886 <!-- Keep this comment at the end of the file
2887 Local variables:
2888 mode: sgml
2889 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")
2890 End:
2891 -->