2 <title>Running Wine
</title>
5 Written by &name-john-sheets;
<email>&email-john-sheets;
</email>
8 <sect1 id=
"running-wine">
9 <title>How to run Wine
</title>
11 Wine is a very complicated piece of software with many ways to
12 adjust how it runs. With very few exceptions, you can
13 activate the same set of features through the
<link
14 linkend=
"configuring">configuration file
</link> as you can
15 with command-line parameters. In this chapter, we'll briefly
16 discuss these parameters, and match them up with their
17 corresponding configuration variables.
21 You can invoke the
<command>wine --help
</command> command to
22 get a listing of all Wine's command-line parameters:
26 Usage: ./wine [options] program_name [arguments]
29 --debugmsg name Turn debugging-messages on or off
30 --dll name Enable or disable built-in DLLs
31 --dosver x.xx DOS version to imitate (e.g.
6.22)
32 Only valid with --winver win31
33 --help,-h Show this help message
34 --managed Allow the window manager to manage created windows
35 --version,-v Display the Wine version
36 --winver Version to imitate (win95,nt40,win31,nt2k,win98,nt351,win30,win20)
41 You can specify as many options as you want, if any.
42 Typically, you will want to have your configuration file set
43 up with a sensible set of defaults; in this case, you can run
44 <command>wine
</command> without explicitly listing any
45 options. In rare cases, you might want to override certain
46 parameters on the command line.
49 After the options, you should put the name of the file you
50 want
<command>wine
</command> to execute. If the executable is
51 in the
<parameter>Path
</parameter> parameter in the
52 configuration file, you can simply give the executable file
53 name. However, if the executable is not in
54 <parameter>Path
</parameter>, you must give the full path to
55 the executable (in Windows format, not UNIX format!). For
56 example, given a
<parameter>Path
</parameter> of the following:
60 "Path"=
"c:\windows;c:\windows\system;e:\;e:\test;f:\"
63 You could run the file
64 <filename>c:\windows\system\foo.exe
</filename> with:
67 <prompt>$
</prompt> <userinput>wine foo.exe
</userinput>
70 However, you would have to run the file
71 <filename>c:\myapps\foo.exe
</filename> with this command:
74 <prompt>$
</prompt> <userinput>wine c:\myapps\foo.exe
</userinput>
77 Finally, if you want to pass any parameters to your windows
78 application, you can list them at the end, just after the
79 executable name. Thus, to run the imaginary
80 <command>foo.exe
</command> Windows application with its
81 <parameter>/advanced
</parameter> mode parameter, while
82 invoking Wine in
<link
83 linkend=
"managed-parameter"><parameter>--managed
</parameter>
84 mode
</link>, you would do something like this:
87 <prompt>$
</prompt> <userinput>wine --managed foo.exe /advanced
</userinput>
90 In other words, options that affect Wine should come
91 <emphasis>before
</emphasis> the Windows program name, while
92 options that affect the Windows program should come
93 <emphasis>after
</emphasis> it.
97 <sect1 id=
"command-line-options">
98 <title>Command-Line Options
</title>
100 <sect2 id=
"config-parameter">
101 <title>--debugmsg [channels]
</title>
103 Wine isn't perfect, and many Windows applications still
104 don't run without bugs under Wine (but then, many of them
105 don't run without bugs under native Windows either!). To
106 make it easier for people to track down the causes behind
107 each bug, Wine provides a number of
<firstterm>debug
108 channels
</firstterm> that you can tap into.
111 Each debug channel, when activated, will trigger logging
112 messages to be displayed to the console where you invoked
113 <command>wine
</command>. From there you can redirect the
114 messages to a file and examine it at your leisure. But be
115 forewarned! Some debug channels can generate incredible
116 volumes of log messages. Among the most prolific offenders
117 are
<parameter>relay
</parameter> which spits out a log
118 message every time a win32 function is called,
119 <parameter>win
</parameter> which tracks windows message
120 passing, and of course
<parameter>all
</parameter> which is
121 an alias for every single debug channel that exists. For a
122 complex application, your debug logs can easily top
1 MB and
123 higher. A
<parameter>relay
</parameter> trace can often
124 generate more than
10 MB of log messages, depending on how
125 long you run the application. Logging does slow down Wine
126 quite a bit, so don't use
<parameter>--debugmsg
</parameter>
127 unless you really do want log files.
130 Within each debug channel, you can further specify a
131 <firstterm>message class
</firstterm>, to filter out the
132 different severities of errors. The four message classes
134 <simplelist type=
"inline">
135 <member><parameter>trace
</parameter></member>
136 <member><parameter>fixme
</parameter></member>
137 <member><parameter>warn
</parameter></member>
138 <member><parameter>err
</parameter></member>
142 To turn on a debug channel, use the form
143 <parameter>class+channel
</parameter>. To turn it off, use
144 <parameter>class-channel
</parameter>. To list more than one
145 channel in the same
<parameter>--debugmsg
</parameter>
146 option, separate them with commas. For example, to request
147 <parameter>warn
</parameter> class messages in the
148 <parameter>heap
</parameter> debug channel, you could invoke
149 <command>wine
</command> like this:
152 <prompt>$
</prompt> <userinput>wine --debugmsg warn+heap
<replaceable>program_name
</replaceable></userinput>
155 If you leave off the message class,
<command>wine
</command>
156 will display messages from all four classes for that channel:
159 <prompt>$
</prompt> <userinput>wine --debugmsg +heap
<replaceable>program_name
</replaceable></userinput>
162 If you wanted to see log messages for everything except the
163 relay channel, you might do something like this:
166 <prompt>$
</prompt> <userinput>wine --debugmsg +all,-relay
<replaceable>program_name
</replaceable></userinput>
169 Here is a master list of all the debug channels and classes
170 in Wine. More channels might be added to (or subtracted
171 from) later versions.
174 all accel advapi animate aspi atom avifile bitblt
175 bitmap caret cdrom class clipboard clipping combo comboex
176 comm commctrl commdlg console crtdll cursor datetime dc
177 ddeml ddraw debug debugstr delayhlp dialog dinput dll
178 dosfs dosmem dplay driver dsound edit elfdll enhmetafile
179 event exec file fixup font gdi global graphics
180 header heap hook hotkey icmp icon imagehlp imagelist
181 imm int int10 int16 int17 int19 int21 int31
182 io ipaddress joystick key keyboard ldt listbox listview
183 local mci mcianim mciavi mcicda mcimidi mciwave mdi
184 menu message metafile midi mmaux mmio mmsys mmtime
185 module monthcal mpr msacm msg msvideo nativefont nonclient
186 ntdll odbc ole opengl pager palette pidl print
187 process profile progress prop propsheet psapi psdrv ras
188 rebar reg region relay resource richedit scroll segment
189 seh selector sendmsg server setupapi setupx shell snoop
190 sound static statusbar storage stress string syscolor system
191 tab tape tapi task text thread thunk timer
192 toolbar toolhelp tooltips trackbar treeview ttydrv tweak typelib
193 updown ver virtual vxd wave win win16drv win32
194 wing wininet winsock winspool wnet x11 x11drv
197 For more details about debug channels, check out the
198 <ulink url=
"http://wine.codeweavers.com/docs/wine-devel/">
199 The Wine Developer's Guide
</ulink>.
211 <title>--dosver
</title>
218 <title>--help
</title>
224 <sect2 id=
"managed-parameter">
225 <title>--managed
</title>
232 <title>--version
</title>
239 <title>--winver
</title>
247 <!-- Keep this comment at the end of the file
250 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")