1 <chapter id=
"config-wine-main">
2 <title>Configuring Wine
</title>
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.
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
26 Finally, the remaining parts of this chapter contain descriptions
27 of specific Wine configuration items that might also be
31 <sect1 id=
"config-requirements-windows" xreflabel=
"--Installing Section--">
32 <title>What are the requirements of a fully working Windows environment?
</title>
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.
43 Registry. Many keys are supposed to exist and contain
44 meaningful data, even in a newly-installed Windows.
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
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
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.
88 <sect1 id=
"config-helper-programs">
89 <title>Easy configuration helper programs
</title>
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.
98 <sect2 id=
"config-helper-winesetuptk">
99 <title>WineSetupTk
</title>
101 WineSetupTk is a graphical Wine configuration tool with
102 incredibly easy handling of Wine configuration issues, to be
103 used for configuring the Wine environment after having
104 installed the Wine files.
105 It has been written by CodeWeavers in
2000 as part of a host
106 of other efforts to make Wine more desktop oriented, and updated
107 in
2003 by Vincent BĂ©ron, Alex Pasadyn and Ivan Leo Puoti.
110 If you're using Debian, simply install the WineSetupTk
114 <prompt>#
</prompt><userinput>apt-get install winesetuptk
</userinput>
117 If you're using another distribution, you can get WineSetupTk from the
118 <ulink url=
"http://sourceforge.net/project/showfiles.php?group_id=6241">
119 sourceforge.net Wine download page
</ulink>
123 <sect2 id=
"config-helper-wineinstall">
124 <title>wineinstall
</title>
126 <command>wineinstall
</command> is a small configuration tool
127 residing as
<filename>tools/wineinstall
</filename> in a Wine
128 source code tree. It has been written to allow for an easy
129 and complete compilation/installation of Wine source code for
130 people who don't bother with reading heaps of very valuable
131 and informative documentation ;-)
134 Once you have successfully extracted the Wine source code
135 tree, change to the main directory of it and then run (as
139 <prompt>$
</prompt><userinput>./tools/wineinstall
</userinput>
142 Doing so will compile Wine, install Wine and configure the
143 Wine environment (either by providing access to a Windows
144 partition or by creating a properly configured no-windows
145 directory environment).
150 Commenting out until winecfg doesn't actually do something.
151 <sect2 id="config-helper-winecfg">
152 <title>winecfg</title>
154 <command>winecfg</command> is a small graphical configuration tool
155 residing as <filename>programs/winecfg</filename> in a Wine
156 source code tree. It is a Winelib app making use of standard
157 Win32 GUI controls to easily customize entries in a Wine
164 <sect1 id=
"config-verify">
165 <title>Verification of correct configuration
</title>
168 TODO: After you have finished configuring Wine you can verify
169 your Wine configuration by running winecfg.
170 This functionality will be added to winecfg
175 configuration documentation below to find out more about Wine's
176 configuration, or proceed to the
<link linkend=
"bugs">Troubleshooting
181 <sect1 id=
"config-file">
182 <title>The Wine Configuration File
</title>
184 This section is meant to contain both an easy step-by-step introduction
185 to the Wine configuration file (for new Wine users)
186 and a complete reference to all Wine configuration file settings (for
191 <title>Configuration File Introduction
</title>
193 The Wine configuration file is the central file to store
194 configuration settings for Wine.
195 This file (which is called
<filename>config
</filename>)
196 can be found in the sub directory
<filename>.wine/
</filename>
197 of your user's home directory
198 (directory
<filename>/home/user/
</filename>). In other words, the Wine
199 configuration file is
<filename>~/.wine/config
</filename>.
200 Note that since the Wine configuration file is a part of the
201 Wine registry file system, this file also
202 <emphasis>requires
</emphasis> a correct
"WINE REGISTRY
203 Version 2" header line to be recognized properly, just like
204 all other Wine registry text files (just in case you decided
205 to write your own registry file from scratch and wonder why
206 Wine keeps rejecting it).
209 The settings available in the configuration file include:
223 The Wine look and feel
233 Wine's multimedia drivers and DLL configuration
241 <title>Creating Or Modifying The Configuration File
</title>
243 If you just installed Wine for the first time and want to
244 finish Wine installation by configuring it now, then you could
245 use our sample configuration file
<filename>config
</filename>
246 (which can be found in the directory
247 <filename>documentation/samples/
</filename> of the Wine source
248 code directory) as a base for adapting the Wine configuration
249 file to the settings you want.
250 First, I should mention that you should not forget to make
251 sure that any previous configuration file at
252 <filename>~/.wine/config
</filename> has been safely moved out
253 of the way instead of simply overwriting it when you will now
254 copy over the sample configuration file.
257 If you don't have a pre-existing configuration file and thus
258 need to copy over our sample configuration file to the
259 standard Wine configuration file location, do in a
260 <glossterm>terminal
</glossterm>:
262 <prompt>$ <
/><userinput>mkdir ~/.wine/<
/>
263 <prompt>$ <
/><userinput>cp
<replaceable>dir_to_wine_source_code
</replaceable>/documentation/samples/config ~/.wine/config<
/>
265 Otherwise, simply use the already existing configuration file
266 at
<filename>~/.wine/config
</filename>.
269 Now you can start adapting the configuration file's settings with an
270 <glossterm>editor
</glossterm> according to the documentation
272 Note that you should
<emphasis>only
</emphasis> change
273 configuration file settings if wineserver is not running (in
274 other words: if your user doesn't have a Wine session running),
275 otherwise Wine won't use them - and even worse, wineserver will
276 overwrite them with the old settings once wineserver quits!!
280 <sect2 id=
"config-file-how">
281 <title>What Does It Contain?
</title>
284 Let's start by giving an overview of which sections a
285 configuration file may contain, and whether the inclusion of
286 the respective section is
<emphasis>needed
</emphasis> or only
<emphasis>recommended
</emphasis> (
"recmd").
289 <informaltable frame=
"all">
293 <entry>Section Name
</entry>
294 <entry>Needed?
</entry>
295 <entry>What it Does
</entry>
300 <entry>[wine]
</entry>
302 <entry>General settings for Wine
</entry>
305 <entry>[DllOverrides]
</entry>
307 <entry>Overrides defaults for DLL loading
</entry>
310 <entry>[x11drv]
</entry>
312 <entry>Graphics driver settings
</entry>
315 <entry>[fonts]
</entry>
317 <entry>Font appearance and recognition
</entry>
320 <entry>[ppdev]
</entry>
322 <entry>Parallelport emulation
</entry>
325 <entry>[spooler]
</entry>
327 <entry>Print spooling
</entry>
330 <entry>[ports]
</entry>
332 <entry>Direct port access
</entry>
335 <entry>[Debug]
</entry>
337 <entry>What to do with certain debug messages
</entry>
340 <entry>[Registry]
</entry>
342 <entry>Specifies locations of windows registry files
</entry>
345 <entry>[programs]
</entry>
347 <entry>Programs to be run automatically
</entry>
350 <entry>[Console]
</entry>
352 <entry>Console settings
</entry>
355 <entry>[Clipboard]
</entry>
357 <entry>Interaction for Wine and X11 clipboard
</entry>
360 <entry>[afmdirs]
</entry>
362 <entry>Postscript driver settings
</entry>
365 <entry>[WinMM]
</entry>
367 <entry>Multimedia settings
</entry>
370 <entry>[AppDefaults]
</entry>
372 <entry>Overwrite the settings of previous sections for special programs
</entry>
379 Now let's explain the configuration file sections in a
383 <sect3 id=
"config-wine">
384 <title>The [wine] Section
</title>
386 The [wine] section of the configuration file contains all kinds
387 of general settings for Wine.
391 "Windows" =
"c:\\windows"
392 "System" =
"c:\\windows\\system"
394 "Path" =
"c:\\windows;c:\\windows\\system;c:\\blanco"
395 "ShowDirSymlinks" =
"1"
397 For a detailed description of drive layer configuration and
398 the meaning of these parameters, please look at the
<link
399 linkend=
"config-drive-main">Disc Drives, Serial and Parallel
400 Ports section
</link>.
403 <programlisting>"GraphicsDriver" =
"x11drv|ttydrv"</programlisting>
404 Sets the graphics driver to use for Wine output.
405 x11drv is for X11 output, ttydrv is for text console output.
406 WARNING: if you use ttydrv here, then you won't be able to run
407 a lot of Windows GUI programs (ttydrv is still pretty
"broken"
408 at running graphical apps). Thus this option is mainly interesting
409 for e.g. embedded use of Wine in web server scripts.
410 Note that ttydrv is still very lacking, so if it doesn't work,
411 resort to using
"xvfb", a virtual X11 server.
412 Another way to run Wine without display would be to run X11
413 via Xvnc, then connect to that VNC display using xvncviewer
414 (that way you're still able to connect to your app and
415 configure it if need be).
418 <programlisting>"Printer" =
"off|on"</programlisting> Tells wine
419 whether to allow printing via printer drivers to work.
420 This option isn't needed for our built-in psdrv printer driver
422 Using these things are pretty alpha, so you might want to
423 watch out. Some people might find it useful, however. If
424 you're not planning to work on printing via windows printer
425 drivers, don't even add this to your wine configuration file
426 (It probably isn't already in it).
427 Check out the [spooler] and [parallelports] sections too.
430 <programlisting>"ShellLinker" =
"wineshelllink"</programlisting>
431 This setting specifies the shell linker script to use for setting
432 up Windows icons in e.g. KDE or Gnome that are given by programs
433 making use of appropriate shell32.dll functionality to create
434 icons on the desktop/start menu during installation.
437 <programlisting>"SymbolTableFile" =
"wine.sym"</programlisting>
438 Sets up the symbol table file for the wine debugger. You
439 probably don't need to fiddle with this. May be useful if
440 your wine is stripped.
444 <sect3 id=
"config-dlloverrides">
445 <title>The [DllOverrides] Section
</title>
447 The format for this section is the same for each line:
448 <programlisting><DLL
>{,
<DLL
>,
<DLL
>...} =
<FORM
>{,
<FORM
>,
<FORM
>...}
</programlisting>
449 For example, to load built-in KERNEL pair (case doesn't
451 <programlisting>"kernel,kernel32" =
"builtin"</programlisting>
452 To load the native COMMDLG pair, but if that doesn't work
454 <programlisting>"commdlg,comdlg32" =
"native, builtin"</programlisting>
455 To load the native COMCTL32:
456 <programlisting>"comctl32" =
"native"</programlisting>
457 Here is a good generic setup (As it is defined in config
458 that was included with your wine package):
461 "rpcrt4" =
"builtin, native"
462 "oleaut32" =
"builtin, native"
463 "ole32" =
"builtin, native"
464 "commdlg" =
"builtin, native"
465 "comdlg32" =
"builtin, native"
466 "ver" =
"builtin, native"
467 "version" =
"builtin, native"
468 "shell" =
"builtin, native"
469 "shell32" =
"builtin, native"
470 "shfolder" =
"builtin, native"
471 "shlwapi" =
"builtin, native"
472 "shdocvw" =
"builtin, native"
473 "lzexpand" =
"builtin, native"
474 "lz32" =
"builtin, native"
475 "comctl32" =
"builtin, native"
476 "commctrl" =
"builtin, native"
477 "advapi32" =
"builtin, native"
478 "crtdll" =
"builtin, native"
479 "mpr" =
"builtin, native"
480 "winspool.drv" =
"builtin, native"
481 "ddraw" =
"builtin, native"
482 "dinput" =
"builtin, native"
483 "dsound" =
"builtin, native"
484 "opengl32" =
"builtin, native"
485 "msvcrt" =
"native, builtin"
486 "msvideo" =
"builtin, native"
487 "msvfw32" =
"builtin, native"
488 "mcicda.drv" =
"builtin, native"
489 "mciseq.drv" =
"builtin, native"
490 "mciwave.drv" =
"builtin, native"
491 "mciavi.drv" =
"native, builtin"
492 "mcianim.drv" =
"native, builtin"
493 "msacm.drv" =
"builtin, native"
494 "msacm" =
"builtin, native"
495 "msacm32" =
"builtin, native"
496 "midimap.drv" =
"builtin, native"
497 ; you can specify programs too
498 "notepad.exe" =
"native, builtin"
499 ; default for all other DLLs
500 "*" =
"native, builtin"
505 If loading of the libraries that are listed first fails,
506 wine will just go on by using the second or third option.
511 <sect3 id=
"config-fonts">
512 <title>The [fonts] Section
</title>
514 This section sets up wine's font handling.
517 <programlisting>"Resolution" =
"96"</programlisting>
518 Since the way X handles fonts is different from the way
519 Windows does, wine uses a special mechanism to deal with
520 them. It must scale them using the number defined in the
521 "Resolution" setting.
60-
120 are reasonable values,
96 is
522 a nice in the middle one. If you have the real windows
523 fonts available , this parameter will not be as
524 important. Of course, it's always good to get your X fonts
525 working acceptably in wine.
528 <programlisting>"Default" =
"-adobe-times-"</programlisting>
529 The default font wine uses. Fool around with it if you'd like.
535 The
<literal>Alias
</literal> setting allows you to map an X font to a font
536 used in wine. This is good for apps that need a special font you don't have,
537 but a good replacement exists. The syntax is like so:
538 <programlisting>"AliasX" =
"[Fake windows name],[Real X name]"<,optional
"masking" section
></programlisting>
539 Pretty straightforward. Replace
"AliasX" with
"Alias0",
540 then
"Alias1" and so on. The fake windows name is the name
541 that the font will be under a windows app in wine. The
542 real X name is the font name as seen by X (Run
543 "xfontsel"). The optional
"masking" section allows you to
544 utilize the fake windows name you define. If it is not
545 used, then wine will just try to extract the fake windows
546 name itself and not use the value you enter.
549 Here is an example of an alias without masking. The font will show up in windows
551 <programlisting>"Alias0" =
"Foo,--google-"</programlisting>
552 Here is an example with masking enabled. The font will show up as
"Foo" in
554 <programlisting>"Alias1" =
"Foo,--google-,subst"</programlisting>
555 For more information check out the
<link linkend=
"config-fonts-main">Fonts
</link>
560 <sect3 id=
"config-io">
561 <title>The [spooler] and [ports] Sections
</title>
563 The [spooler] section will inform wine where to spool
564 print jobs. Use this if you want to try printing. Wine
565 docs claim that spooling is
"rather primitive" at this
566 time, so it won't work perfectly.
<emphasis>It is optional.
</emphasis> The only
567 setting you use in this section works to map a port (LPT1,
568 for example) to a file or a command. Here is an example,
569 mapping LPT1 to the file
<filename>out.ps
</filename>:
570 <programlisting>"LPT1:" =
"out.ps"</programlisting>
571 The following command maps printing jobs to LPT1 to the
572 command
<command>lpr
</command>. Notice the |:
573 <programlisting>"LPT1:" =
"|lpr"</programlisting>
574 The [ports] section is usually useful only for people who
575 need direct port access for programs requiring dongles or
576 scanners.
<emphasis>If you don't need it, don't use
580 <programlisting>"read" =
"0x779,0x379,0x280-0x2a0"</programlisting>
581 Gives direct read access to those IO's.
584 <programlisting>"write" =
"0x779,0x379,0x280-0x2a0"</programlisting>
585 Gives direct write access to those IO's. It's probably a
586 good idea to keep the values of the
587 <literal>read
</literal> and
<literal>write
</literal>
588 settings the same. This stuff will only work when you're
593 <sect3 id=
"config-debug-etc">
594 <title>The [Debug], [Registry], and [programs] Sections
</title>
596 [Debug] is used to include or exclude debug messages, and to
597 output them to a file. The latter is rarely used.
<emphasis>These
598 are all optional and you probably don't need to add or
599 remove anything in this section to your config.
</emphasis> (In extreme
600 cases you may want to use these options to manage the amount
601 of information generated by
<parameter>WINEDEBUG=+relay
605 <programlisting>"File" =
"/blanco"</programlisting>
606 Sets the logfile for wine. Set to CON to log to standard out.
607 <emphasis>This is rarely used.
</emphasis>
610 <programlisting>"SpyExclude" =
"WM_SIZE;WM_TIMER;"</programlisting>
611 Excludes debug messages about
<constant>WM_SIZE
</constant>
612 and
<constant>WM_TIMER
</constant> in the logfile.
615 <programlisting>"SpyInclude" =
"WM_SIZE;WM_TIMER;"</programlisting>
616 Includes debug messages about
<constant>WM_SIZE
</constant>
617 and
<constant>WM_TIMER
</constant> in the logfile.
620 <programlisting>"RelayInclude" =
"user32.CreateWindowA;comctl32.*"</programlisting>
621 Include only the listed functions in a
622 <parameter>WINEDEBUG=+relay
</parameter> trace. This entry is
623 ignored if there is a
<parameter>RelayExclude
</parameter> entry.
626 <programlisting>"RelayExclude" =
"RtlEnterCriticalSection;RtlLeaveCriticalSection"</programlisting>
627 Exclude the listed functions in a
628 <parameter>WINEDEBUG=+relay
</parameter> trace. This entry
629 overrides any settings in a
<parameter>RelayInclude
</parameter>
630 entry. If neither entry is present then the trace includes
634 In both entries the functions may be specified either as a
635 function name or as a module and function. In this latter
636 case specify an asterisk for the function name to include/exclude
637 all functions in the module.
640 [Registry] can be used to tell wine where your old windows
641 registry files exist. This section is completely optional
642 and useless to people using wine without an existing
643 windows installation.
646 <programlisting>"UserFileName" =
"/dirs/to/user.reg"</programlisting>
647 The location of your old
<filename>user.reg
</filename> file.
650 [programs] can be used to say what programs run under
654 <programlisting>"Default" =
"/program/to/execute.exe"</programlisting>
655 Sets the program to be run if wine is started without specifying a program.
658 <programlisting>"Startup" =
"/program/to/execute.exe"</programlisting>
659 Sets the program to automatically be run at startup every time.
663 <sect3 id=
"config-winmm">
664 <title>The [WinMM] Section
</title>
666 [WinMM] is used to define which multimedia drivers have to be loaded. Since
667 those drivers may depend on the multimedia interfaces available on your system
668 (OSS, ALSA... to name a few), it's needed to be able to configure which driver
673 The content of the section looks like:
676 "Drivers" =
"wineoss.drv"
677 "WaveMapper" =
"msacm.drv"
678 "MidiMapper" =
"midimap.drv"
680 All the keys must be defined:
684 The
"Drivers" key is a ';' separated list of modules name, each of
685 them containing a low level driver. All those drivers will be loaded
686 when MMSYSTEM/WINMM is started and will provide their inner features.
691 The
"WaveMapper" represents the name of the module containing the Wave
692 Mapper driver. Only one wave mapper can be defined in the system.
697 The
"MidiMapper" represents the name of the module containing the MIDI
698 Mapper driver. Only one MIDI mapper can be defined in the system.
705 <sect3 id=
"config-network">
706 <title>The [Network] Section
</title>
708 [Network] contains settings related to
709 networking. Currently there is only one value that can be set.
713 <term>UseDnsComputerName
</term>
716 A boolean setting (default:
<literal>Y
</literal>)
717 that affects the way Wine sets the computer name. The computer
718 name in the Windows world is the so-called
<emphasis>NetBIOS name
</emphasis>.
719 It is contained in the
<varname>ComputerName
</varname> in the registry entry
720 <varname>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName
</varname>.
723 If this option is set to
"Y" or missing, Wine will set the
724 NetBIOS name to the Unix host name of your computer, if
725 necessary truncated to
31 characters. The Unix hostname is the output
726 of the shell command
<command>hostname
</command>, up to but not
727 including the first dot ('.'). Among other things, this means that
728 Windows programs running under Wine cannot change the NetBIOS computer name.
731 If this option is set to
"N", Wine will use the registry value above
732 to set the NetBIOS name. Only if the registry entry doesn't exist (usually
733 only during the first wine startup) it will use the Unix hostname as
734 usual. Windows programs can change the NetBIOS name. The change
735 will be effective after a
"reboot", i.e. after restarting Wine.
742 <sect3 id=
"config-appdefaults">
743 <title>The [AppDefaults] Section
</title>
745 The section is used to overwrite certain settings of this file for a
746 special program with different settings.
747 [AppDefaults] is not the real name of the section. The real name
748 consists of the leading word AppDefaults followed by the name
749 of the executable the section is valid for.
750 The end of the section name is the name of the
751 corresponding
"standard" section of the configuration file
752 that should have some of its settings overwritten with the
753 program specific settings you define.
754 The three parts of the section name are separated by two backslashes.
757 Currently wine supports overriding selected settings within
758 the sections [DllOverrides], [x11drv], [version] and [dsound] only.
761 Here is an example that overrides the normal settings for a
769 ;; run install in desktop mode
770 [AppDefaults\\install.exe\\x11drv]
772 "Desktop" =
"800x600"
778 <sect2 id=
"config-trouble">
779 <title>What If It Doesn't Work?
</title>
781 There is always a chance that things will go wrong. If the
782 unthinkable happens, report the problem to
783 <ulink url=
"http://bugs.winehq.org/">Wine Bugzilla
</ulink>,
785 <systemitem>comp.emulators.ms-windows.wine
</systemitem>,
786 or the IRC channel
<systemitem>#WineHQ
</systemitem> found on
787 irc.freenode.net, or connected servers.
788 Make sure that you have looked over this document thoroughly,
794 <filename>README
</filename>
799 <filename>http://www.winehq.org/trouble/
</filename>
804 If indeed it looks like you've done your research, be
805 prepared for helpful suggestions. If you haven't, brace
806 yourself for heaving flaming.
811 <sect1 id=
"config-drive-main">
812 <title>Disc Drives, Serial and Parallel Ports
</title>
814 <title>Extremely Important Prerequisites
</title>
816 If you're planning to include access to a CD-ROM drive in your Wine
817 configuration on Linux, then
<emphasis>make sure
</emphasis> to add
818 the
<quote>unhide
</quote> mount option to the CD-ROM file system
819 entry in
<filename>/etc/fstab
</filename>, e.g.:
820 <programlisting>/dev/cdrom /cdrom iso9660 ro,noauto,users,unhide
0 0</programlisting>
821 Several Windows program setup CD-ROMs or other CD-ROMs chose
822 to do such braindamaged things as marking very important setup
823 helper files on the CD-ROM as
<quote>hidden
</quote>.
824 That's no problem on Windows, since the Windows CD-ROM driver by
825 default displays even files that are supposed to be
826 <quote>hidden
</quote>. But on Linux, which chose to
827 <emphasis>hide
</emphasis> <quote>hidden
</quote> files on CD by
828 default, this is
<emphasis>FATAL
</emphasis>!
829 (the programs will simply abort with an
<quote>installation file not found
</quote> or similar error)
830 Thus you should never forget to add this setting.
835 <title>Short Introduction
</title>
837 Windows applications refer to disc drives by letters such as
838 <filename>A:
</filename>,
<filename>B:
</filename> and
839 <filename>C:
</filename>, and to serial and parallel ports by names
840 such as
<filename>COM1
</filename>: and
<filename>LPT1:
</filename>.
843 You need to tell Wine how to interpret these. You do so by
844 specifying the Unix file system nodes and devices that Wine
845 should map them onto, as described later in this section.
848 You can map a Windows fixed disc drive onto any node in your
849 Unix file system - this need not be the root node of a drive.
850 For example, you could map your Windows drive
<filename>C:
</filename>
851 onto your Unix directory
<filename>/usr/share/wine-C
</filename>.
852 Then the Windows folder
<filename>C:\Windows\Fonts
</filename> would
853 be at
<filename>/usr/share/wine-C/Windows/Fonts
</filename> in your
857 Make sure that you have assigned drive letters for directories
858 that will cover all the items Wine needs to access. These include
859 the programs that you run, the data files they need and the Wine
860 debugger (in case anything goes wrong).
863 It is best to use a number of drive letters, and map them onto
864 directories that cover small sections of the file system containing
865 the files that Wine will need to access. This is safer than simply
866 assigning a single drive letter to the Unix root directory
867 <filename></filename>/, which would allow Windows applications to
868 access the whole of your Unix file system (subject, of course,
869 to Unix permissions). If one of them misbehaved, or if you
870 accidentally installed a virus, this might leave you vulnerable.
873 For replaceable media, such as floppy discs and CD-ROMs, you should
874 map Windows drive letters onto the mount points for these drives in
875 your Unix file system - for example
<filename>/mnt/floppy
</filename>
876 or
<filename>/mnt/cdrom
</filename>.
879 If your applications access serial and parallel ports directly,
880 you should map these onto the corresponding Unix devices
881 - for example
<filename>/dev/ttyS0
</filename> and
882 <filename>/dev/lp0
</filename>.
887 <sect2 id=
"config-drive-dir">
888 <title>Windows Directory Structure
</title>
890 Here's the fundamental layout that Windows programs and
891 installers expect and that we thus need to configure properly
892 in Wine. Without it, they seldomly operate correctly. If you
893 intend to use a no-windows environment (not using an existing
894 Windows partition), then it is recommended to use either
895 <command>WineSetupTk
</command>'s or
896 <command>wineinstall
</command>'s capabilities to create an
897 initial windows directory tree, since creating a directory
898 structure manually is tiresome and error-prone.
902 C:\ Root directory of primary disk drive
903 Windows\ Windows directory, containing .INI files,
905 System\ Win3.x/
95/
98/ME directory for common DLLs
906 WinNT/
2000 directory for common
16-bit DLLs
907 System32\ WinNT/
2000 directory for common
32-bit DLLs
908 Start Menu\ Program launcher directory structure
909 Programs\ Program launcher links (.LNK files) to programs
910 Program Files\ Application binaries (.EXE and .DLL files)
914 <sect2 id=
"config-drive-sections">
915 <title>The dosdevices Directory
</title>
917 The
<filename>dosdevices
</filename> directory contains the entries
918 that tell Wine how to map Windows disc drive letters onto Unix file
919 system nodes, and how to map Windows serial and parallel ports onto
920 Unix devices. It is located in the
<filename>.wine
</filename>
921 sub-directory of your home directory,
922 i.e.
<filename>~/.wine/dosdevices
</filename>.
925 The entries in the
<filename>dosdevices
</filename> directory are
926 symbolic links to Unix file system nodes and devices. You can
927 create them by using the
<command>ln
</command> command in a Unix
928 terminal. Alternatively, many File Managers have the capability of
929 creating symbolic links.
932 For example, if you have decided to map your Windows
933 <filename>C:
</filename> drive onto
934 <filename>/usr/share/wine-c
</filename>, you could type the
935 following (after changing to your
<filename>dosdevices
</filename>
938 ln -s /usr/share/wine-c c:
942 Replaceable media are a little more complicated. In addition to
943 creating a link for the file system on the medium, for example:
947 you also need to create a link for the device itself. Notice that
948 this has a double colon after the drive letter:
954 For serial and parallel ports, you simply create a link to
955 the device; notice that no colon is required after the Windows
958 ln -s /dev/ttyS0 com1
963 Windows shares can are mapped into the
<filename>unc/
</filename>
964 directory so anything trying to access
965 <filename>\\machinename\some\dir\and\file
</filename> will look in
966 <filename>~/.wine/dosdevices/unc/machinename/some/dir/and/file
</filename>.
967 For example, if you used Samba to mount
968 <filename>\\machinename\some
</filename> on
969 <filename>/mnt/smb/machinename/some
</filename> then you can do
972 ln -s /mnt/smb/machinename/some unc/machinename/some
975 to make it available in wine (don't forget to create the unc
976 directory if it doesn't alrady exist).
981 <title>File system settings in the [wine] section
</title>
983 <programlisting>"Windows" =
"c:\\windows"</programlisting>
984 This tells Wine and Windows programs where the
985 <filename>Windows
</filename> directory is. It is
986 recommended to have this directory somewhere on your
987 configured
<medialabel>C
</medialabel> drive, and it's also
988 recommended to just call the directory
"windows" (this is
989 the default setup on Windows, and some stupid programs
990 might rely on this). So in case you chose a
"Windows"
991 setting of
"c:\\windows" and you chose to set up a drive C
992 e.g. at
<filename>/usr/local/wine_c
</filename>, the
993 corresponding directory would be
994 <filename>/usr/local/wine_c/windows
</filename>. Make one
995 if you don't already have one.
<emphasis>No trailing slash
</emphasis> (
<emphasis>not
</emphasis>
996 <filename>C:\\windows\
</filename>)! Write access strongly
997 recommended, as Windows programs always assume write access
998 to the Windows directory!
1001 <programlisting>"System" =
"c:\\windows\\system"</programlisting>
1002 This sets up where the windows system files are. The Windows
1003 system directory should reside below the directory used for the
1004 <literal>Windows
</literal> setting.
1005 Thus when using the example above, the system directory would be
1006 <filename>/usr/local/wine_c/windows/system
</filename>.
1007 Again, no trailing slash, and write access!
1010 <programlisting>"Temp" =
"c:\\temp"</programlisting> This should
1011 be the directory you want your temp files stored in,
1012 /usr/local/wine_c/temp in our example.
1013 Again, no trailing slash, and
<emphasis>write
1017 <programlisting>"Path" =
"c:\\windows;c:\\windows\\system;c:\\blanco"</programlisting>
1018 Behaves like the
<envar>PATH
</envar> setting on UNIX
1019 boxes. When wine is run like
<userinput>wine
1020 sol.exe
</userinput>, if
<filename>sol.exe
</filename>
1021 resides in a directory specified in the
1022 <literal>Path
</literal> setting, wine will run it (Of
1023 course, if
<filename>sol.exe
</filename> resides in the
1024 current directory, wine will run that one). Make sure it
1025 always has your
<filename>windows
</filename> directory and
1026 system directory (For this setup, it must have
1027 <filename>"c:\\windows;c:\\windows\\system"</filename>).
1029 <para id=
"dirsymlinks">
1030 <programlisting>"ShowDirSymlinks" =
"1"</programlisting>
1031 Wine doesn't pass directory symlinks to Windows programs by
1032 default, as doing so may crash some programs that do
1033 recursive lookups of whole subdirectory trees
1034 whenever a directory symlink points back to itself or one of its
1036 That's why we disallowed the use of directory symlinks
1037 and added this setting to reenable (
"1") this functionality.
1038 If you
<emphasis>really
</emphasis> need Wine to take into
1039 account symlinked directories, then reenable it, but
1040 <emphasis>be prepared for crashes
</emphasis> in certain
1041 Windows programs when using the above method! (in other words:
1042 enabling it is certainly not recommended)
1047 <title>More detailed explanation about file system differences
</title>
1049 Windows uses a different (and inferior) way than Unix to describe the
1050 location of files in a computer. Thus Windows programs also expect
1051 to find this different way supported by the system.
1052 Since we intend to run Windows programs on
1053 a Unix system, we're in trouble, as we need to translate
1054 between these different file access techniques.
1057 Windows uses drive letters to describe drives or
1058 any other form of storage media and to access files on them.
1059 For example, common drive names are
1060 <filename>C:
</filename> for the main Windows system partition
1061 on the first harddisk and
<filename>A:
</filename> for the
1063 Also, Windows uses
<filename>\
</filename> (backslash) as the
1064 directory separator sign, whereas Unix uses
1065 <filename>/
</filename> (slash).
1066 Thus, an example document on the first data partition in
1067 Windows might be accessed by the name of
1068 <filename>D:\mywork\mydocument.txt
</filename>.
1071 So much for the Windows way of doing things.
1074 Well, the problem is, in Unix there is no such thing as
1075 <quote>drive letters
</quote>. Instead, Unix chose to go the
1076 much better way of having one single uniform directory tree
1077 (starting with the root directory
1078 <filename>/
</filename>), which has various storage devices
1079 such as e.g. harddisk partitions appended at various directory
1080 locations within the tree (an example would be
1081 <filename>/data1/mywork
</filename>, which is the first data
1082 partition mounted/attached to a directory called data1 in the
1083 root directory
<filename>/
</filename>; mywork is a sub
1084 directory of the data partition file system that's mounted
1085 under
<filename>/data1
</filename>).
1086 In Unix, the Windows example document mentioned above could e.g.
1087 be accessed by the name of
1088 <filename>/data1/mywork/mydocument.txt
</filename>,
1089 provided that the administrator decided to mount (attach) the first
1090 data partition at the directory /data1 inside the Unix
1091 directory tree. Note that in Unix, the administrator can
1092 <emphasis>choose
</emphasis> any custom partition location he
1093 wants (here,
<filename>/data1
</filename>), whereas in Windows the system
1094 <emphasis>selects
</emphasis> any drive letter it deems
1095 suitable for the first data partition (here,
1096 <filename>D:
</filename>), and, even worse, if there is some
1097 change in partition order, Windows automatically
1098 <emphasis>changes
</emphasis> the drive letter, and you might
1099 suddenly find yourself with a first data partition at drive
1100 letter
<filename>E:
</filename>, with all the file naming and
1101 referencing confusion that entails. Thus, the Windows way of
1102 using ever-changing drive letters is
<emphasis>clearly
1103 inferior
</emphasis> to the Unix way of assigning
1104 <emphasis>fixed
</emphasis> directory tree locations for every
1105 data storage medium.
1106 As we'll see soon, fortunately this Windows limitation of
1107 changing drive letters doesn't affect us in Wine at all, since
1108 we can properly map
<emphasis>never-changing
</emphasis> drive letters to
<emphasis>fixed
</emphasis> locations inside the Unix directory tree (and even if the location of the respective Unix directory changes, we can still simply update the Wine drive mapping to reflect the updated location and at the same time keep the original drive letter).
1111 OK, now that we know some theory about Windows and Unix drive
1112 and filename mapping, it's probably time to ask how Wine
1113 achieves the magic of mapping a Unix directory location to a
1117 Wine chose to do the following:
1118 In Wine, you don't assign some real physical storage medium
1119 (such as a harddisk partition or similar) to each drive letter
1121 Instead, you choose certain sub directory trees inside the Unix
1122 directory tree (that starts with
<filename>/
</filename>) that
1123 you would like to assign a drive letter to.
1126 Note that for every Unix sub directory tree that you intend to
1127 start Windows programs in, it is
<emphasis>absolutely
1128 required
</emphasis> to have a Wine drive mapping entry:
1131 For example, if you had a publicly writable
<quote>Windows
1132 directory space
</quote> under
<filename>/usr/mywine
</filename>, then in order to be
1133 able to access this sub directory tree from Wine, you should
1134 have a drive mapping entry that maps a certain drive letter
1135 (for example, let's take drive letter
<filename>P:
</filename>)
1136 either to
<filename>/usr/mywine
</filename> or
<filename>/usr
</filename> (to also access any directories belonging to the parent directory) or
<filename>/
</filename> (to also access any directory whatsoever on this system by this drive letter mapping). The DOS drive/directory location to access files in
<filename>/usr/mywine
</filename> <emphasis>in Wine
</emphasis> in these configuration cases would then be
<filename>P:\
</filename> or
<filename>P:\mywine
</filename> or
<filename>P:\usr\mywine
</filename>, respectively.
1140 <sect2 id=
"config-no-windows">
1141 <title>Installing Wine Without Windows
</title>
1144 A major goal of Wine is to allow users to run Windows programs
1145 without having to install Windows on their machine. Wine
1146 implements the functionality of the main DLLs usually
1147 provided with Windows. Therefore, once Wine is finished, you
1148 will not need to have Windows installed to use Wine.
1151 Wine has already made enough progress that it may be possible
1152 to run your target programs without Windows installed. If
1153 you want to try it, follow these steps:
1159 Make a symbolic link in
<filename>~/.wine/dosdevices
</filename>
1160 to the directory where you want
1161 <filename>C:
</filename> to be. Refer to the wine man page
1162 for more information. The directory to be used for emulating
1163 a
<filename>C:
</filename> drive will be
1164 the base directory for some Windows specific directories
1170 Within the directory to be used for C:, create empty
1171 <filename>windows
</filename>,
1172 <filename>windows/system
</filename>,
1173 <filename>windows/Start Menu
</filename>, and
1174 <filename>windows/Start Menu/Programs
</filename>
1175 directories. Do not point Wine to a
1176 <filename>Windows
</filename> directory full of old
1177 installations and a messy registry. (Wine creates a
1178 special registry in your
<filename >home
</filename>
1179 directory, in
<filename>$HOME/.wine/*.reg
</filename>.
1180 Perhaps you have to remove these files).
1182 mkdir -p windows windows/system windows/Start\ Menu windows/Start\ Menu/Programs
1187 Run and/or install your programs.
1193 Because Wine is not yet complete, some programs will work
1194 better with native Windows DLLs than with Wine's
1195 replacements. Wine has been designed to make this possible.
1196 Here are some tips by Juergen Schmied (and others) on how to
1197 proceed. This assumes that your
1198 <filename>C:\windows
</filename> directory in the configuration
1199 file does not point to a native Windows installation but is in
1200 a separate Unix file system. (For instance,
<quote>C:\windows
</quote> is
1201 really subdirectory
<quote>windows
</quote> located in
1202 <quote>/home/ego/wine/drives/c
</quote>).
1208 Run the program with
<parameter>WINEDEBUG=+loaddll
</parameter>
1209 to find out which files are
1210 needed. Copy the required DLLs one by one to the
1211 <filename>C:\windows\system
</filename> directory. Do not
1212 copy KERNEL/KERNEL32, GDI/GDI32, USER/USER32 or NTDLL. These
1213 implement the core functionality of the Windows API, and
1214 the Wine internal versions must be used.
1219 Edit the
<quote>[DllOverrides]
</quote> section of
1220 <filename>~/.wine/config
</filename> to specify
1221 <quote>native
</quote> before
<quote>builtin
</quote> for
1222 the Windows DLLs you want to use. For more information
1223 about this, see the Wine manpage.
1228 Note that some network DLLs are not needed even though
1229 Wine is looking for them. The Windows
1230 <filename>MPR.DLL
</filename> currently does not work; you
1231 must use the internal implementation.
1236 Copy SHELL.DLL/SHELL32.DLL, COMMDLG.DLL/COMDLG32.DLL
1237 and COMMCTRL.DLL/COMCTL32.DLL
1238 only as pairs to your Wine directory (these DLLs are
1239 <quote>clean
</quote> to use). Make sure you have these
1240 specified in the
<quote>[DllPairs]
</quote> section of
1241 <filename>~/.wine/config
</filename>.
1246 Be consistent: Use only DLLs from the same Windows version
1252 Put
<filename>regedit.exe
</filename> in the
1253 <filename>C:\windows
</filename> directory.
1254 (
<application>Office
95</application> imports a
1255 <filename>*.reg
</filename> file when it runs with an empty
1256 registry, don't know about
1257 <application>Office
97</application>).
1258 As of now, it might not be necessary any more to use
1259 regedit.exe, since Wine has its own regedit Winelib
1265 Also add
<filename>winhelp.exe
</filename> and
1266 <filename>winhlp32.exe
</filename> if you want to be able
1267 to browse through your programs' help function
1268 (or in case Wine's winhelp implementation in programs/winhelp/
1269 is not good enough, for example).
1275 <sect2 id=
"config-with-windows">
1276 <title>Installing Wine Using An Existing Windows Partition As Base
</title>
1278 Some people intend to use the data of an existing Windows partition
1279 with Wine in order to gain some better compatibility or to run already
1280 installed programs in a setup as original as possible.
1281 Note that many Windows programs assume that they have full write
1282 access to all windows directories.
1284 This means that you either have to configure the Windows
1285 partition mount point for write permission by your Wine user
1286 (see
<link linkend=
"config-drive-vfat">Dealing with FAT/VFAT partitions
</link>
1287 on how to do that), or you'll have to copy over (some parts of) the Windows
1288 partition content to a directory of a Unix partition and make
1289 sure this directory structure is writable by your user.
1290 We
<emphasis>HIGHLY DISCOURAGE
</emphasis> people from directly using a Windows partition with
1291 write access as a base for Wine!! (some programs, notably
1292 Explorer, corrupt large parts of the Windows partition in case
1293 of an incorrect setup; you've been warned).
1294 Not to mention that NTFS write support in Linux is still very
1295 experimental and
<emphasis>dangerous
</emphasis> (in case you're using an NT-based
1296 Windows version using the NTFS file system).
1297 Thus we advise you to go the Unix directory way.
1301 <sect2 id=
"config-drive-vfat">
1302 <title>Dealing With FAT/VFAT Partitions
</title>
1304 This document describes how FAT and
1305 VFAT file system permissions work in Linux
1306 with a focus on configuring them for Wine.
1310 <title>Introduction
</title>
1312 Linux is able to access DOS and Windows file systems using
1313 either the FAT (older
8.3 DOS filesystems) or VFAT (newer
1314 Windows
95 or later long filename filesystems) modules.
1315 Mounted FAT or VFAT filesystems provide the primary means
1316 for which existing programs and their data are accessed
1317 through Wine for dual boot (Linux + Windows) systems.
1320 Wine maps mounted FAT file systems, such as
1321 <filename>/c
</filename>, to drive letters, such as
1322 <quote>c:
</quote>, by means of symbolic links in the
1323 <link linkend=
"config-drive-sections"><filename>dosdevices
</filename></link>
1324 directory. Thus, in your dosdevices directory, you could type
1331 Although VFAT filesystems are preferable to FAT filesystems
1332 for their long filename support, the term
<quote>FAT
</quote>
1333 will be used throughout the remainder of this document to
1334 refer to FAT filesystems and their derivatives. Also,
1335 <quote>/c
</quote> will be used as the FAT mount point in
1336 examples throughout this document.
1339 Most modern Linux distributions either detect or allow
1340 existing FAT file systems to be configured so that they can be
1341 mounted, in a location such as
<filename>/c
</filename>,
1342 either persistently (on bootup) or on an as needed basis. In
1343 either case, by default, the permissions will probably be
1344 configured so that they look like:
1347 <prompt>~
></prompt><userinput>cd /c
</userinput>
1348 <prompt>/c
></prompt><userinput>ls -l
</userinput>
1349 <computeroutput>-rwxr-xr-x
1 root root
91 Oct
10 17:
58 autoexec.bat
1350 -rwxr-xr-x
1 root root
245 Oct
10 17:
58 config.sys
1351 drwxr-xr-x
41 root root
16384 Dec
30 1998 windows
</computeroutput>
1354 where all the files are owned by
"root", are in the
"root"
1355 group and are only writable by
"root"
1356 (
<literal>755</literal> permissions). This is restrictive in
1357 that it requires that Wine be run as root in order for
1358 programs to be able to write to any part of the
1362 There are three major approaches to overcoming the restrictive
1363 permissions mentioned in the previous paragraph:
1368 Run
<application>Wine
</application> as root
1373 Mount the FAT filesystem with less restrictive
1379 Shadow the FAT filesystem by completely or partially
1385 Each approach will be discussed in the following sections.
1390 <title>Running Wine as root
</title>
1392 Running Wine as root is the easiest and most thorough way of giving
1393 programs that Wine runs unrestricted access to FAT files systems.
1394 Running wine as root also allows programs to do things unrelated
1395 to FAT filesystems, such as listening to ports that are less than
1396 1024. Running Wine as root is dangerous since there is no limit to
1397 what the program can do to the system, so it's
<emphasis>HIGHLY DISCOURAGED
</emphasis>.
1402 <title>Mounting FAT filesystems
</title>
1404 The FAT filesystem can be mounted with permissions less restrictive
1405 than the default. This can be done by either changing the user that
1406 mounts the FAT filesystem or by explicitly changing the permissions
1407 that the FAT filesystem is mounted with. The permissions are
1408 inherited from the process that mounts the FAT filesystem. Since the
1409 process that mounts the FAT filesystem is usually a startup script
1410 running as root the FAT filesystem inherits root's permissions. This
1411 results in the files on the FAT filesystem having permissions similar
1412 to files created by root. For example:
1415 <prompt>~
></prompt><userinput>whoami
</userinput>
1416 <computeroutput>root
</computeroutput>
1417 <prompt>~
></prompt><userinput>touch root_file
</userinput>
1418 <prompt>~
></prompt><userinput>ls -l root_file
</userinput>
1419 <computeroutput></computeroutput>-rw-r--r--
1 root root
0 Dec
10 00:
20 root_file
1422 which matches the owner, group and permissions of files seen
1423 on the FAT filesystem except for the missing 'x's. The
1424 permissions on the FAT filesystem can be changed by changing
1425 root's umask (unset permissions bits). For example:
1428 <prompt>~
></prompt><userinput>umount /c
</userinput>
1429 <prompt>~
></prompt><userinput>umask
</userinput>
1430 <computeroutput>022</computeroutput>
1431 <prompt>~
></prompt><userinput>umask
073</userinput>
1432 <prompt>~
></prompt><userinput>mount /c
</userinput>
1433 <prompt>~
></prompt><userinput>cd /c
</userinput>
1434 <prompt>/c
></prompt><userinput>ls -l
</userinput>
1435 <computeroutput>-rwx---r--
1 root root
91 Oct
10 17:
58 autoexec.bat
1436 -rwx---r--
1 root root
245 Oct
10 17:
58 config.sys
1437 drwx---r--
41 root root
16384 Dec
30 1998 windows
</computeroutput>
1440 Mounting the FAT filesystem with a umask of
1441 <literal>000</literal> gives all users complete control over
1442 it. Explicitly specifying the permissions of the FAT
1443 filesystem when it is mounted provides additional control.
1444 There are three mount options that are relevant to FAT
1445 permissions:
<literal>uid
</literal>,
<literal>gid
</literal>
1446 and
<literal>umask
</literal>. They can each be specified
1447 when the filesystem is manually mounted. For example:
1450 <prompt>~
></prompt><userinput>umount /c
</userinput>
1451 <prompt>~
></prompt><userinput>mount -o uid=
500 -o gid=
500 -o umask=
002 /c
</userinput>
1452 <prompt>~
></prompt><userinput>cd /c
</userinput>
1453 <prompt>/c
></prompt><userinput>ls -l
</userinput>
1454 <computeroutput>-rwxrwxr-x
1 sle sle
91 Oct
10 17:
58 autoexec.bat
1455 -rwxrwxr-x
1 sle sle
245 Oct
10 17:
58 config.sys
1456 drwxrwxr-x
41 sle sle
16384 Dec
30 1998 windows
</computeroutput>
1459 which gives
"sle" complete control over
1460 <filename>/c
</filename>. The options listed above can be
1461 made permanent by adding them to the
1462 <filename>/etc/fstab
</filename> file:
1465 <prompt>~
></prompt><userinput>grep /c /etc/fstab
</userinput>
1466 <computeroutput>/dev/hda1 /c vfat uid=
500,gid=
500,umask=
002,exec,dev,suid,rw
1 1</computeroutput>
1469 Note that the umask of
<literal>002</literal> is common in
1470 the user private group file permission scheme. On FAT file
1471 systems this umask assures that all files are fully
1472 accessible by all users in the specified user group
1473 (
<literal>gid
</literal>).
1478 <title>Shadowing FAT filesystems
</title>
1480 Shadowing provides a finer granularity of control. Parts of
1481 the original FAT filesystem can be copied so that the
1482 program can safely work with those copied parts while
1483 the program continues to directly read the remaining
1484 parts. This is done with symbolic links. For example,
1485 consider a system where a program named
1486 <application>AnApp
</application> must be able to read and
1487 write to the
<filename>c:\windows
</filename> and
1488 <filename>c:\AnApp
</filename> directories as well as have
1489 read access to the entire FAT filesystem. On this system
1490 the FAT filesystem has default permissions which should not
1491 be changed for security reasons or can not be changed due to
1492 lack of root access. On this system a shadow directory
1493 might be set up in the following manner:
1496 <prompt>~
></prompt><userinput>cd /
</userinput>
1497 <prompt>/></prompt><userinput>mkdir c_shadow
</userinput>
1498 <prompt>/></prompt><userinput>cd c_shadow
</userinput>
1499 <prompt>/c_shadow
></prompt><userinput>ln -s /c_/* .
</userinput>
1500 <prompt>/c_shadow
></prompt><userinput>rm windows AnApp
</userinput>
1501 <prompt>/c_shadow
></prompt><userinput>cp -R /c_/{windows,AnApp} .
</userinput>
1502 <prompt>/c_shadow
></prompt><userinput>chmod -R
777 windows AnApp
</userinput>
1503 <prompt>/c_shadow
></prompt><userinput>perl -p -i -e 's|/c$|/c_shadow|g' ~/.wine/config
</userinput>
1506 The above gives everyone complete read and write access to
1507 the
<filename>windows
</filename> and
1508 <filename>AnApp
</filename> directories while only root has
1509 write access to all other directories.
1514 <sect2 id=
"config-drive-cdrom-labels">
1516 <title>Drive labels and serial numbers
</title>
1518 Wine can read drive volume labels and serial numbers directly
1519 from the device. This may be useful for many Win
9x games or
1520 for setup programs distributed on CD-ROMs that check for
1525 <title>What's Supported?
</title>
1527 <informaltable frame=
"all">
1531 <entry>File System
</entry>
1532 <entry>Types
</entry>
1533 <entry>Comment
</entry>
1538 <entry>FAT systems
</entry>
1539 <entry>hd, floppy
</entry>
1540 <entry>reads labels and serial numbers
</entry>
1543 <entry>ISO9660
</entry>
1544 <entry>cdrom
</entry>
1545 <entry>reads labels and serial numbers (not mixed-mode CDs yet!)
</entry>
1554 <title>How To Set Up?
</title>
1556 Reading labels and serial numbers just works automatically
1557 if you specify the correct symbolic links for the devices
1558 (with double colons after the drive letters) in your
1559 <link linkend=
"config-drive-sections"><filename>dosdevices
</filename></link>
1561 Note that the device has to exist and must be accessible by the user
1562 running Wine if you do this, though.
1565 If you don't want to read labels and serial numbers directly from
1566 the device, you can create files at the root of the drive
1567 named
<filename>.windows-label
</filename> and
1568 <filename>.windows-serial
</filename> respectively. These are
1569 simple ASCII files that you can create with any text editor;
1570 the label can be set to any string you like, the serial
1571 number should be expressed as an hexadecimal number.
1576 <title>Examples
</title>
1578 Here's a simple example of CD-ROM and floppy:
1581 cd ~/.wine/dosdevices
1583 ln -s /mnt/floppy a:
1592 <title>Todo / Open Issues
</title>
1595 The CD-ROM label can be read only if the data track of
1596 the disk resides in the first track and the cdrom is
1600 Support for labels/serial nums WRITING.
1603 What about reading ext2 volume label? ....
1612 <sect1 id=
"config-dll">
1613 <title>DLL configuration
</title>
1616 <title>Introduction
</title>
1618 If your programs don't work as expected, then it's often because one
1619 DLL or another is failing. This can often be resolved by changing
1620 certain DLLs from Wine built-in to native Windows DLL file and vice
1624 A very useful help to find out which DLLs are loaded as built-in and
1625 which are loaded as native Windows file can be the debug channel
1626 loaddll, activated via the environment variable
1627 <command>WINEDEBUG=+loaddll
</command>.
1632 <!-- FIXME intro!!! -->
1633 <title>Introduction To DLL Sections
</title>
1635 There are a few things you will need to know before
1636 configuring the DLL sections in your wine configuration
1640 <title>Windows DLL Pairs
</title>
1642 Most windows DLL's have a win16 (Windows
3.x) and win32
1643 (Windows
9x/NT) form. The combination of the win16 and
1644 win32 DLL versions are called the
"DLL pair". This is a
1645 list of the most common pairs:
1652 <entry>Win16
</entry>
1653 <entry>Win32
</entry>
1658 Is it possible to use native DLL with wine?
1667 <entry>KERNEL
</entry>
1668 <entry>KERNEL32
</entry>
1673 <entry>USER32
</entry>
1677 <entry>SHELL
</entry>
1678 <entry>SHELL32
</entry>
1683 <entry>GDI32
</entry>
1687 <entry>COMMDLG
</entry>
1688 <entry>COMDLG32
</entry>
1693 <entry>VERSION
</entry>
1702 <title>Different Forms Of DLL's
</title>
1704 There are a few different forms of DLL's wine can load:
1709 The DLL's that are included with windows. Many
1710 windows DLL's can be loaded in their native
1711 form. Many times these native versions work
1712 better than their non-Microsoft equivalent --
1713 other times they don't.
1717 <term>builtin
</term>
1719 The most common form of DLL loading. This is
1720 what you will use if the DLL is too system-specific
1721 or error-prone in native form (KERNEL for example),
1722 you don't have the native DLL, or you just want to be
1729 Native ELF libraries. Has became obsolete, ignored.
1735 ELF encapsulated windows DLL's.
1736 No longer used, ignored.
1744 <sect2 id=
"config-dll-overrides">
1745 <title>DLL Overrides
</title>
1748 The wine configuration file directives [DllDefaults]
1749 and [DllOverrides] are the subject of some confusion. The
1750 overall purpose of most of these directives are clear enough,
1751 though - given a choice, should Wine use its own built-in
1752 DLLs, or should it use
<filename>.DLL
</filename> files found
1753 in an existing Windows installation? This document explains
1754 how this feature works.
1758 <title>DLL types
</title>
1763 A
"native" DLL is a
<filename>.DLL
</filename> file
1764 written for the real Microsoft Windows.
1768 <term>builtin
</term>
1770 A
"built-in" DLL is a Wine DLL. These can either be a
1771 part of
<filename>libwine.so
</filename>, or more
1772 recently, in a special
<filename>.so
</filename> file
1773 that Wine is able to load on demand.
1780 <title>The [DllDefaults] section
</title>
1783 <term>DefaultLoadOrder
</term>
1785 This specifies in what order Wine should search for
1786 available DLL types, if the DLL in question was not
1787 found in the [DllOverrides] section.
1794 <title>The [DllPairs] section
</title>
1796 At one time, there was a section called [DllPairs] in the
1797 default configuration file, but this has been obsoleted
1798 because the pairing information has now been embedded into
1799 Wine itself. (The purpose of this section was merely to be
1800 able to issue warnings if the user attempted to pair
1801 codependent
16-bit/
32-bit DLLs of different types.) If you
1802 still have this in your
<filename>~/.wine/config
</filename> or
1803 <filename>wine.conf
</filename>, you may safely delete it.
1808 <title>The [DllOverrides] section
</title>
1810 This section specifies how you want specific DLLs to be
1811 handled, in particular whether you want to use
"native" DLLs
1812 or not, if you have some from a real Windows configuration.
1813 Because built-ins do not mix seamlessly with native DLLs yet,
1814 certain DLL dependencies may be problematic, but workarounds
1815 exist in Wine for many popular DLL configurations. Also see
1816 WWN's [
16]Status Page to figure out how well your favorite
1817 DLL is implemented in Wine.
1820 It is of course also possible to override these settings by
1821 explicitly using Wine's
<parameter>--dll
</parameter>
1822 command-line option (see the man page for details). Some
1823 hints for choosing your optimal configuration (listed by
1824 16/
32-bit DLL pair):
1828 <term>krnl386, kernel32
</term>
1830 Native versions of these will never work, so don't try. Leave
1831 at
<literal>builtin
</literal>.
1835 <term>gdi, gdi32
</term>
1837 Graphics Device Interface. No effort has been made at trying to
1838 run native GDI. Leave at
<literal>builtin
</literal>.
1842 <term>user, user32
</term>
1844 Window management and standard controls. It was
1845 possible to use Win95's
<literal>native
</literal>
1846 versions at some point (if all other DLLs that depend
1847 on it, such as comctl32 and comdlg32, were also run
1848 <literal>native
</literal>). However, this is no longer
1849 possible after the Address Space Separation, so leave
1850 at
<literal>builtin
</literal>.
1856 NT kernel API. Although badly documented, the
1857 <literal>native
</literal> version of this will never
1858 work. Leave at
<literal>builtin
</literal>.
1862 <term>w32skrnl
</term>
1864 Win32s (for Win3.x). The
<literal>native
</literal>
1865 version will probably never work. Leave at
1866 <literal>builtin
</literal>.
1872 Win16 support library for NT. The
1873 <literal>native
</literal> version will probably never
1874 work. Leave at
<literal>builtin
</literal>.
1880 Win16 kernel stuff. Will never work
1881 <literal>native
</literal>. Leave at
1882 <literal>builtin
</literal>.
1886 <term>display
</term>
1888 Display driver. Definitely leave at
<literal>builtin
</literal>.
1892 <term>toolhelp
</term>
1894 Tool helper routines. This is rarely a source of problems.
1895 Leave at
<literal>builtin
</literal>.
1899 <term>ver, version
</term>
1901 Versioning. Seldom useful to mess with.
1905 <term>advapi32
</term>
1907 Registry and security features. Trying the
1908 <literal>native
</literal> version of this may or may
1913 <term>commdlg, comdlg32
</term>
1915 Common Dialogs, such as color picker, font dialog,
1916 print dialog, open/save dialog, etc. It is safe to try
1917 <literal>native
</literal>.
1921 <term>commctrl, comctl32
</term>
1923 Common Controls. This is toolbars, status bars, list controls,
1924 the works. It is safe to try
<literal>native
</literal>.
1928 <term>shell, shell32
</term>
1930 Shell interface (desktop, filesystem, etc). Being one of the
1931 most undocumented pieces of Windows, you may have luck with the
1932 <literal>native
</literal> version, should you need it.
1936 <term>winsock, wsock32
</term>
1938 Windows Sockets. The
<literal>native
</literal> version
1939 will not work under Wine, so leave at
1940 <literal>builtin
</literal>.
1946 ICMP routines for wsock32. As with wsock32, leave at
1947 <literal>builtin
</literal>.
1953 The
<literal>native
</literal> version may not work due
1954 to thunking issues. Leave at
1955 <literal>builtin
</literal>.
1959 <term>lzexpand, lz32
</term>
1961 Lempel-Ziv decompression. Wine's
1962 <literal>builtin
</literal> version ought to work fine.
1966 <term>winaspi, wnaspi32
</term>
1968 Advanced SCSI Peripheral Interface. The
1969 <literal>native
</literal> version will probably never
1970 work. Leave at
<literal>builtin
</literal>.
1976 C Runtime library. The
<literal>native
</literal>
1977 version will easily work better than Wine's on this
1982 <term>winspool.drv
</term>
1984 Printer spooler. You are not likely to have more luck
1985 with the
<literal>native
</literal> version.
1991 DirectDraw/Direct3D. Since Wine does not implement the
1992 DirectX HAL, the
<literal>native
</literal> version
1993 will not work at this time.
1999 DirectInput. Running this
<literal>native
</literal>
2000 may or may not work.
2006 DirectSound. It may be possible to run this
2007 <literal>native
</literal>, but don't count on it.
2011 <term>dplay/dplayx
</term>
2013 DirectPlay. The
<literal>native
</literal> version
2014 ought to work best on this, if at all.
2018 <term>mmsystem, winmm
</term>
2020 Multimedia system. The
<literal>native
</literal>
2021 version is not likely to work. Leave at
2022 <literal>builtin
</literal>.
2026 <term>msacm, msacm32
</term>
2028 Audio Compression Manager. The
2029 <literal>builtin
</literal> version works best, if you
2030 set msacm.drv to the same.
2034 <term>msvideo, msvfw32
</term>
2036 Video for Windows. It is safe (and recommended) to try
2037 <literal>native
</literal>.
2041 <term>mcicda.drv
</term>
2043 CD Audio MCI driver.
2047 <term>mciseq.drv
</term>
2049 MIDI Sequencer MCI driver (
<filename>.MID
</filename>
2054 <term>mciwave.drv
</term>
2056 Wave audio MCI driver (
<filename>.WAV
</filename> playback).
2060 <term>mciavi.drv
</term>
2062 AVI MCI driver (
<filename>.AVI
</filename> video
2063 playback). Best to use
<literal>native
</literal>.
2067 <term>mcianim.drv
</term>
2069 Animation MCI driver.
2073 <term>msacm.drv
</term>
2075 Audio Compression Manager. Set to same as msacm32.
2079 <term>midimap.drv
</term>
2087 This is a pseudo-DLL used by Wine for thunking
2088 purposes. A
<literal>native
</literal> version of this
2096 <sect2 id=
"config-system-dlls">
2097 <title>System DLLs
</title>
2099 The Wine team has determined that it is necessary to create
2100 fake DLL files to trick many programs that check for
2101 file existence to determine whether a particular feature
2102 (such as Winsock and its TCP/IP networking) is available. If
2103 this is a problem for you, you can create empty files in the
2104 configured
<filename>c:\windows\system
</filename> directory
2105 to make the program think it's there, and Wine's built-in DLL
2106 will be loaded when the program actually asks for it.
2107 (Unfortunately,
<filename>tools/wineinstall
</filename> does
2108 not create such empty files itself.)
2111 Applications sometimes also try to inspect the version
2112 resources from the physical files (for example, to determine
2113 the DirectX version). Empty files will not do in this case,
2114 it is rather necessary to install files with complete
2115 version resources. This problem is currently being worked
2116 on. In the meantime, you may still need to grab some real
2117 DLL files to fool these apps with.
2120 And there are of course DLLs that wine does not currently
2121 implement very well (or at all). If you do not have a real
2122 Windows you can steal necessary DLLs from, you can always
2123 get some from one of the Windows DLL archive sites
2124 that can be found via internet search engine.
2125 Please make sure to obey any licenses on the DLLs you fetch...
2126 (some are redistributable, some aren't).
2130 <sect2 id=
"config-dll-missing">
2131 <title>Missing DLLs
</title>
2134 In case Wine complains about a missing DLL, you should check whether
2135 this file is a publicly available DLL or a custom DLL belonging
2136 to your program (by searching for its name on the internet).
2137 If you managed to get hold of the DLL, then you should make sure
2138 that Wine is able to find and load it.
2139 DLLs usually get loaded according to the mechanism of the
2140 SearchPath() function.
2141 This function searches directories in the following order:
2146 The directory the program was started from.
2151 The current directory.
2156 The Windows system directory.
2161 The Windows directory.
2166 The PATH variable directories.
2171 In short: either put the required DLL into your program
2172 directory (might be ugly), or usually put it into the Windows system
2173 directory. Just find out its directory by having a look at the Wine
2174 configuration file variable
"System" (which indicates the location of the
2175 Windows system directory) and the associated drive entry.
2176 Note that you probably shouldn't use NT-based native DLLs,
2177 since Wine's NT API support is somewhat weaker than its Win9x
2178 API support (thus leading to even worse compatibility with NT DLLs
2179 than with a no-windows setup!), so better use Win9x native DLLs
2180 instead or no native DLLs at all.
2184 <sect2 id=
"config-dll-windows">
2185 <title>Fetching native DLLs from a Windows CD
</title>
2188 The Linux
<command>cabextract
</command> utility can be used to
2189 extract native Windows .dll files from .cab files that are to be
2190 found on many Windows installation CDs.
2195 <sect1 id=
"config-graphics-driver">
2196 <title>Configuring the graphics driver (x11drv, ttydrv etc.)
</title>
2199 Wine currently supports several different display subsystems
2200 (graphics / text) that are available on various operating
2202 For each of these, Wine implements its own interfacing driver.
2203 This section explains how to select one of these drivers
2204 and how to further configure the respective driver.
2205 Once you're finished with that, you can consider your Wine installation
2210 The display drivers currently implemented in Wine are:
2211 x11drv, which is used for interfacing to X11 graphics
2212 (the one you'll most likely want to use) and ttydrv
2213 (used for text mode console apps mainly that don't really need
2214 any graphics output).
2215 Once you have decided which display driver to use, it is chosen
2216 with the
<literal>GraphicsDriver
</literal> option in the
2217 [wine] section of
<filename>~/.wine/config
</filename>.
2221 <title>Configuring the x11drv graphics driver
</title>
2224 <title>x11drv modes of operation
</title>
2227 The x11drv driver consists of two conceptually distinct
2228 pieces, the graphics driver (GDI part), and the windowing
2229 driver (USER part). Both of these are linked into the
2230 <filename>libx11drv.so
</filename> module, though (which you
2231 load with the
<literal>GraphicsDriver
</literal> option). In
2232 Wine, running on X11, the graphics driver must draw on
2233 drawables (window interiors) provided by the windowing
2234 driver. This differs a bit from the Windows model, where the
2235 windowing system creates and configures device contexts
2236 controlled by the graphics driver, and programs are
2237 allowed to hook into this relationship anywhere they like.
2238 Thus, to provide any reasonable tradeoff between
2239 compatibility and usability, the x11drv has three different
2245 <term>Managed
</term>
2248 The default. Specified by using the
<literal>Managed
</literal>
2249 wine configuration file option (see below).
2250 Ordinary top-level frame windows with thick borders,
2251 title bars, and system menus will be managed by your
2252 window manager. This lets these programs integrate
2253 better with the rest of your desktop, but may not
2254 always work perfectly (a rewrite of this mode of
2255 operation, to make it more robust and less patchy, is
2256 currently being done, though, and it's planned to be
2257 finished before the Wine
1.0 release).
2262 <term>Unmanaged / Normal
</term>
2265 Window manager independent (any running
2266 window manager is ignored completely). Window
2267 decorations (title bars, borders, etc) are drawn by
2268 Wine to look and feel like the real Windows. This is
2269 compatible with programs that depend on being able
2270 to compute the exact sizes of any such decorations, or
2271 that want to draw their own.
2272 Unmanaged mode is only used if both Managed and Desktop
2273 are set to disabled.
2278 <term>Desktop-in-a-Box
</term>
2281 Specified by using the
<literal>Desktop
</literal>
2282 wine configuration file option (see below).
2283 (adding a geometry, e.g.
<literal>800x600
</literal>
2284 for a such-sized desktop, or
2285 even
<literal>800x600+
0+
0</literal> to
2286 automatically position the desktop at the upper-left
2287 corner of the display). This is the mode most
2288 compatible with the Windows model. All program
2289 windows will just be Wine-drawn windows inside the
2290 Wine-provided desktop window (which will itself be
2291 managed by your window manager), and Windows
2292 programs can roam freely within this virtual
2293 workspace and think they own it all, without
2294 disturbing your other X apps.
2295 Note: currently there's one desktop window for every
2296 program; this will be fixed at some time.
2304 <title>The [x11drv] section
</title>
2308 <term>Managed
</term>
2311 Wine can let frame windows be managed by your window
2312 manager. This option specifies whether you want that
2318 <term>Desktop
</term>
2321 Creates a main desktop window of a specified size
2322 to display all Windows programs in.
2323 The size argument could e.g. be
"800x600".
2331 If you don't use DGA, you may want an alternative
2332 means to convince the mouse cursor to stay within the
2333 game window. This option does that. Of course, as with
2334 DGA, if Wine crashes, you're in trouble (although not
2335 as badly as in the DGA case, since you can still use
2336 the keyboard to get out of X).
2344 This specifies whether you want DirectDraw to use
2345 XFree86's
<firstterm>Direct Graphics
2346 Architecture
</firstterm> (DGA), which is able to
2347 take over the entire display and run the game
2348 full-screen at maximum speed. (With DGA1 (XFree86
2349 3.x), you still have to configure the X server to the
2350 game's requested bpp first, but with DGA2 (XFree86
2351 4.x), runtime depth-switching may be possible,
2352 depending on your driver's capabilities.) But be aware
2353 that if Wine crashes while in DGA mode, it may not be
2354 possible to regain control over your computer without
2355 rebooting. DGA normally requires either root
2356 privileges or read/write access to
2357 <filename>/dev/mem
</filename>.
2362 <term>DesktopDoubleBuffered
</term>
2365 Applies only if you use the
2366 <parameter>--desktop
</parameter> command-line option
2367 to run in a desktop window. Specifies whether to
2368 create the desktop window with a double-buffered
2369 visual, something most OpenGL games need to run
2375 <term>AllocSystemColors
</term>
2378 Applies only if you have a palette-based display, i.e.
2379 if your X server is set to a depth of
8bpp, and if you
2380 haven't requested a private color map. It specifies
2381 the maximum number of shared colormap cells (palette
2382 entries) Wine should occupy. The higher this value,
2383 the less colors will be available to other
2389 <term>PrivateColorMap
</term>
2392 Applies only if you have a palette-based display, i.e.
2393 if your X server is set to a depth of
8bpp. It
2394 specifies that you don't want to use the shared color
2395 map, but a private color map, where all
256 colors are
2396 available. The disadvantage is that Wine's private
2397 color map is only seen while the mouse pointer is
2398 inside a Wine window, so psychedelic flashing and
2399 funky colors will become routine if you use the mouse
2405 <term>Synchronous
</term>
2408 To be used for debugging X11 operations.
2409 If Wine crashes with an X11 error, then you should enable
2410 Synchronous mode to disable X11 request caching in order
2411 to make sure that the X11 error happens directly after
2412 the corresponding X11 call in the log file appears.
2413 Will slow down X11 output!
2418 <term>ScreenDepth
</term>
2421 Applies only to multi-depth displays. It specifies
2422 which of the available depths Wine should use (and
2423 tell Windows apps about).
2428 <term>Display
</term>
2431 This specifies which X11 display to use, and if
2432 specified, will override the
2433 <envar>DISPLAY
</envar> environment variable.
2438 <term>PerfectGraphics
</term>
2441 This option only determines whether fast X11 routines
2442 or exact Wine routines will be used for certain ROP
2443 codes in blit operations. Most users won't notice any
2453 <title>Configuring the ttydrv graphics driver
</title>
2455 Currently, the ttydrv doesn't have any special configuration
2456 options to set in the configuration file.
2462 <sect1 id=
"config-windows-versions">
2464 <title>Setting the Windows and DOS version value
</title>
2467 The windows and DOS version value a program gets e.g. by calling the
2468 Windows function GetVersion() plays a very important role:
2469 If your Wine installation for whatever reason fails to provide
2470 to your program the correct version value that it expects,
2471 then the program might assume some very bad things and fail (in
2472 the worst case even silently!).
2474 Fortunately Wine contains some more or less intelligent Windows
2475 version guessing algorithm that will try to guess the Windows
2476 version a program might expect and pass that one on to the
2479 Thus you should
<emphasis>not
</emphasis> lightly configure a version value, as this will be a
"forced" value and thus turn out to be rather harmful to proper operation. In other words: only explicitly set a Windows version value in case Wine's own version detection was unable to provide the correct Windows version and the program fails.
2483 <title>How to configure the Windows and DOS version value Wine
2484 should return
</title>
2487 The version values can be configured in the wine configuration file in
2488 the [Version] section.
2493 <term>"Windows" =
"<version string>"</term>
2496 default: none; chosen by semi-intelligent detection
2497 mechanism based on DLL environment.
2498 Used to specify which Windows version to return to
2499 programs (forced value, overrides standard detection
2500 mechanism!). Valid settings are e.g.
"win31",
"win95",
2501 "win98",
"win2k",
"winxp".
2503 <link linkend=
"config-appdefaults">AppDefaults
</link>
2504 setting (recommended/preferred use).
2509 <term>"DOS"=
"<version string>"</term>
2512 Used to specify the DOS version that should be returned
2513 to programs. Only takes effect in case Wine acts as
2514 "win31" Windows version! Common DOS version settings
2515 include
6.22,
6.20,
6.00,
5.00,
4.00,
3.30,
3.10.
2517 <link linkend=
"config-appdefaults">AppDefaults
</link>
2518 setting (recommended/preferred use).
2529 <sect1 id=
"config-scsi-support">
2530 <title>SCSI Support
</title>
2532 This file describes setting up the Windows ASPI interface.
2533 ASPI is a direct link to SCSI devices from windows programs.
2534 ASPI just forwards the SCSI commands that programs send
2535 to it to the SCSI bus.
2538 If you use the wrong SCSI device in your setup file, you can send
2539 completely bogus commands to the wrong device - An example would be
2540 formatting your hard drives (assuming the device gave you permission -
2541 if you're running as root, all bets are off).
2544 So please make sure that
<emphasis>all
</emphasis> SCSI devices not needed by the program
2545 have their permissions set as restricted as possible!
2549 <title>Windows requirements
</title>
2553 The software needs to use the
"Adaptec"
2554 compatible drivers (ASPI). At least with Mustek, they
2555 allow you the choice of using the built-in card or the
2556 "Adaptec (AHA)" compatible drivers. This will not work
2557 any other way. Software that accesses the scanner via a
2558 DOS ASPI driver (e.g. ASPI2DOS) is supported, too.
2563 You probably need a real windows install of the software
2564 to set the LUN's/SCSI id's up correctly. I'm not exactly
2572 <title>Linux requirements
</title>
2576 Your SCSI card must be supported under Linux. This will
2577 not work with an unknown SCSI card. Even for cheap'n
2578 crappy
"scanner only" controllers some special Linux
2579 drivers exist on the net.
2580 If you intend to use your IDE device, you need to use the
2583 <ulink url=
"http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html">
2584 http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html
</ulink>
2585 for ide-scsi setup instructions.
2590 Compile generic SCSI drivers into your kernel.
2595 This seems to be not required any more for newer (
2.2.x) kernels:
2596 Linux by default uses smaller SCSI buffers than Windows.
2597 There is a kernel build define
<literal>SG_BIG_BUFF
</literal> (in
2598 <filename>sg.h
</filename>) that is by default set too
2599 low. The SANE project recommends
2600 <literal>130560</literal> and this seems to work just
2601 fine. This does require a kernel rebuild.
2606 Make the devices for the scanner (generic SCSI devices)
2607 - look at the SCSI programming HOWTO at
2608 <ulink url=
"http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html">
2609 http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html
</ulink>
2610 for device numbering.
2615 I would recommend making the scanner device writable by
2616 a group. I made a group called
2617 <literal>scanner
</literal> and added myself to it.
2618 Running as root increases your risk of sending bad SCSI
2619 commands to the wrong device. With a regular user, you
2620 are better protected.
2625 For Win32 software (WNASPI32), Wine has auto-detection in place.
2626 For Win16 software (WINASPI), you need to add a SCSI device entry
2627 for your particular scanner to ~/.wine/config. The format is
2628 <literal>[scsi cCtTdD]
</literal> where
2629 <literal>"C" =
"controller"</literal>,
2630 <literal>"T" =
"target"</literal>,
<literal>D=LUN
</literal>
2633 For example, I set mine up as controller
<literal>0</literal>,
2634 Target
<literal>6</literal>, LUN
<literal>0</literal>.
2637 "Device" =
"/dev/sgi"
2639 Yours will vary with your particular SCSI setup.
2646 <title>Notes
</title>
2648 The biggest drawback is that it only works under Linux at the moment.
2649 The ASPI code has only been tested with:
2654 a Mustek
800SP with a Buslogic controller under Linux [BM]
2659 a Siemens Nixdorf
9036 with Adaptec AVA-
1505 under Linux
2660 accessed via DOSASPI. Note that I had color problems,
2661 though (barely readable result) [AM]
2666 a Fujitsu M2513A MO drive (
640MB) using generic SCSI
2667 drivers. Formatting and ejecting worked perfectly.
2668 Thanks to Uwe Bonnes for access to the hardware! [AM]
2675 <sect1 id=
"config-odbc">
2676 <title>Using ODBC
</title>
2678 This section describes how ODBC works within Wine and how to configure it.
2681 The ODBC system within Wine, as with the printing system, is designed
2682 to hook across to the Unix system at a high level. Rather than
2683 ensuring that all the windows code works under wine it uses a suitable
2684 Unix ODBC provider, such as UnixODBC. Thus if you configure Wine to
2685 use the built-in odbc32.dll, that Wine DLL will interface to your
2686 Unix ODBC package and let that do the work, whereas if you configure
2687 Wine to use the native odbc32.dll it will try to use the native
2691 <title>Using a Unix ODBC system with Wine
</title>
2693 The first step in using a Unix ODBC system with Wine is, of course,
2694 to get the Unix ODBC system working itself. This may involve
2695 downloading code or RPMs etc. There are several Unix ODBC systems
2696 available; the one the author is used to is unixODBC (with the
2697 IBM DB2 driver). Typically such systems will include a tool, such
2698 as
<command>isql
</command>, which will allow you to access the data from the command
2699 line so that you can check that the system is working.
2702 The next step is to hook the Unix ODBC library to the wine built-in
2703 odbc32 DLL. The built-in odbc32 (currently) looks to the
2704 environment variable
<emphasis>LIB_ODBC_DRIVER_MANAGER
</emphasis>
2705 for the name of the ODBC library. For example in the author's
2706 .bashrc file is the line:
2709 export LIB_ODBC_DRIVER_MANAGER=/usr/lib/libodbc.so
.1.0.0
2712 If that environment variable is not set then it looks for a
2713 library called libodbc.so and so you can add a symbolic link to
2714 equate that to your own library. For example as root you could
2718 <prompt>#
</prompt><userinput>ln -s libodbc.so
.1.0.0 /usr/lib/libodbc.so
</userinput>
2719 <prompt>#
</prompt><userinput>/sbin/ldconfig
</userinput>
2722 The last step in configuring this is to ensure that Wine is set up
2723 to run the built-in version of odbc32.dll, by modifying the DLL
2724 configuration. This built-in DLL merely acts as a stub between the
2725 calling code and the Unix ODBC library.
2728 If you have any problems then you can use WINEDEBUG=+odbc32 command
2729 before running wine to trace what is happening. One word of
2730 warning. Some programs actually cheat a little and bypass the ODBC
2731 library. For example the Crystal Reports engine goes to the registry
2732 to check on the DSN. The fix for this is documented at unixODBC's
2733 site where there is a section on using unixODBC with Wine.
2737 <title>Using Windows ODBC drivers
</title>
2739 Native ODBC drivers have been reported to work for many types of
2740 databases including MSSQL and Oracle. In fact, some like MSSQL can
2741 only be accessed on Linux through a Winelib app. Rather than
2742 just copying DLL files, most ODBC drivers require a Windows-based
2743 installer to run to properly configure things such as registry keys.
2746 In order to set up MSSQL support you will first need to download
2747 and run the mdac_typ.exe installer from microsoft.com. In order to
2748 configure your ODBC connections you must then run CLICONFG.EXE and
2749 ODBCAD32.EXE under Wine. You can find them in the windows\system
2750 directory after mdac_typ runs. Compare the output of these programs
2751 with the output on a native Windows machine. Some things, such
2752 as protocols, may be missing because they rely on being installed
2753 along with the operating system. If so, you may be able to copy
2754 missing functionality from an existing Windows installation as
2755 well as any registry values required. A native Windows installation
2756 configured to be used by Wine should work the same way it did
2760 Types successfully tested under wine:
2766 <entry>DB Type
</entry>
2767 <entry>Usefulness
</entry>
2772 <entry>MS SQL
</entry>
2779 Please report any other successes to the
2780 <ulink url=
"mailto:wine-devel@winehq.org">wine-devel
</ulink>
2788 <!-- Keep this comment at the end of the file
2791 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")