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