Add stub implementation for CreateProxyFromTypeInfo.
[wine/multimedia.git] / documentation / configuring.sgml
blob66137ff30d22a0e828026944acbf385a05abefb1
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 <para>
963 Windows shares can are mapped into the <filename>unc/</filename>
964 directory so anything trying to access
965 <filename>\\machinename\some\dir\and\file</filename> will look in
966 <filename>~/.wine/dosdevices/unc/machinename/some/dir/and/file</filename>.
967 For example, if you used Samba to mount
968 <filename>\\machinename\some</filename> on
969 <filename>/mnt/smb/machinename/some</filename> then you can do
971 <programlisting>
972 ln -s /mnt/smb/machinename/some unc/machinename/some
973 </programlisting>
975 to make it available in wine (don't forget to create the unc
976 directory if it doesn't alrady exist).
977 </para>
978 </sect2>
980 <sect2>
981 <title>File system settings in the [wine] section</title>
982 <para>
983 <programlisting>"Windows" = "c:\\windows"</programlisting>
984 This tells Wine and Windows programs where the
985 <filename>Windows</filename> directory is. It is
986 recommended to have this directory somewhere on your
987 configured <medialabel>C</medialabel> drive, and it's also
988 recommended to just call the directory "windows" (this is
989 the default setup on Windows, and some stupid programs
990 might rely on this). So in case you chose a "Windows"
991 setting of "c:\\windows" and you chose to set up a drive C
992 e.g. at <filename>/usr/local/wine_c</filename>, the
993 corresponding directory would be
994 <filename>/usr/local/wine_c/windows</filename>. Make one
995 if you don't already have one. <emphasis>No trailing slash</emphasis> (<emphasis>not</emphasis>
996 <filename>C:\\windows\</filename>)! Write access strongly
997 recommended, as Windows programs always assume write access
998 to the Windows directory!
999 </para>
1000 <para>
1001 <programlisting>"System" = "c:\\windows\\system"</programlisting>
1002 This sets up where the windows system files are. The Windows
1003 system directory should reside below the directory used for the
1004 <literal>Windows</literal> setting.
1005 Thus when using the example above, the system directory would be
1006 <filename>/usr/local/wine_c/windows/system</filename>.
1007 Again, no trailing slash, and write access!
1008 </para>
1009 <para>
1010 <programlisting>"Temp" = "c:\\temp"</programlisting> This should
1011 be the directory you want your temp files stored in,
1012 /usr/local/wine_c/temp in our example.
1013 Again, no trailing slash, and <emphasis>write
1014 access</emphasis>!!
1015 </para>
1016 <para>
1017 <programlisting>"Path" = "c:\\windows;c:\\windows\\system;c:\\blanco"</programlisting>
1018 Behaves like the <envar>PATH</envar> setting on UNIX
1019 boxes. When wine is run like <userinput>wine
1020 sol.exe</userinput>, if <filename>sol.exe</filename>
1021 resides in a directory specified in the
1022 <literal>Path</literal> setting, wine will run it (Of
1023 course, if <filename>sol.exe</filename> resides in the
1024 current directory, wine will run that one). Make sure it
1025 always has your <filename>windows</filename> directory and
1026 system directory (For this setup, it must have
1027 <filename>"c:\\windows;c:\\windows\\system"</filename>).
1028 </para>
1029 <para id="dirsymlinks">
1030 <programlisting>"ShowDirSymlinks" = "1"</programlisting>
1031 Wine doesn't pass directory symlinks to Windows programs by
1032 default, as doing so may crash some programs that do
1033 recursive lookups of whole subdirectory trees
1034 whenever a directory symlink points back to itself or one of its
1035 parent directories.
1036 That's why we disallowed the use of directory symlinks
1037 and added this setting to reenable ("1") this functionality.
1038 If you <emphasis>really</emphasis> need Wine to take into
1039 account symlinked directories, then reenable it, but
1040 <emphasis>be prepared for crashes</emphasis> in certain
1041 Windows programs when using the above method! (in other words:
1042 enabling it is certainly not recommended)
1043 </para>
1044 </sect2>
1046 <sect2>
1047 <title>More detailed explanation about file system differences</title>
1048 <para>
1049 Windows uses a different (and inferior) way than Unix to describe the
1050 location of files in a computer. Thus Windows programs also expect
1051 to find this different way supported by the system.
1052 Since we intend to run Windows programs on
1053 a Unix system, we're in trouble, as we need to translate
1054 between these different file access techniques.
1055 </para>
1056 <para>
1057 Windows uses drive letters to describe drives or
1058 any other form of storage media and to access files on them.
1059 For example, common drive names are
1060 <filename>C:</filename> for the main Windows system partition
1061 on the first harddisk and <filename>A:</filename> for the
1062 first floppy drive.
1063 Also, Windows uses <filename>\</filename> (backslash) as the
1064 directory separator sign, whereas Unix uses
1065 <filename>/</filename> (slash).
1066 Thus, an example document on the first data partition in
1067 Windows might be accessed by the name of
1068 <filename>D:\mywork\mydocument.txt</filename>.
1069 </para>
1070 <para>
1071 So much for the Windows way of doing things.
1072 </para>
1073 <para>
1074 Well, the problem is, in Unix there is no such thing as
1075 <quote>drive letters</quote>. Instead, Unix chose to go the
1076 much better way of having one single uniform directory tree
1077 (starting with the root directory
1078 <filename>/</filename>), which has various storage devices
1079 such as e.g. harddisk partitions appended at various directory
1080 locations within the tree (an example would be
1081 <filename>/data1/mywork</filename>, which is the first data
1082 partition mounted/attached to a directory called data1 in the
1083 root directory <filename>/</filename>; mywork is a sub
1084 directory of the data partition file system that's mounted
1085 under <filename>/data1</filename>).
1086 In Unix, the Windows example document mentioned above could e.g.
1087 be accessed by the name of
1088 <filename>/data1/mywork/mydocument.txt</filename>,
1089 provided that the administrator decided to mount (attach) the first
1090 data partition at the directory /data1 inside the Unix
1091 directory tree. Note that in Unix, the administrator can
1092 <emphasis>choose</emphasis> any custom partition location he
1093 wants (here, <filename>/data1</filename>), whereas in Windows the system
1094 <emphasis>selects</emphasis> any drive letter it deems
1095 suitable for the first data partition (here,
1096 <filename>D:</filename>), and, even worse, if there is some
1097 change in partition order, Windows automatically
1098 <emphasis>changes</emphasis> the drive letter, and you might
1099 suddenly find yourself with a first data partition at drive
1100 letter <filename>E:</filename>, with all the file naming and
1101 referencing confusion that entails. Thus, the Windows way of
1102 using ever-changing drive letters is <emphasis>clearly
1103 inferior</emphasis> to the Unix way of assigning
1104 <emphasis>fixed</emphasis> directory tree locations for every
1105 data storage medium.
1106 As we'll see soon, fortunately this Windows limitation of
1107 changing drive letters doesn't affect us in Wine at all, since
1108 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).
1109 </para>
1110 <para>
1111 OK, now that we know some theory about Windows and Unix drive
1112 and filename mapping, it's probably time to ask how Wine
1113 achieves the magic of mapping a Unix directory location to a
1114 Windows drive...
1115 </para>
1116 <para>
1117 Wine chose to do the following:
1118 In Wine, you don't assign some real physical storage medium
1119 (such as a harddisk partition or similar) to each drive letter
1120 mapping entry.
1121 Instead, you choose certain sub directory trees inside the Unix
1122 directory tree (that starts with <filename>/</filename>) that
1123 you would like to assign a drive letter to.
1124 </para>
1125 <para>
1126 Note that for every Unix sub directory tree that you intend to
1127 start Windows programs in, it is <emphasis>absolutely
1128 required</emphasis> to have a Wine drive mapping entry:
1129 </para>
1130 <para>
1131 For example, if you had a publicly writable <quote>Windows
1132 directory space</quote> under <filename>/usr/mywine</filename>, then in order to be
1133 able to access this sub directory tree from Wine, you should
1134 have a drive mapping entry that maps a certain drive letter
1135 (for example, let's take drive letter <filename>P:</filename>)
1136 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.
1137 </para>
1138 </sect2>
1140 <sect2 id="config-no-windows">
1141 <title>Installing Wine Without Windows</title>
1143 <para>
1144 A major goal of Wine is to allow users to run Windows programs
1145 without having to install Windows on their machine. Wine
1146 implements the functionality of the main DLLs usually
1147 provided with Windows. Therefore, once Wine is finished, you
1148 will not need to have Windows installed to use Wine.
1149 </para>
1150 <para>
1151 Wine has already made enough progress that it may be possible
1152 to run your target programs without Windows installed. If
1153 you want to try it, follow these steps:
1154 </para>
1156 <orderedlist>
1157 <listitem>
1158 <para>
1159 Make a symbolic link in <filename>~/.wine/dosdevices</filename>
1160 to the directory where you want
1161 <filename>C:</filename> to be. Refer to the wine man page
1162 for more information. The directory to be used for emulating
1163 a <filename>C:</filename> drive will be
1164 the base directory for some Windows specific directories
1165 created below.
1166 </para>
1167 </listitem>
1168 <listitem>
1169 <para>
1170 Within the directory to be used for C:, create empty
1171 <filename>windows</filename>,
1172 <filename>windows/system</filename>,
1173 <filename>windows/Start Menu</filename>, and
1174 <filename>windows/Start Menu/Programs</filename>
1175 directories. Do not point Wine to a
1176 <filename>Windows</filename> directory full of old
1177 installations and a messy registry. (Wine creates a
1178 special registry in your <filename >home</filename>
1179 directory, in <filename>$HOME/.wine/*.reg</filename>.
1180 Perhaps you have to remove these files).
1181 In one line:
1182 mkdir -p windows windows/system windows/Start\ Menu windows/Start\ Menu/Programs
1183 </para>
1184 </listitem>
1185 <listitem>
1186 <para>
1187 Run and/or install your programs.
1188 </para>
1189 </listitem>
1190 </orderedlist>
1192 <para>
1193 Because Wine is not yet complete, some programs will work
1194 better with native Windows DLLs than with Wine's
1195 replacements. Wine has been designed to make this possible.
1196 Here are some tips by Juergen Schmied (and others) on how to
1197 proceed. This assumes that your
1198 <filename>C:\windows</filename> directory in the configuration
1199 file does not point to a native Windows installation but is in
1200 a separate Unix file system. (For instance, <quote>C:\windows</quote> is
1201 really subdirectory <quote>windows</quote> located in
1202 <quote>/home/ego/wine/drives/c</quote>).
1203 </para>
1205 <itemizedlist>
1206 <listitem>
1207 <para>
1208 Run the program with <parameter>WINEDEBUG=+loaddll</parameter>
1209 to find out which files are
1210 needed. Copy the required DLLs one by one to the
1211 <filename>C:\windows\system</filename> directory. Do not
1212 copy KERNEL/KERNEL32, GDI/GDI32, USER/USER32 or NTDLL. These
1213 implement the core functionality of the Windows API, and
1214 the Wine internal versions must be used.
1215 </para>
1216 </listitem>
1217 <listitem>
1218 <para>
1219 Edit the <quote>[DllOverrides]</quote> section of
1220 <filename>~/.wine/config</filename> to specify
1221 <quote>native</quote> before <quote>builtin</quote> for
1222 the Windows DLLs you want to use. For more information
1223 about this, see the Wine manpage.
1224 </para>
1225 </listitem>
1226 <listitem>
1227 <para>
1228 Note that some network DLLs are not needed even though
1229 Wine is looking for them. The Windows
1230 <filename>MPR.DLL</filename> currently does not work; you
1231 must use the internal implementation.
1232 </para>
1233 </listitem>
1234 <listitem>
1235 <para>
1236 Copy SHELL.DLL/SHELL32.DLL, COMMDLG.DLL/COMDLG32.DLL
1237 and COMMCTRL.DLL/COMCTL32.DLL
1238 only as pairs to your Wine directory (these DLLs are
1239 <quote>clean</quote> to use). Make sure you have these
1240 specified in the <quote>[DllPairs]</quote> section of
1241 <filename>~/.wine/config</filename>.
1242 </para>
1243 </listitem>
1244 <listitem>
1245 <para>
1246 Be consistent: Use only DLLs from the same Windows version
1247 together.
1248 </para>
1249 </listitem>
1250 <listitem>
1251 <para>
1252 Put <filename>regedit.exe</filename> in the
1253 <filename>C:\windows</filename> directory.
1254 (<application>Office 95</application> imports a
1255 <filename>*.reg</filename> file when it runs with an empty
1256 registry, don't know about
1257 <application>Office 97</application>).
1258 As of now, it might not be necessary any more to use
1259 regedit.exe, since Wine has its own regedit Winelib
1260 application now.
1261 </para>
1262 </listitem>
1263 <listitem>
1264 <para>
1265 Also add <filename>winhelp.exe</filename> and
1266 <filename>winhlp32.exe</filename> if you want to be able
1267 to browse through your programs' help function
1268 (or in case Wine's winhelp implementation in programs/winhelp/
1269 is not good enough, for example).
1270 </para>
1271 </listitem>
1272 </itemizedlist>
1273 </sect2>
1275 <sect2 id="config-with-windows">
1276 <title>Installing Wine Using An Existing Windows Partition As Base</title>
1277 <para>
1278 Some people intend to use the data of an existing Windows partition
1279 with Wine in order to gain some better compatibility or to run already
1280 installed programs in a setup as original as possible.
1281 Note that many Windows programs assume that they have full write
1282 access to all windows directories.
1284 This means that you either have to configure the Windows
1285 partition mount point for write permission by your Wine user
1286 (see <link linkend="config-drive-vfat">Dealing with FAT/VFAT partitions</link>
1287 on how to do that), or you'll have to copy over (some parts of) the Windows
1288 partition content to a directory of a Unix partition and make
1289 sure this directory structure is writable by your user.
1290 We <emphasis>HIGHLY DISCOURAGE</emphasis> people from directly using a Windows partition with
1291 write access as a base for Wine!! (some programs, notably
1292 Explorer, corrupt large parts of the Windows partition in case
1293 of an incorrect setup; you've been warned).
1294 Not to mention that NTFS write support in Linux is still very
1295 experimental and <emphasis>dangerous</emphasis> (in case you're using an NT-based
1296 Windows version using the NTFS file system).
1297 Thus we advise you to go the Unix directory way.
1298 </para>
1299 </sect2>
1301 <sect2 id="config-drive-vfat">
1302 <title>Dealing With FAT/VFAT Partitions</title>
1303 <para>
1304 This document describes how FAT and
1305 VFAT file system permissions work in Linux
1306 with a focus on configuring them for Wine.
1307 </para>
1309 <sect3>
1310 <title>Introduction</title>
1311 <para>
1312 Linux is able to access DOS and Windows file systems using
1313 either the FAT (older 8.3 DOS filesystems) or VFAT (newer
1314 Windows 95 or later long filename filesystems) modules.
1315 Mounted FAT or VFAT filesystems provide the primary means
1316 for which existing programs and their data are accessed
1317 through Wine for dual boot (Linux + Windows) systems.
1318 </para>
1319 <para>
1320 Wine maps mounted FAT file systems, such as
1321 <filename>/c</filename>, to drive letters, such as
1322 <quote>c:</quote>, by means of symbolic links in the
1323 <link linkend="config-drive-sections"><filename>dosdevices</filename></link>
1324 directory. Thus, in your dosdevices directory, you could type
1325 the command:
1326 <programlisting>
1327 ln -s /c c:
1328 </programlisting>
1329 </para>
1330 <para>
1331 Although VFAT filesystems are preferable to FAT filesystems
1332 for their long filename support, the term <quote>FAT</quote>
1333 will be used throughout the remainder of this document to
1334 refer to FAT filesystems and their derivatives. Also,
1335 <quote>/c</quote> will be used as the FAT mount point in
1336 examples throughout this document.
1337 </para>
1338 <para>
1339 Most modern Linux distributions either detect or allow
1340 existing FAT file systems to be configured so that they can be
1341 mounted, in a location such as <filename>/c</filename>,
1342 either persistently (on bootup) or on an as needed basis. In
1343 either case, by default, the permissions will probably be
1344 configured so that they look like:
1345 </para>
1346 <screen>
1347 <prompt>~></prompt><userinput>cd /c</userinput>
1348 <prompt>/c></prompt><userinput>ls -l</userinput>
1349 <computeroutput>-rwxr-xr-x 1 root root 91 Oct 10 17:58 autoexec.bat
1350 -rwxr-xr-x 1 root root 245 Oct 10 17:58 config.sys
1351 drwxr-xr-x 41 root root 16384 Dec 30 1998 windows</computeroutput>
1352 </screen>
1353 <para>
1354 where all the files are owned by "root", are in the "root"
1355 group and are only writable by "root"
1356 (<literal>755</literal> permissions). This is restrictive in
1357 that it requires that Wine be run as root in order for
1358 programs to be able to write to any part of the
1359 filesystem.
1360 </para>
1361 <para>
1362 There are three major approaches to overcoming the restrictive
1363 permissions mentioned in the previous paragraph:
1364 </para>
1365 <orderedlist>
1366 <listitem>
1367 <para>
1368 Run <application>Wine</application> as root
1369 </para>
1370 </listitem>
1371 <listitem>
1372 <para>
1373 Mount the FAT filesystem with less restrictive
1374 permissions
1375 </para>
1376 </listitem>
1377 <listitem>
1378 <para>
1379 Shadow the FAT filesystem by completely or partially
1380 copying it
1381 </para>
1382 </listitem>
1383 </orderedlist>
1384 <para>
1385 Each approach will be discussed in the following sections.
1386 </para>
1387 </sect3>
1389 <sect3>
1390 <title>Running Wine as root</title>
1391 <para>
1392 Running Wine as root is the easiest and most thorough way of giving
1393 programs that Wine runs unrestricted access to FAT files systems.
1394 Running wine as root also allows programs to do things unrelated
1395 to FAT filesystems, such as listening to ports that are less than
1396 1024. Running Wine as root is dangerous since there is no limit to
1397 what the program can do to the system, so it's <emphasis>HIGHLY DISCOURAGED</emphasis>.
1398 </para>
1399 </sect3>
1401 <sect3>
1402 <title>Mounting FAT filesystems</title>
1403 <para>
1404 The FAT filesystem can be mounted with permissions less restrictive
1405 than the default. This can be done by either changing the user that
1406 mounts the FAT filesystem or by explicitly changing the permissions
1407 that the FAT filesystem is mounted with. The permissions are
1408 inherited from the process that mounts the FAT filesystem. Since the
1409 process that mounts the FAT filesystem is usually a startup script
1410 running as root the FAT filesystem inherits root's permissions. This
1411 results in the files on the FAT filesystem having permissions similar
1412 to files created by root. For example:
1413 </para>
1414 <screen>
1415 <prompt>~></prompt><userinput>whoami</userinput>
1416 <computeroutput>root</computeroutput>
1417 <prompt>~></prompt><userinput>touch root_file</userinput>
1418 <prompt>~></prompt><userinput>ls -l root_file</userinput>
1419 <computeroutput></computeroutput>-rw-r--r-- 1 root root 0 Dec 10 00:20 root_file
1420 </screen>
1421 <para>
1422 which matches the owner, group and permissions of files seen
1423 on the FAT filesystem except for the missing 'x's. The
1424 permissions on the FAT filesystem can be changed by changing
1425 root's umask (unset permissions bits). For example:
1426 </para>
1427 <screen>
1428 <prompt>~></prompt><userinput>umount /c</userinput>
1429 <prompt>~></prompt><userinput>umask</userinput>
1430 <computeroutput>022</computeroutput>
1431 <prompt>~></prompt><userinput>umask 073</userinput>
1432 <prompt>~></prompt><userinput>mount /c</userinput>
1433 <prompt>~></prompt><userinput>cd /c</userinput>
1434 <prompt>/c></prompt><userinput>ls -l</userinput>
1435 <computeroutput>-rwx---r-- 1 root root 91 Oct 10 17:58 autoexec.bat
1436 -rwx---r-- 1 root root 245 Oct 10 17:58 config.sys
1437 drwx---r-- 41 root root 16384 Dec 30 1998 windows</computeroutput>
1438 </screen>
1439 <para>
1440 Mounting the FAT filesystem with a umask of
1441 <literal>000</literal> gives all users complete control over
1442 it. Explicitly specifying the permissions of the FAT
1443 filesystem when it is mounted provides additional control.
1444 There are three mount options that are relevant to FAT
1445 permissions: <literal>uid</literal>, <literal>gid</literal>
1446 and <literal>umask</literal>. They can each be specified
1447 when the filesystem is manually mounted. For example:
1448 </para>
1449 <screen>
1450 <prompt>~></prompt><userinput>umount /c</userinput>
1451 <prompt>~></prompt><userinput>mount -o uid=500 -o gid=500 -o umask=002 /c</userinput>
1452 <prompt>~></prompt><userinput>cd /c</userinput>
1453 <prompt>/c></prompt><userinput>ls -l</userinput>
1454 <computeroutput>-rwxrwxr-x 1 sle sle 91 Oct 10 17:58 autoexec.bat
1455 -rwxrwxr-x 1 sle sle 245 Oct 10 17:58 config.sys
1456 drwxrwxr-x 41 sle sle 16384 Dec 30 1998 windows</computeroutput>
1457 </screen>
1458 <para>
1459 which gives "sle" complete control over
1460 <filename>/c</filename>. The options listed above can be
1461 made permanent by adding them to the
1462 <filename>/etc/fstab</filename> file:
1463 </para>
1464 <screen>
1465 <prompt>~></prompt><userinput>grep /c /etc/fstab</userinput>
1466 <computeroutput>/dev/hda1 /c vfat uid=500,gid=500,umask=002,exec,dev,suid,rw 1 1</computeroutput>
1467 </screen>
1468 <para>
1469 Note that the umask of <literal>002</literal> is common in
1470 the user private group file permission scheme. On FAT file
1471 systems this umask assures that all files are fully
1472 accessible by all users in the specified user group
1473 (<literal>gid</literal>).
1474 </para>
1475 </sect3>
1477 <sect3>
1478 <title>Shadowing FAT filesystems</title>
1479 <para>
1480 Shadowing provides a finer granularity of control. Parts of
1481 the original FAT filesystem can be copied so that the
1482 program can safely work with those copied parts while
1483 the program continues to directly read the remaining
1484 parts. This is done with symbolic links. For example,
1485 consider a system where a program named
1486 <application>AnApp</application> must be able to read and
1487 write to the <filename>c:\windows</filename> and
1488 <filename>c:\AnApp</filename> directories as well as have
1489 read access to the entire FAT filesystem. On this system
1490 the FAT filesystem has default permissions which should not
1491 be changed for security reasons or can not be changed due to
1492 lack of root access. On this system a shadow directory
1493 might be set up in the following manner:
1494 </para>
1495 <screen>
1496 <prompt>~></prompt><userinput>cd /</userinput>
1497 <prompt>/></prompt><userinput>mkdir c_shadow</userinput>
1498 <prompt>/></prompt><userinput>cd c_shadow</userinput>
1499 <prompt>/c_shadow></prompt><userinput>ln -s /c_/* .</userinput>
1500 <prompt>/c_shadow></prompt><userinput>rm windows AnApp</userinput>
1501 <prompt>/c_shadow></prompt><userinput>cp -R /c_/{windows,AnApp} .</userinput>
1502 <prompt>/c_shadow></prompt><userinput>chmod -R 777 windows AnApp</userinput>
1503 <prompt>/c_shadow></prompt><userinput>perl -p -i -e 's|/c$|/c_shadow|g' ~/.wine/config</userinput>
1504 </screen>
1505 <para>
1506 The above gives everyone complete read and write access to
1507 the <filename>windows</filename> and
1508 <filename>AnApp</filename> directories while only root has
1509 write access to all other directories.
1510 </para>
1511 </sect3>
1512 </sect2>
1514 <sect2 id="config-drive-cdrom-labels">
1516 <title>Drive labels and serial numbers</title>
1517 <para>
1518 Wine can read drive volume labels and serial numbers directly
1519 from the device. This may be useful for many Win 9x games or
1520 for setup programs distributed on CD-ROMs that check for
1521 volume label.
1522 </para>
1524 <sect3>
1525 <title>What's Supported?</title>
1527 <informaltable frame="all">
1528 <tgroup cols="3">
1529 <thead>
1530 <row>
1531 <entry>File System</entry>
1532 <entry>Types</entry>
1533 <entry>Comment</entry>
1534 </row>
1535 </thead>
1536 <tbody>
1537 <row>
1538 <entry>FAT systems</entry>
1539 <entry>hd, floppy</entry>
1540 <entry>reads labels and serial numbers</entry>
1541 </row>
1542 <row>
1543 <entry>ISO9660</entry>
1544 <entry>cdrom</entry>
1545 <entry>reads labels and serial numbers (not mixed-mode CDs yet!)</entry>
1546 </row>
1547 </tbody>
1548 </tgroup>
1549 </informaltable>
1551 </sect3>
1553 <sect3>
1554 <title>How To Set Up?</title>
1555 <para>
1556 Reading labels and serial numbers just works automatically
1557 if you specify the correct symbolic links for the devices
1558 (with double colons after the drive letters) in your
1559 <link linkend="config-drive-sections"><filename>dosdevices</filename></link>
1560 directory.
1561 Note that the device has to exist and must be accessible by the user
1562 running Wine if you do this, though.
1563 </para>
1564 <para>
1565 If you don't want to read labels and serial numbers directly from
1566 the device, you can create files at the root of the drive
1567 named <filename>.windows-label</filename> and
1568 <filename>.windows-serial</filename> respectively. These are
1569 simple ASCII files that you can create with any text editor;
1570 the label can be set to any string you like, the serial
1571 number should be expressed as an hexadecimal number.
1572 </para>
1573 </sect3>
1575 <sect3>
1576 <title>Examples</title>
1577 <para>
1578 Here's a simple example of CD-ROM and floppy:
1579 </para>
1580 <programlisting>
1581 cd ~/.wine/dosdevices
1583 ln -s /mnt/floppy a:
1584 ln -s /dev/fd0 a::
1586 ln -s /mnt/cdrom r:
1587 ln -s /dev/hda1 r::
1588 </programlisting>
1589 </sect3>
1591 <sect3>
1592 <title>Todo / Open Issues</title>
1593 <itemizedlist>
1594 <listitem> <para>
1595 The CD-ROM label can be read only if the data track of
1596 the disk resides in the first track and the cdrom is
1597 iso9660.
1598 </para> </listitem>
1599 <listitem> <para>
1600 Support for labels/serial nums WRITING.
1601 </para> </listitem>
1602 <listitem> <para>
1603 What about reading ext2 volume label? ....
1604 </para> </listitem>
1605 </itemizedlist>
1606 </sect3>
1607 </sect2>
1608 </sect1>
1610 &registry;
1612 <sect1 id="config-dll">
1613 <title>DLL configuration</title>
1615 <sect2>
1616 <title>Introduction</title>
1617 <para>
1618 If your programs don't work as expected, then it's often because one
1619 DLL or another is failing. This can often be resolved by changing
1620 certain DLLs from Wine built-in to native Windows DLL file and vice
1621 versa.
1622 </para>
1623 <para>
1624 A very useful help to find out which DLLs are loaded as built-in and
1625 which are loaded as native Windows file can be the debug channel
1626 loaddll, activated via the environment variable
1627 <command>WINEDEBUG=+loaddll</command>.
1628 </para>
1629 </sect2>
1631 <sect2>
1632 <!-- FIXME intro!!! -->
1633 <title>Introduction To DLL Sections</title>
1634 <para>
1635 There are a few things you will need to know before
1636 configuring the DLL sections in your wine configuration
1637 file.
1638 </para>
1639 <sect3>
1640 <title>Windows DLL Pairs</title>
1641 <para>
1642 Most windows DLL's have a win16 (Windows 3.x) and win32
1643 (Windows 9x/NT) form. The combination of the win16 and
1644 win32 DLL versions are called the "DLL pair". This is a
1645 list of the most common pairs:
1646 </para>
1648 <informaltable>
1649 <tgroup cols="3">
1650 <thead>
1651 <row>
1652 <entry>Win16</entry>
1653 <entry>Win32</entry>
1654 <entry>
1655 Native
1656 <footnote>
1657 <para>
1658 Is it possible to use native DLL with wine?
1659 (See next section)
1660 </para>
1661 </footnote>
1662 </entry>
1663 </row>
1664 </thead>
1665 <tbody>
1666 <row>
1667 <entry>KERNEL</entry>
1668 <entry>KERNEL32</entry>
1669 <entry>No!</entry>
1670 </row>
1671 <row>
1672 <entry>USER</entry>
1673 <entry>USER32</entry>
1674 <entry>No!</entry>
1675 </row>
1676 <row>
1677 <entry>SHELL</entry>
1678 <entry>SHELL32</entry>
1679 <entry>Yes</entry>
1680 </row>
1681 <row>
1682 <entry>GDI</entry>
1683 <entry>GDI32</entry>
1684 <entry>No!</entry>
1685 </row>
1686 <row>
1687 <entry>COMMDLG</entry>
1688 <entry>COMDLG32</entry>
1689 <entry>Yes</entry>
1690 </row>
1691 <row>
1692 <entry>VER</entry>
1693 <entry>VERSION</entry>
1694 <entry>Yes</entry>
1695 </row>
1696 </tbody>
1697 </tgroup>
1698 </informaltable>
1699 </sect3>
1701 <sect3>
1702 <title>Different Forms Of DLL's</title>
1703 <para>
1704 There are a few different forms of DLL's wine can load:
1705 <variablelist>
1706 <varlistentry>
1707 <term>native</term>
1708 <listitem><para>
1709 The DLL's that are included with windows. Many
1710 windows DLL's can be loaded in their native
1711 form. Many times these native versions work
1712 better than their non-Microsoft equivalent --
1713 other times they don't.
1714 </para></listitem>
1715 </varlistentry>
1716 <varlistentry>
1717 <term>builtin</term>
1718 <listitem><para>
1719 The most common form of DLL loading. This is
1720 what you will use if the DLL is too system-specific
1721 or error-prone in native form (KERNEL for example),
1722 you don't have the native DLL, or you just want to be
1723 Microsoft-free.
1724 </para></listitem>
1725 </varlistentry>
1726 <varlistentry>
1727 <term>so</term>
1728 <listitem><para>
1729 Native ELF libraries. Has became obsolete, ignored.
1730 </para></listitem>
1731 </varlistentry>
1732 <varlistentry>
1733 <term>elfdll</term>
1734 <listitem><para>
1735 ELF encapsulated windows DLL's.
1736 No longer used, ignored.
1737 </para></listitem>
1738 </varlistentry>
1739 </variablelist>
1740 </para>
1741 </sect3>
1742 </sect2>
1744 <sect2 id="config-dll-overrides">
1745 <title>DLL Overrides</title>
1747 <para>
1748 The wine configuration file directives [DllDefaults]
1749 and [DllOverrides] are the subject of some confusion. The
1750 overall purpose of most of these directives are clear enough,
1751 though - given a choice, should Wine use its own built-in
1752 DLLs, or should it use <filename>.DLL</filename> files found
1753 in an existing Windows installation? This document explains
1754 how this feature works.
1755 </para>
1757 <sect3>
1758 <title>DLL types</title>
1759 <variablelist>
1760 <varlistentry>
1761 <term>native</term>
1762 <listitem> <para>
1763 A "native" DLL is a <filename>.DLL</filename> file
1764 written for the real Microsoft Windows.
1765 </para> </listitem>
1766 </varlistentry>
1767 <varlistentry>
1768 <term>builtin</term>
1769 <listitem> <para>
1770 A "built-in" DLL is a Wine DLL. These can either be a
1771 part of <filename>libwine.so</filename>, or more
1772 recently, in a special <filename>.so</filename> file
1773 that Wine is able to load on demand.
1774 </para> </listitem>
1775 </varlistentry>
1776 </variablelist>
1777 </sect3>
1779 <sect3>
1780 <title>The [DllDefaults] section</title>
1781 <variablelist>
1782 <varlistentry>
1783 <term>DefaultLoadOrder</term>
1784 <listitem> <para>
1785 This specifies in what order Wine should search for
1786 available DLL types, if the DLL in question was not
1787 found in the [DllOverrides] section.
1788 </para> </listitem>
1789 </varlistentry>
1790 </variablelist>
1791 </sect3>
1793 <sect3>
1794 <title>The [DllPairs] section</title>
1795 <para>
1796 At one time, there was a section called [DllPairs] in the
1797 default configuration file, but this has been obsoleted
1798 because the pairing information has now been embedded into
1799 Wine itself. (The purpose of this section was merely to be
1800 able to issue warnings if the user attempted to pair
1801 codependent 16-bit/32-bit DLLs of different types.) If you
1802 still have this in your <filename>~/.wine/config</filename> or
1803 <filename>wine.conf</filename>, you may safely delete it.
1804 </para>
1805 </sect3>
1807 <sect3>
1808 <title>The [DllOverrides] section</title>
1809 <para>
1810 This section specifies how you want specific DLLs to be
1811 handled, in particular whether you want to use "native" DLLs
1812 or not, if you have some from a real Windows configuration.
1813 Because built-ins do not mix seamlessly with native DLLs yet,
1814 certain DLL dependencies may be problematic, but workarounds
1815 exist in Wine for many popular DLL configurations. Also see
1816 WWN's [16]Status Page to figure out how well your favorite
1817 DLL is implemented in Wine.
1818 </para>
1819 <para>
1820 It is of course also possible to override these settings by
1821 explicitly using Wine's <parameter>--dll</parameter>
1822 command-line option (see the man page for details). Some
1823 hints for choosing your optimal configuration (listed by
1824 16/32-bit DLL pair):
1825 </para>
1826 <variablelist>
1827 <varlistentry>
1828 <term>krnl386, kernel32</term>
1829 <listitem> <para>
1830 Native versions of these will never work, so don't try. Leave
1831 at <literal>builtin</literal>.
1832 </para> </listitem>
1833 </varlistentry>
1834 <varlistentry>
1835 <term>gdi, gdi32</term>
1836 <listitem> <para>
1837 Graphics Device Interface. No effort has been made at trying to
1838 run native GDI. Leave at <literal>builtin</literal>.
1839 </para> </listitem>
1840 </varlistentry>
1841 <varlistentry>
1842 <term>user, user32</term>
1843 <listitem> <para>
1844 Window management and standard controls. It was
1845 possible to use Win95's <literal>native</literal>
1846 versions at some point (if all other DLLs that depend
1847 on it, such as comctl32 and comdlg32, were also run
1848 <literal>native</literal>). However, this is no longer
1849 possible after the Address Space Separation, so leave
1850 at <literal>builtin</literal>.
1851 </para> </listitem>
1852 </varlistentry>
1853 <varlistentry>
1854 <term>ntdll</term>
1855 <listitem> <para>
1856 NT kernel API. Although badly documented, the
1857 <literal>native</literal> version of this will never
1858 work. Leave at <literal>builtin</literal>.
1859 </para> </listitem>
1860 </varlistentry>
1861 <varlistentry>
1862 <term>w32skrnl</term>
1863 <listitem> <para>
1864 Win32s (for Win3.x). The <literal>native</literal>
1865 version will probably never work. Leave at
1866 <literal>builtin</literal>.
1867 </para> </listitem>
1868 </varlistentry>
1869 <varlistentry>
1870 <term>wow32</term>
1871 <listitem> <para>
1872 Win16 support library for NT. The
1873 <literal>native</literal> version will probably never
1874 work. Leave at <literal>builtin</literal>.
1875 </para> </listitem>
1876 </varlistentry>
1877 <varlistentry>
1878 <term>system</term>
1879 <listitem> <para>
1880 Win16 kernel stuff. Will never work
1881 <literal>native</literal>. Leave at
1882 <literal>builtin</literal>.
1883 </para> </listitem>
1884 </varlistentry>
1885 <varlistentry>
1886 <term>display</term>
1887 <listitem> <para>
1888 Display driver. Definitely leave at <literal>builtin</literal>.
1889 </para> </listitem>
1890 </varlistentry>
1891 <varlistentry>
1892 <term>toolhelp</term>
1893 <listitem> <para>
1894 Tool helper routines. This is rarely a source of problems.
1895 Leave at <literal>builtin</literal>.
1896 </para> </listitem>
1897 </varlistentry>
1898 <varlistentry>
1899 <term>ver, version</term>
1900 <listitem> <para>
1901 Versioning. Seldom useful to mess with.
1902 </para> </listitem>
1903 </varlistentry>
1904 <varlistentry>
1905 <term>advapi32</term>
1906 <listitem> <para>
1907 Registry and security features. Trying the
1908 <literal>native</literal> version of this may or may
1909 not work.
1910 </para> </listitem>
1911 </varlistentry>
1912 <varlistentry>
1913 <term>commdlg, comdlg32</term>
1914 <listitem> <para>
1915 Common Dialogs, such as color picker, font dialog,
1916 print dialog, open/save dialog, etc. It is safe to try
1917 <literal>native</literal>.
1918 </para> </listitem>
1919 </varlistentry>
1920 <varlistentry>
1921 <term>commctrl, comctl32</term>
1922 <listitem> <para>
1923 Common Controls. This is toolbars, status bars, list controls,
1924 the works. It is safe to try <literal>native</literal>.
1925 </para> </listitem>
1926 </varlistentry>
1927 <varlistentry>
1928 <term>shell, shell32</term>
1929 <listitem> <para>
1930 Shell interface (desktop, filesystem, etc). Being one of the
1931 most undocumented pieces of Windows, you may have luck with the
1932 <literal>native</literal> version, should you need it.
1933 </para> </listitem>
1934 </varlistentry>
1935 <varlistentry>
1936 <term>winsock, wsock32</term>
1937 <listitem> <para>
1938 Windows Sockets. The <literal>native</literal> version
1939 will not work under Wine, so leave at
1940 <literal>builtin</literal>.
1941 </para> </listitem>
1942 </varlistentry>
1943 <varlistentry>
1944 <term>icmp</term>
1945 <listitem> <para>
1946 ICMP routines for wsock32. As with wsock32, leave at
1947 <literal>builtin</literal>.
1948 </para> </listitem>
1949 </varlistentry>
1950 <varlistentry>
1951 <term>mpr</term>
1952 <listitem> <para>
1953 The <literal>native</literal> version may not work due
1954 to thunking issues. Leave at
1955 <literal>builtin</literal>.
1956 </para> </listitem>
1957 </varlistentry>
1958 <varlistentry>
1959 <term>lzexpand, lz32</term>
1960 <listitem> <para>
1961 Lempel-Ziv decompression. Wine's
1962 <literal>builtin</literal> version ought to work fine.
1963 </para> </listitem>
1964 </varlistentry>
1965 <varlistentry>
1966 <term>winaspi, wnaspi32</term>
1967 <listitem> <para>
1968 Advanced SCSI Peripheral Interface. The
1969 <literal>native</literal> version will probably never
1970 work. Leave at <literal>builtin</literal>.
1971 </para> </listitem>
1972 </varlistentry>
1973 <varlistentry>
1974 <term>crtdll</term>
1975 <listitem> <para>
1976 C Runtime library. The <literal>native</literal>
1977 version will easily work better than Wine's on this
1978 one.
1979 </para> </listitem>
1980 </varlistentry>
1981 <varlistentry>
1982 <term>winspool.drv</term>
1983 <listitem> <para>
1984 Printer spooler. You are not likely to have more luck
1985 with the <literal>native</literal> version.
1986 </para> </listitem>
1987 </varlistentry>
1988 <varlistentry>
1989 <term>ddraw</term>
1990 <listitem> <para>
1991 DirectDraw/Direct3D. Since Wine does not implement the
1992 DirectX HAL, the <literal>native</literal> version
1993 will not work at this time.
1994 </para> </listitem>
1995 </varlistentry>
1996 <varlistentry>
1997 <term>dinput</term>
1998 <listitem> <para>
1999 DirectInput. Running this <literal>native</literal>
2000 may or may not work.
2001 </para> </listitem>
2002 </varlistentry>
2003 <varlistentry>
2004 <term>dsound</term>
2005 <listitem> <para>
2006 DirectSound. It may be possible to run this
2007 <literal>native</literal>, but don't count on it.
2008 </para> </listitem>
2009 </varlistentry>
2010 <varlistentry>
2011 <term>dplay/dplayx</term>
2012 <listitem> <para>
2013 DirectPlay. The <literal>native</literal> version
2014 ought to work best on this, if at all.
2015 </para> </listitem>
2016 </varlistentry>
2017 <varlistentry>
2018 <term>mmsystem, winmm</term>
2019 <listitem> <para>
2020 Multimedia system. The <literal>native</literal>
2021 version is not likely to work. Leave at
2022 <literal>builtin</literal>.
2023 </para> </listitem>
2024 </varlistentry>
2025 <varlistentry>
2026 <term>msacm, msacm32</term>
2027 <listitem> <para>
2028 Audio Compression Manager. The
2029 <literal>builtin</literal> version works best, if you
2030 set msacm.drv to the same.
2031 </para> </listitem>
2032 </varlistentry>
2033 <varlistentry>
2034 <term>msvideo, msvfw32</term>
2035 <listitem> <para>
2036 Video for Windows. It is safe (and recommended) to try
2037 <literal>native</literal>.
2038 </para> </listitem>
2039 </varlistentry>
2040 <varlistentry>
2041 <term>mcicda.drv</term>
2042 <listitem> <para>
2043 CD Audio MCI driver.
2044 </para> </listitem>
2045 </varlistentry>
2046 <varlistentry>
2047 <term>mciseq.drv</term>
2048 <listitem> <para>
2049 MIDI Sequencer MCI driver (<filename>.MID</filename>
2050 playback).
2051 </para> </listitem>
2052 </varlistentry>
2053 <varlistentry>
2054 <term>mciwave.drv</term>
2055 <listitem> <para>
2056 Wave audio MCI driver (<filename>.WAV</filename> playback).
2057 </para> </listitem>
2058 </varlistentry>
2059 <varlistentry>
2060 <term>mciavi.drv</term>
2061 <listitem> <para>
2062 AVI MCI driver (<filename>.AVI</filename> video
2063 playback). Best to use <literal>native</literal>.
2064 </para> </listitem>
2065 </varlistentry>
2066 <varlistentry>
2067 <term>mcianim.drv</term>
2068 <listitem> <para>
2069 Animation MCI driver.
2070 </para> </listitem>
2071 </varlistentry>
2072 <varlistentry>
2073 <term>msacm.drv</term>
2074 <listitem> <para>
2075 Audio Compression Manager. Set to same as msacm32.
2076 </para> </listitem>
2077 </varlistentry>
2078 <varlistentry>
2079 <term>midimap.drv</term>
2080 <listitem> <para>
2081 MIDI Mapper.
2082 </para> </listitem>
2083 </varlistentry>
2084 <varlistentry>
2085 <term>wprocs</term>
2086 <listitem> <para>
2087 This is a pseudo-DLL used by Wine for thunking
2088 purposes. A <literal>native</literal> version of this
2089 doesn't exist.
2090 </para> </listitem>
2091 </varlistentry>
2092 </variablelist>
2093 </sect3>
2094 </sect2>
2096 <sect2 id="config-system-dlls">
2097 <title>System DLLs</title>
2098 <para>
2099 The Wine team has determined that it is necessary to create
2100 fake DLL files to trick many programs that check for
2101 file existence to determine whether a particular feature
2102 (such as Winsock and its TCP/IP networking) is available. If
2103 this is a problem for you, you can create empty files in the
2104 configured <filename>c:\windows\system</filename> directory
2105 to make the program think it's there, and Wine's built-in DLL
2106 will be loaded when the program actually asks for it.
2107 (Unfortunately, <filename>tools/wineinstall</filename> does
2108 not create such empty files itself.)
2109 </para>
2110 <para>
2111 Applications sometimes also try to inspect the version
2112 resources from the physical files (for example, to determine
2113 the DirectX version). Empty files will not do in this case,
2114 it is rather necessary to install files with complete
2115 version resources. This problem is currently being worked
2116 on. In the meantime, you may still need to grab some real
2117 DLL files to fool these apps with.
2118 </para>
2119 <para>
2120 And there are of course DLLs that wine does not currently
2121 implement very well (or at all). If you do not have a real
2122 Windows you can steal necessary DLLs from, you can always
2123 get some from one of the Windows DLL archive sites
2124 that can be found via internet search engine.
2125 Please make sure to obey any licenses on the DLLs you fetch...
2126 (some are redistributable, some aren't).
2127 </para>
2128 </sect2>
2130 <sect2 id="config-dll-missing">
2131 <title>Missing DLLs</title>
2133 <para>
2134 In case Wine complains about a missing DLL, you should check whether
2135 this file is a publicly available DLL or a custom DLL belonging
2136 to your program (by searching for its name on the internet).
2137 If you managed to get hold of the DLL, then you should make sure
2138 that Wine is able to find and load it.
2139 DLLs usually get loaded according to the mechanism of the
2140 SearchPath() function.
2141 This function searches directories in the following order:
2143 <orderedlist>
2144 <listitem>
2145 <para>
2146 The directory the program was started from.
2147 </para>
2148 </listitem>
2149 <listitem>
2150 <para>
2151 The current directory.
2152 </para>
2153 </listitem>
2154 <listitem>
2155 <para>
2156 The Windows system directory.
2157 </para>
2158 </listitem>
2159 <listitem>
2160 <para>
2161 The Windows directory.
2162 </para>
2163 </listitem>
2164 <listitem>
2165 <para>
2166 The PATH variable directories.
2167 </para>
2168 </listitem>
2169 </orderedlist>
2171 In short: either put the required DLL into your program
2172 directory (might be ugly), or usually put it into the Windows system
2173 directory. Just find out its directory by having a look at the Wine
2174 configuration file variable "System" (which indicates the location of the
2175 Windows system directory) and the associated drive entry.
2176 Note that you probably shouldn't use NT-based native DLLs,
2177 since Wine's NT API support is somewhat weaker than its Win9x
2178 API support (thus leading to even worse compatibility with NT DLLs
2179 than with a no-windows setup!), so better use Win9x native DLLs
2180 instead or no native DLLs at all.
2181 </para>
2182 </sect2>
2184 <sect2 id="config-dll-windows">
2185 <title>Fetching native DLLs from a Windows CD</title>
2187 <para>
2188 The Linux <command>cabextract</command> utility can be used to
2189 extract native Windows .dll files from .cab files that are to be
2190 found on many Windows installation CDs.
2191 </para>
2192 </sect2>
2193 </sect1>
2195 <sect1 id="config-graphics-driver">
2196 <title>Configuring the graphics driver (x11drv, ttydrv etc.)</title>
2198 <para>
2199 Wine currently supports several different display subsystems
2200 (graphics / text) that are available on various operating
2201 systems today.
2202 For each of these, Wine implements its own interfacing driver.
2203 This section explains how to select one of these drivers
2204 and how to further configure the respective driver.
2205 Once you're finished with that, you can consider your Wine installation
2206 to be finished.
2207 </para>
2209 <para>
2210 The display drivers currently implemented in Wine are:
2211 x11drv, which is used for interfacing to X11 graphics
2212 (the one you'll most likely want to use) and ttydrv
2213 (used for text mode console apps mainly that don't really need
2214 any graphics output).
2215 Once you have decided which display driver to use, it is chosen
2216 with the <literal>GraphicsDriver</literal> option in the
2217 [wine] section of <filename>~/.wine/config</filename>.
2218 </para>
2220 <sect2>
2221 <title>Configuring the x11drv graphics driver</title>
2223 <sect3>
2224 <title>x11drv modes of operation</title>
2226 <para>
2227 The x11drv driver consists of two conceptually distinct
2228 pieces, the graphics driver (GDI part), and the windowing
2229 driver (USER part). Both of these are linked into the
2230 <filename>libx11drv.so</filename> module, though (which you
2231 load with the <literal>GraphicsDriver</literal> option). In
2232 Wine, running on X11, the graphics driver must draw on
2233 drawables (window interiors) provided by the windowing
2234 driver. This differs a bit from the Windows model, where the
2235 windowing system creates and configures device contexts
2236 controlled by the graphics driver, and programs are
2237 allowed to hook into this relationship anywhere they like.
2238 Thus, to provide any reasonable tradeoff between
2239 compatibility and usability, the x11drv has three different
2240 modes of operation.
2241 </para>
2243 <variablelist>
2244 <varlistentry>
2245 <term>Managed</term>
2246 <listitem>
2247 <para>
2248 The default. Specified by using the <literal>Managed</literal>
2249 wine configuration file option (see below).
2250 Ordinary top-level frame windows with thick borders,
2251 title bars, and system menus will be managed by your
2252 window manager. This lets these programs integrate
2253 better with the rest of your desktop, but may not
2254 always work perfectly (a rewrite of this mode of
2255 operation, to make it more robust and less patchy, is
2256 currently being done, though, and it's planned to be
2257 finished before the Wine 1.0 release).
2258 </para>
2259 </listitem>
2260 </varlistentry>
2261 <varlistentry>
2262 <term>Unmanaged / Normal</term>
2263 <listitem>
2264 <para>
2265 Window manager independent (any running
2266 window manager is ignored completely). Window
2267 decorations (title bars, borders, etc) are drawn by
2268 Wine to look and feel like the real Windows. This is
2269 compatible with programs that depend on being able
2270 to compute the exact sizes of any such decorations, or
2271 that want to draw their own.
2272 Unmanaged mode is only used if both Managed and Desktop
2273 are set to disabled.
2274 </para>
2275 </listitem>
2276 </varlistentry>
2277 <varlistentry>
2278 <term>Desktop-in-a-Box</term>
2279 <listitem>
2280 <para>
2281 Specified by using the <literal>Desktop</literal>
2282 wine configuration file option (see below).
2283 (adding a geometry, e.g. <literal>800x600</literal>
2284 for a such-sized desktop, or
2285 even <literal>800x600+0+0</literal> to
2286 automatically position the desktop at the upper-left
2287 corner of the display). This is the mode most
2288 compatible with the Windows model. All program
2289 windows will just be Wine-drawn windows inside the
2290 Wine-provided desktop window (which will itself be
2291 managed by your window manager), and Windows
2292 programs can roam freely within this virtual
2293 workspace and think they own it all, without
2294 disturbing your other X apps.
2295 Note: currently there's one desktop window for every
2296 program; this will be fixed at some time.
2297 </para>
2298 </listitem>
2299 </varlistentry>
2300 </variablelist>
2301 </sect3>
2303 <sect3>
2304 <title>The [x11drv] section</title>
2306 <variablelist>
2307 <varlistentry>
2308 <term>Managed</term>
2309 <listitem>
2310 <para>
2311 Wine can let frame windows be managed by your window
2312 manager. This option specifies whether you want that
2313 by default.
2314 </para>
2315 </listitem>
2316 </varlistentry>
2317 <varlistentry>
2318 <term>Desktop</term>
2319 <listitem>
2320 <para>
2321 Creates a main desktop window of a specified size
2322 to display all Windows programs in.
2323 The size argument could e.g. be "800x600".
2324 </para>
2325 </listitem>
2326 </varlistentry>
2327 <varlistentry>
2328 <term>DXGrab</term>
2329 <listitem>
2330 <para>
2331 If you don't use DGA, you may want an alternative
2332 means to convince the mouse cursor to stay within the
2333 game window. This option does that. Of course, as with
2334 DGA, if Wine crashes, you're in trouble (although not
2335 as badly as in the DGA case, since you can still use
2336 the keyboard to get out of X).
2337 </para>
2338 </listitem>
2339 </varlistentry>
2340 <varlistentry>
2341 <term>UseDGA</term>
2342 <listitem>
2343 <para>
2344 This specifies whether you want DirectDraw to use
2345 XFree86's <firstterm>Direct Graphics
2346 Architecture</firstterm> (DGA), which is able to
2347 take over the entire display and run the game
2348 full-screen at maximum speed. (With DGA1 (XFree86
2349 3.x), you still have to configure the X server to the
2350 game's requested bpp first, but with DGA2 (XFree86
2351 4.x), runtime depth-switching may be possible,
2352 depending on your driver's capabilities.) But be aware
2353 that if Wine crashes while in DGA mode, it may not be
2354 possible to regain control over your computer without
2355 rebooting. DGA normally requires either root
2356 privileges or read/write access to
2357 <filename>/dev/mem</filename>.
2358 </para>
2359 </listitem>
2360 </varlistentry>
2361 <varlistentry>
2362 <term>DesktopDoubleBuffered</term>
2363 <listitem>
2364 <para>
2365 Applies only if you use the
2366 <parameter>--desktop</parameter> command-line option
2367 to run in a desktop window. Specifies whether to
2368 create the desktop window with a double-buffered
2369 visual, something most OpenGL games need to run
2370 correctly.
2371 </para>
2372 </listitem>
2373 </varlistentry>
2374 <varlistentry>
2375 <term>AllocSystemColors</term>
2376 <listitem>
2377 <para>
2378 Applies only if you have a palette-based display, i.e.
2379 if your X server is set to a depth of 8bpp, and if you
2380 haven't requested a private color map. It specifies
2381 the maximum number of shared colormap cells (palette
2382 entries) Wine should occupy. The higher this value,
2383 the less colors will be available to other
2384 programs.
2385 </para>
2386 </listitem>
2387 </varlistentry>
2388 <varlistentry>
2389 <term>PrivateColorMap</term>
2390 <listitem>
2391 <para>
2392 Applies only if you have a palette-based display, i.e.
2393 if your X server is set to a depth of 8bpp. It
2394 specifies that you don't want to use the shared color
2395 map, but a private color map, where all 256 colors are
2396 available. The disadvantage is that Wine's private
2397 color map is only seen while the mouse pointer is
2398 inside a Wine window, so psychedelic flashing and
2399 funky colors will become routine if you use the mouse
2400 a lot.
2401 </para>
2402 </listitem>
2403 </varlistentry>
2404 <varlistentry>
2405 <term>Synchronous</term>
2406 <listitem>
2407 <para>
2408 To be used for debugging X11 operations.
2409 If Wine crashes with an X11 error, then you should enable
2410 Synchronous mode to disable X11 request caching in order
2411 to make sure that the X11 error happens directly after
2412 the corresponding X11 call in the log file appears.
2413 Will slow down X11 output!
2414 </para>
2415 </listitem>
2416 </varlistentry>
2417 <varlistentry>
2418 <term>ScreenDepth</term>
2419 <listitem>
2420 <para>
2421 Applies only to multi-depth displays. It specifies
2422 which of the available depths Wine should use (and
2423 tell Windows apps about).
2424 </para>
2425 </listitem>
2426 </varlistentry>
2427 <varlistentry>
2428 <term>Display</term>
2429 <listitem>
2430 <para>
2431 This specifies which X11 display to use, and if
2432 specified, will override the
2433 <envar>DISPLAY</envar> environment variable.
2434 </para>
2435 </listitem>
2436 </varlistentry>
2437 <varlistentry>
2438 <term>PerfectGraphics</term>
2439 <listitem>
2440 <para>
2441 This option only determines whether fast X11 routines
2442 or exact Wine routines will be used for certain ROP
2443 codes in blit operations. Most users won't notice any
2444 difference.
2445 </para>
2446 </listitem>
2447 </varlistentry>
2448 </variablelist>
2449 </sect3>
2450 </sect2>
2452 <sect2>
2453 <title>Configuring the ttydrv graphics driver</title>
2454 <para>
2455 Currently, the ttydrv doesn't have any special configuration
2456 options to set in the configuration file.
2457 </para>
2458 </sect2>
2460 </sect1>
2462 <sect1 id="config-windows-versions">
2464 <title>Setting the Windows and DOS version value</title>
2466 <para>
2467 The windows and DOS version value a program gets e.g. by calling the
2468 Windows function GetVersion() plays a very important role:
2469 If your Wine installation for whatever reason fails to provide
2470 to your program the correct version value that it expects,
2471 then the program might assume some very bad things and fail (in
2472 the worst case even silently!).
2474 Fortunately Wine contains some more or less intelligent Windows
2475 version guessing algorithm that will try to guess the Windows
2476 version a program might expect and pass that one on to the
2477 program.
2479 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.
2480 </para>
2482 <sect2>
2483 <title>How to configure the Windows and DOS version value Wine
2484 should return</title>
2486 <para>
2487 The version values can be configured in the wine configuration file in
2488 the [Version] section.
2489 </para>
2491 <variablelist>
2492 <varlistentry>
2493 <term>"Windows" = "&lt;version string&gt;"</term>
2494 <listitem>
2495 <para>
2496 default: none; chosen by semi-intelligent detection
2497 mechanism based on DLL environment.
2498 Used to specify which Windows version to return to
2499 programs (forced value, overrides standard detection
2500 mechanism!). Valid settings are e.g. "win31", "win95",
2501 "win98", "win2k", "winxp".
2502 Also valid as an
2503 <link linkend="config-appdefaults">AppDefaults</link>
2504 setting (recommended/preferred use).
2505 </para>
2506 </listitem>
2507 </varlistentry>
2508 <varlistentry>
2509 <term>"DOS"="&lt;version string&gt;"</term>
2510 <listitem>
2511 <para>
2512 Used to specify the DOS version that should be returned
2513 to programs. Only takes effect in case Wine acts as
2514 "win31" Windows version! Common DOS version settings
2515 include 6.22, 6.20, 6.00, 5.00, 4.00, 3.30, 3.10.
2516 Also valid as an
2517 <link linkend="config-appdefaults">AppDefaults</link>
2518 setting (recommended/preferred use).
2519 </para>
2520 </listitem>
2521 </varlistentry>
2522 </variablelist>
2523 </sect2>
2524 </sect1>
2526 &fonts;
2527 &printing;
2529 <sect1 id="config-scsi-support">
2530 <title>SCSI Support</title>
2531 <para>
2532 This file describes setting up the Windows ASPI interface.
2533 ASPI is a direct link to SCSI devices from windows programs.
2534 ASPI just forwards the SCSI commands that programs send
2535 to it to the SCSI bus.
2536 </para>
2537 <para>
2538 If you use the wrong SCSI device in your setup file, you can send
2539 completely bogus commands to the wrong device - An example would be
2540 formatting your hard drives (assuming the device gave you permission -
2541 if you're running as root, all bets are off).
2542 </para>
2543 <para>
2544 So please make sure that <emphasis>all</emphasis> SCSI devices not needed by the program
2545 have their permissions set as restricted as possible!
2546 </para>
2548 <sect2>
2549 <title>Windows requirements</title>
2550 <orderedlist>
2551 <listitem>
2552 <para>
2553 The software needs to use the "Adaptec"
2554 compatible drivers (ASPI). At least with Mustek, they
2555 allow you the choice of using the built-in card or the
2556 "Adaptec (AHA)" compatible drivers. This will not work
2557 any other way. Software that accesses the scanner via a
2558 DOS ASPI driver (e.g. ASPI2DOS) is supported, too.
2559 </para>
2560 </listitem>
2561 <listitem>
2562 <para>
2563 You probably need a real windows install of the software
2564 to set the LUN's/SCSI id's up correctly. I'm not exactly
2565 sure.
2566 </para>
2567 </listitem>
2568 </orderedlist>
2569 </sect2>
2571 <sect2>
2572 <title>Linux requirements</title>
2573 <orderedlist>
2574 <listitem>
2575 <para>
2576 Your SCSI card must be supported under Linux. This will
2577 not work with an unknown SCSI card. Even for cheap'n
2578 crappy "scanner only" controllers some special Linux
2579 drivers exist on the net.
2580 If you intend to use your IDE device, you need to use the
2581 ide-scsi emulation.
2582 Read
2583 <ulink url="http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html">
2584 http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html</ulink>
2585 for ide-scsi setup instructions.
2586 </para>
2587 </listitem>
2588 <listitem>
2589 <para>
2590 Compile generic SCSI drivers into your kernel.
2591 </para>
2592 </listitem>
2593 <listitem>
2594 <para>
2595 This seems to be not required any more for newer (2.2.x) kernels:
2596 Linux by default uses smaller SCSI buffers than Windows.
2597 There is a kernel build define <literal>SG_BIG_BUFF</literal> (in
2598 <filename>sg.h</filename>) that is by default set too
2599 low. The SANE project recommends
2600 <literal>130560</literal> and this seems to work just
2601 fine. This does require a kernel rebuild.
2602 </para>
2603 </listitem>
2604 <listitem>
2605 <para>
2606 Make the devices for the scanner (generic SCSI devices)
2607 - look at the SCSI programming HOWTO at
2608 <ulink url="http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html">
2609 http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html</ulink>
2610 for device numbering.
2611 </para>
2612 </listitem>
2613 <listitem>
2614 <para>
2615 I would recommend making the scanner device writable by
2616 a group. I made a group called
2617 <literal>scanner</literal> and added myself to it.
2618 Running as root increases your risk of sending bad SCSI
2619 commands to the wrong device. With a regular user, you
2620 are better protected.
2621 </para>
2622 </listitem>
2623 <listitem>
2624 <para>
2625 For Win32 software (WNASPI32), Wine has auto-detection in place.
2626 For Win16 software (WINASPI), you need to add a SCSI device entry
2627 for your particular scanner to ~/.wine/config. The format is
2628 <literal>[scsi cCtTdD]</literal> where
2629 <literal>"C" = "controller"</literal>,
2630 <literal>"T" = "target"</literal>, <literal>D=LUN</literal>
2631 </para>
2632 <para>
2633 For example, I set mine up as controller <literal>0</literal>,
2634 Target <literal>6</literal>, LUN <literal>0</literal>.
2635 <programlisting>
2636 [scsi c0t6d0]
2637 "Device" = "/dev/sgi"
2638 </programlisting>
2639 Yours will vary with your particular SCSI setup.
2640 </para>
2641 </listitem>
2642 </orderedlist>
2643 </sect2>
2645 <sect2>
2646 <title>Notes</title>
2647 <para>
2648 The biggest drawback is that it only works under Linux at the moment.
2649 The ASPI code has only been tested with:
2650 </para>
2651 <itemizedlist>
2652 <listitem>
2653 <para>
2654 a Mustek 800SP with a Buslogic controller under Linux [BM]
2655 </para>
2656 </listitem>
2657 <listitem>
2658 <para>
2659 a Siemens Nixdorf 9036 with Adaptec AVA-1505 under Linux
2660 accessed via DOSASPI. Note that I had color problems,
2661 though (barely readable result) [AM]
2662 </para>
2663 </listitem>
2664 <listitem>
2665 <para>
2666 a Fujitsu M2513A MO drive (640MB) using generic SCSI
2667 drivers. Formatting and ejecting worked perfectly.
2668 Thanks to Uwe Bonnes for access to the hardware! [AM]
2669 </para>
2670 </listitem>
2671 </itemizedlist>
2672 </sect2>
2673 </sect1>
2675 <sect1 id="config-odbc">
2676 <title>Using ODBC</title>
2677 <para>
2678 This section describes how ODBC works within Wine and how to configure it.
2679 </para>
2680 <para>
2681 The ODBC system within Wine, as with the printing system, is designed
2682 to hook across to the Unix system at a high level. Rather than
2683 ensuring that all the windows code works under wine it uses a suitable
2684 Unix ODBC provider, such as UnixODBC. Thus if you configure Wine to
2685 use the built-in odbc32.dll, that Wine DLL will interface to your
2686 Unix ODBC package and let that do the work, whereas if you configure
2687 Wine to use the native odbc32.dll it will try to use the native
2688 ODBC32 drivers etc.
2689 </para>
2690 <sect2>
2691 <title>Using a Unix ODBC system with Wine</title>
2692 <para>
2693 The first step in using a Unix ODBC system with Wine is, of course,
2694 to get the Unix ODBC system working itself. This may involve
2695 downloading code or RPMs etc. There are several Unix ODBC systems
2696 available; the one the author is used to is unixODBC (with the
2697 IBM DB2 driver). Typically such systems will include a tool, such
2698 as <command>isql</command>, which will allow you to access the data from the command
2699 line so that you can check that the system is working.
2700 </para>
2701 <para>
2702 The next step is to hook the Unix ODBC library to the wine built-in
2703 odbc32 DLL. The built-in odbc32 (currently) looks to the
2704 environment variable <emphasis>LIB_ODBC_DRIVER_MANAGER</emphasis>
2705 for the name of the ODBC library. For example in the author's
2706 .bashrc file is the line:
2707 </para>
2708 <programlisting>
2709 export LIB_ODBC_DRIVER_MANAGER=/usr/lib/libodbc.so.1.0.0
2710 </programlisting>
2711 <para>
2712 If that environment variable is not set then it looks for a
2713 library called libodbc.so and so you can add a symbolic link to
2714 equate that to your own library. For example as root you could
2715 run the commands:
2716 </para>
2717 <screen>
2718 <prompt># </prompt><userinput>ln -s libodbc.so.1.0.0 /usr/lib/libodbc.so</userinput>
2719 <prompt># </prompt><userinput>/sbin/ldconfig</userinput>
2720 </screen>
2721 <para>
2722 The last step in configuring this is to ensure that Wine is set up
2723 to run the built-in version of odbc32.dll, by modifying the DLL
2724 configuration. This built-in DLL merely acts as a stub between the
2725 calling code and the Unix ODBC library.
2726 </para>
2727 <para>
2728 If you have any problems then you can use WINEDEBUG=+odbc32 command
2729 before running wine to trace what is happening. One word of
2730 warning. Some programs actually cheat a little and bypass the ODBC
2731 library. For example the Crystal Reports engine goes to the registry
2732 to check on the DSN. The fix for this is documented at unixODBC's
2733 site where there is a section on using unixODBC with Wine.
2734 </para>
2735 </sect2>
2736 <sect2>
2737 <title>Using Windows ODBC drivers</title>
2738 <para>
2739 Native ODBC drivers have been reported to work for many types of
2740 databases including MSSQL and Oracle. In fact, some like MSSQL can
2741 only be accessed on Linux through a Winelib app. Rather than
2742 just copying DLL files, most ODBC drivers require a Windows-based
2743 installer to run to properly configure things such as registry keys.
2744 </para>
2745 <para>
2746 In order to set up MSSQL support you will first need to download
2747 and run the mdac_typ.exe installer from microsoft.com. In order to
2748 configure your ODBC connections you must then run CLICONFG.EXE and
2749 ODBCAD32.EXE under Wine. You can find them in the windows\system
2750 directory after mdac_typ runs. Compare the output of these programs
2751 with the output on a native Windows machine. Some things, such
2752 as protocols, may be missing because they rely on being installed
2753 along with the operating system. If so, you may be able to copy
2754 missing functionality from an existing Windows installation as
2755 well as any registry values required. A native Windows installation
2756 configured to be used by Wine should work the same way it did
2757 when run natively.
2758 </para>
2759 <para>
2760 Types successfully tested under wine:
2761 </para>
2762 <informaltable>
2763 <tgroup cols="2">
2764 <thead>
2765 <row>
2766 <entry>DB Type</entry>
2767 <entry>Usefulness</entry>
2768 </row>
2769 </thead>
2770 <tbody>
2771 <row>
2772 <entry>MS SQL</entry>
2773 <entry>100%</entry>
2774 </row>
2775 </tbody>
2776 </tgroup>
2777 </informaltable>
2778 <para>
2779 Please report any other successes to the
2780 <ulink url="mailto:wine-devel@winehq.org">wine-devel</ulink>
2781 mailing list.
2782 </para>
2783 </sect2>
2784 </sect1>
2786 </chapter>
2788 <!-- Keep this comment at the end of the file
2789 Local variables:
2790 mode: sgml
2791 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")
2792 End: