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
37 (win95,nt40,win31,nt2k,win98,nt351,win30,win20)
42 You can specify as many options as you want, if any.
43 Typically, you will want to have your configuration file set
44 up with a sensible set of defaults; in this case, you can run
45 <command>wine</command> without explicitly listing any
46 options. In rare cases, you might want to override certain
47 parameters on the command line.
50 After the options, you should put the name of the file you
51 want <command>wine</command> to execute. If the executable is
52 in the <parameter>Path</parameter> parameter in the
53 configuration file, you can simply give the executable file
54 name. However, if the executable is not in
55 <parameter>Path</parameter>, you must give the full path to
56 the executable (in Windows format, not UNIX format!). For
57 example, given a <parameter>Path</parameter> of the following:
61 "Path"="c:\windows;c:\windows\system;e:\;e:\test;f:\"
64 You could run the file
65 <filename>c:\windows\system\foo.exe</filename> with:
68 <prompt>$</prompt> <userinput>wine foo.exe</userinput>
71 However, you would have to run the file
72 <filename>c:\myapps\foo.exe</filename> with this command:
75 <prompt>$</prompt> <userinput>wine c:\myapps\foo.exe</userinput>
78 Finally, if you want to pass any parameters to your windows
79 application, you can list them at the end, just after the
80 executable name. Thus, to run the imaginary
81 <command>foo.exe</command> Windows application with its
82 <parameter>/advanced</parameter> mode parameter, while
83 invoking Wine in <link
84 linkend="managed-parameter"><parameter>--managed</parameter>
85 mode</link>, you would do something like this:
88 <prompt>$</prompt> <userinput>wine --managed foo.exe /advanced</userinput>
91 In other words, options that affect Wine should come
92 <emphasis>before</emphasis> the Windows program name, while
93 options that affect the Windows program should come
94 <emphasis>after</emphasis> it.
98 If you want to run a console program (aka a CUI executable), use
99 <command>wineconsole</command> instead of <command>wine</command>
100 to start it. It will display the program in a separate Window
101 (this requires X11 to be run). If you don't, you'll still be able
102 to run able your program, in the Unix console were you're started
103 your program, but with very limited capacities (so, your program
104 might work, but your mileage may vary). This shall be improved
109 <sect1 id="command-line-options">
110 <title>Command-Line Options</title>
112 <sect2 id="config-parameter">
113 <title>--debugmsg [channels]</title>
115 Wine isn't perfect, and many Windows applications still
116 don't run without bugs under Wine (but then, many of them
117 don't run without bugs under native Windows either!). To
118 make it easier for people to track down the causes behind
119 each bug, Wine provides a number of <firstterm>debug
120 channels</firstterm> that you can tap into.
123 Each debug channel, when activated, will trigger logging
124 messages to be displayed to the console where you invoked
125 <command>wine</command>. From there you can redirect the
126 messages to a file and examine it at your leisure. But be
127 forewarned! Some debug channels can generate incredible
128 volumes of log messages. Among the most prolific offenders
129 are <parameter>relay</parameter> which spits out a log
130 message every time a win32 function is called,
131 <parameter>win</parameter> which tracks windows message
132 passing, and of course <parameter>all</parameter> which is
133 an alias for every single debug channel that exists. For a
134 complex application, your debug logs can easily top 1 MB and
135 higher. A <parameter>relay</parameter> trace can often
136 generate more than 10 MB of log messages, depending on how
137 long you run the application. Logging does slow down Wine
138 quite a bit, so don't use <parameter>--debugmsg</parameter>
139 unless you really do want log files.
142 Within each debug channel, you can further specify a
143 <firstterm>message class</firstterm>, to filter out the
144 different severities of errors. The four message classes
146 <simplelist type="inline">
147 <member><parameter>trace</parameter></member>
148 <member><parameter>fixme</parameter></member>
149 <member><parameter>warn</parameter></member>
150 <member><parameter>err</parameter></member>
154 To turn on a debug channel, use the form
155 <parameter>class+channel</parameter>. To turn it off, use
156 <parameter>class-channel</parameter>. To list more than one
157 channel in the same <parameter>--debugmsg</parameter>
158 option, separate them with commas. For example, to request
159 <parameter>warn</parameter> class messages in the
160 <parameter>heap</parameter> debug channel, you could invoke
161 <command>wine</command> like this:
164 <prompt>$</prompt> <userinput>wine --debugmsg warn+heap <replaceable>program_name</replaceable></userinput>
167 If you leave off the message class, <command>wine</command>
168 will display messages from all four classes for that channel:
171 <prompt>$</prompt> <userinput>wine --debugmsg +heap <replaceable>program_name</replaceable></userinput>
174 If you wanted to see log messages for everything except the
175 relay channel, you might do something like this:
178 <prompt>$</prompt> <userinput>wine --debugmsg +all,-relay <replaceable>program_name</replaceable></userinput>
181 Here is a master list of all the debug channels and classes
182 in Wine. More channels might be added to (or subtracted
183 from) later versions.
186 <table frame="none"><title>Debug Channels</title>
187 <tgroup cols=5 align="left">
190 all</><entry>accel</><entry>advapi</><entry>animate</><entry>aspi</>
192 atom</><entry>avifile</><entry> bitblt</><entry> bitmap</><entry> caret</>
194 cdrom</><entry>class</><entry> clipboard</><entry> clipping</><entry>combo</>
196 comboex</><entry> comm</><entry>commctrl</><entry>commdlg</><entry> console</>
198 crtdll</><entry>cursor</><entry>datetime</><entry>dc</><entry> ddeml</>
200 ddraw</><entry> debug</><entry> debugstr</><entry>delayhlp</><entry>dialog</>
202 dinput</><entry>dll</><entry> dosfs</><entry>dosmem</><entry>dplay</>
204 driver</><entry>dsound</><entry>edit</><entry>elfdll</><entry>enhmetafile</>
206 event</><entry>exec</><entry>file</><entry>fixup</><entry>font</>
208 gdi</><entry> global</><entry>graphics</><entry> header</><entry>heap</>
210 hook</><entry>hotkey</><entry>icmp</><entry>icon</><entry>imagehlp</>
212 imagelist</><entry> imm</><entry>int</><entry>int10</><entry>int16</>
214 int17</><entry>int19</><entry>int21</><entry>int31</><entry> io</>
216 ipaddress</><entry>joystick</><entry>key</><entry>keyboard</><entry>loaddll</>
218 ldt</><entry>listbox</><entry>listview</><entry>local</><entry>mci</>
220 mcianim</><entry>mciavi</><entry>mcicda</><entry>mcimidi</><entry>mciwave</>
222 mdi</><entry>menu</><entry>message</><entry>metafile</><entry>midi</>
224 mmaux</><entry>mmio</><entry>mmsys</><entry>mmtime</><entry>module</>
226 monthcal</><entry>mpr</><entry>msacm</><entry>msg</><entry>msvideo</>
228 nativefont</><entry>nonclient</><entry>ntdll</><entry>odbc</><entry>ole</>
230 opengl</><entry>pager</><entry>palette</><entry>pidl</><entry>print</>
232 process</><entry>profile</><entry>progress</><entry>prop</><entry>propsheet</>
234 psapi</><entry>psdrv</><entry>ras</><entry>rebar</><entry>reg</>
236 region</><entry>relay</><entry>resource</><entry>richedit</><entry>scroll</>
238 segment</><entry>seh</><entry>selector</><entry>sendmsg</><entry>server</>
240 setupapi</><entry>setupx</><entry>shell</><entry>snoop</><entry>sound</>
242 static</><entry>statusbar</><entry>storage</><entry>stress</><entry>string</>
244 syscolor</><entry>system</><entry>tab</><entry>tape</><entry>tapi</>
246 task</><entry>text</><entry>thread</><entry>thunk</><entry>timer</>
248 toolbar</><entry>toolhelp</><entry>tooltips</><entry>trackbar</><entry>treeview</>
250 ttydrv</><entry>tweak</><entry>typelib</><entry>updown</><entry>ver</>
252 virtual</><entry>vxd</><entry>wave</><entry>win</><entry>win16drv</>
254 win32</><entry>winedbg</><entry>wing</><entry>wininet</><entry>winsock</>
256 winspool</><entry>wnet</><entry>x11</>
263 For more details about debug channels, check out the
264 <ulink url="http://wine.codeweavers.com/docs/wine-devel/">
265 The Wine Developer's Guide</ulink>.
277 <title>--dosver</title>
284 <title>--help</title>
290 <sect2 id="managed-parameter">
291 <title>--managed</title>
298 <title>--version</title>
305 <title>--winver</title>
313 <!-- Keep this comment at the end of the file
316 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")