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