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