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