Fixed typo in SetGraphicsMode.
[wine/multimedia.git] / documentation / running.sgml
blob452433b106c3fa6df18e8360505ec9c5d80fa261
1 <chapter id="running">
2 <title>Running Wine</title>
4 <para>
5 Written by &name-john-sheets; <email>&email-john-sheets;</email>
6 </para>
7 <para>
8 Extended by &name-mike-hearn; <email>&email-mike-hearn;</email>, &name-eric-pouech; <email>&email-eric-pouech;</email>
9 </para>
11 <sect1 id="basic-usage">
12 <title>Basic usage: applications and control panel applets</title>
13 <para>
14 Assuming you are using a fake windows installation, you install
15 applications into Wine in the same way you would in Windows:
16 by running the installer. You can just accept the defaults
17 for where to install, most installers will default to "C:\Program Files",
18 which is fine. If the application installer requests it, you may find that
19 Wine creates icons on your desktop and in your app menu. If that happens, you
20 can start the app by clicking on them.
21 </para>
23 <para>
24 The standard way to uninstall things is for the application to provide an
25 uninstaller, usually registered with the "Add/Remove Programs" control panel
26 applet. Unfortunately as of the time of writing, Wine doesn't provide an
27 Add/Remove control panel applet, so you'll have to run the uninstall manually, either
28 from the menu or from the command line.
29 </para>
31 <para>
32 Some programs install associated control panel applets, examples of this would be
33 Internet Explorer and QuickTime. You can access the Wine control panel by running:
34 </para>
36 <screen>
37 <prompt>$</prompt> <userinput>wine control</userinput>
38 </screen>
40 <para>
41 which will open a window with the installed control panel applets in it, as in Windows.
42 </para>
44 <para>
45 If the application doesn't install menu or desktop items, you'll need to run the app
46 from the command line. Remembering where you installed to, something like:
47 </para>
49 <screen>
50 <prompt>$</prompt> <userinput>wine "c:\program files\appname\appname.exe"</userinput>
51 </screen>
53 <para>
54 will probably do the trick. The path isn't case sensitive, but remember to include the double quotes.
55 Some programs don't always use obvious naming for their directories and EXE files, so you might have
56 to look inside the program files directory to see what it put where
57 </para>
58 </sect1>
60 <sect1 id="running-wine">
61 <title>How to run Wine</title>
62 <para>
63 Wine is a very complicated piece of software with many ways to
64 adjust how it runs. With very few exceptions, you can
65 activate the same set of features through the <link
66 linkend="configuring">configuration file </link> as you can
67 with command-line parameters. In this chapter, we'll briefly
68 discuss these parameters, and match them up with their
69 corresponding configuration variables.
70 </para>
72 <para>
73 You can invoke the <command>wine --help</command> command to
74 get a listing of all Wine's command-line parameters:
75 </para>
76 <para>
77 <screen>
78 Usage: ./wine [options] program_name [arguments]
80 Options:
81 --debugmsg name Turn debugging-messages on or off
82 --dll name Enable or disable built-in DLLs
83 --help,-h Show this help message
84 --version,-v Display the Wine version
85 </screen>
86 </para>
88 <para>
89 You can specify as many options as you want, if any.
90 Typically, you will want to have your configuration file set
91 up with a sensible set of defaults; in this case, you can run
92 <command>wine</command> without explicitly listing any
93 options. In rare cases, you might want to override certain
94 parameters on the command line.
95 </para>
96 <para>
97 After the options, you should put the name of the file you
98 want <command>wine</command> to execute. If the executable is
99 in the <parameter>Path</parameter> parameter in the
100 configuration file, you can simply give the executable file
101 name. However, if the executable is not in
102 <parameter>Path</parameter>, you must give the full path to
103 the executable (in Windows format, not UNIX format!). For
104 example, given a <parameter>Path</parameter> of the following:
105 </para>
106 <screen>
107 [wine]
108 "Path"="c:\\windows;c:\\windows\\system;e:\\;e:\\test;f:\\"
109 </screen>
110 <para>
111 You could run the file
112 <filename>c:\windows\system\foo.exe</filename> with:
113 </para>
114 <screen>
115 <prompt>$</prompt> <userinput>wine foo.exe</userinput>
116 </screen>
117 <para>
118 However, you would have to run the file
119 <filename>c:\myapps\foo.exe</filename> with this command:
120 </para>
121 <screen>
122 <prompt>$</prompt> <userinput>wine c:\\myapps\\foo.exe</userinput>
123 </screen>
124 <para>
125 (note the backslash-escaped "\" !)
126 </para>
127 <para>
128 For details on running text mode (CUI) executables, read the
129 <link linkend="CUI-programs">section</link> below.
130 </para>
131 </sect1>
133 <sect1 id="command-line-options">
134 <title>Command-Line Options</title>
136 <sect2 id="config-parameter">
137 <title>--debugmsg [channels]</title>
138 <para>
139 Wine isn't perfect, and many Windows applications still
140 don't run without bugs under Wine (but then, a lot of programs
141 don't run without bugs under native Windows either!). To
142 make it easier for people to track down the causes behind
143 each bug, Wine provides a number of <firstterm>debug
144 channels</firstterm> that you can tap into.
145 </para>
146 <para>
147 Each debug channel, when activated, will trigger logging
148 messages to be displayed to the console where you invoked
149 <command>wine</command>. From there you can redirect the
150 messages to a file and examine it at your leisure. But be
151 forewarned! Some debug channels can generate incredible
152 volumes of log messages. Among the most prolific offenders
153 are <parameter>relay</parameter> which spits out a log
154 message every time a win32 function is called,
155 <parameter>win</parameter> which tracks windows message
156 passing, and of course <parameter>all</parameter> which is
157 an alias for every single debug channel that exists. For a
158 complex application, your debug logs can easily top 1 MB and
159 higher. A <parameter>relay</parameter> trace can often
160 generate more than 10 MB of log messages, depending on how
161 long you run the application. (As described in the
162 <link linkend = "config-debug-etc">Debug</link>
163 section of configuring wine you can
164 modify what the <parameter>relay</parameter> trace reports).
165 Logging does slow down Wine
166 quite a bit, so don't use <parameter>--debugmsg</parameter>
167 unless you really do want log files.
168 </para>
169 <para>
170 Within each debug channel, you can further specify a
171 <firstterm>message class</firstterm>, to filter out the
172 different severities of errors. The four message classes
173 are:
174 <simplelist type="inline">
175 <member><parameter>trace</parameter></member>
176 <member><parameter>fixme</parameter></member>
177 <member><parameter>warn</parameter></member>
178 <member><parameter>err</parameter></member>
179 </simplelist>.
180 </para>
181 <para>
182 To turn on a debug channel, use the form
183 <parameter>class+channel</parameter>. To turn it off, use
184 <parameter>class-channel</parameter>. To list more than one
185 channel in the same <parameter>--debugmsg</parameter>
186 option, separate them with commas. For example, to request
187 <parameter>warn</parameter> class messages in the
188 <parameter>heap</parameter> debug channel, you could invoke
189 <command>wine</command> like this:
190 </para>
191 <screen>
192 <prompt>$</prompt> <userinput>wine --debugmsg warn+heap <replaceable>program_name</replaceable></userinput>
193 </screen>
194 <para>
195 If you leave off the message class, <command>wine</command>
196 will display messages from all four classes for that channel:
197 </para>
198 <screen>
199 <prompt>$</prompt> <userinput>wine --debugmsg +heap <replaceable>program_name</replaceable></userinput>
200 </screen>
201 <para>
202 If you wanted to see log messages for everything except the
203 relay channel, you might do something like this:
204 </para>
205 <screen>
206 <prompt>$</prompt> <userinput>wine --debugmsg +all,-relay <replaceable>program_name</replaceable></userinput>
207 </screen>
208 <para>
209 Here is a master list of all the debug channels and classes
210 in Wine. More channels will be added to (or subtracted
211 from) later versions.
212 </para>
214 <table frame="none"><title>Debug Channels</title>
215 <tgroup cols=5 align="left">
216 <tbody>
217 <row><entry>
218 all</><entry>accel</><entry>advapi</><entry>animate</><entry>aspi</>
219 </row><row><entry>
220 atom</><entry>avifile</><entry> bitblt</><entry> bitmap</><entry> caret</>
221 </row><row><entry>
222 cdrom</><entry>class</><entry> clipboard</><entry> clipping</><entry>combo</>
223 </row><row><entry>
224 comboex</><entry> comm</><entry>commctrl</><entry>commdlg</><entry> console</>
225 </row><row><entry>
226 crtdll</><entry>cursor</><entry>datetime</><entry>dc</><entry> ddeml</>
227 </row><row><entry>
228 ddraw</><entry> debug</><entry> debugstr</><entry>delayhlp</><entry>dialog</>
229 </row><row><entry>
230 dinput</><entry>dll</><entry> dosfs</><entry>dosmem</><entry>dplay</>
231 </row><row><entry>
232 driver</><entry>dsound</><entry>edit</><entry>elfdll</><entry>enhmetafile</>
233 </row><row><entry>
234 event</><entry>exec</><entry>file</><entry>fixup</><entry>font</>
235 </row><row><entry>
236 gdi</><entry> global</><entry>graphics</><entry> header</><entry>heap</>
237 </row><row><entry>
238 hook</><entry>hotkey</><entry>icmp</><entry>icon</><entry>imagehlp</>
239 </row><row><entry>
240 imagelist</><entry> imm</><entry>int</><entry>int10</><entry>int16</>
241 </row><row><entry>
242 int17</><entry>int19</><entry>int21</><entry>int31</><entry> io</>
243 </row><row><entry>
244 ipaddress</><entry>joystick</><entry>key</><entry>keyboard</><entry>loaddll</>
245 </row><row><entry>
246 ldt</><entry>listbox</><entry>listview</><entry>local</><entry>mci</>
247 </row><row><entry>
248 mcianim</><entry>mciavi</><entry>mcicda</><entry>mcimidi</><entry>mciwave</>
249 </row><row><entry>
250 mdi</><entry>menu</><entry>message</><entry>metafile</><entry>midi</>
251 </row><row><entry>
252 mmaux</><entry>mmio</><entry>mmsys</><entry>mmtime</><entry>module</>
253 </row><row><entry>
254 monthcal</><entry>mpr</><entry>msacm</><entry>msg</><entry>msvideo</>
255 </row><row><entry>
256 nativefont</><entry>nonclient</><entry>ntdll</><entry>odbc</><entry>ole</>
257 </row><row><entry>
258 opengl</><entry>pager</><entry>palette</><entry>pidl</><entry>print</>
259 </row><row><entry>
260 process</><entry>profile</><entry>progress</><entry>prop</><entry>propsheet</>
261 </row><row><entry>
262 psapi</><entry>psdrv</><entry>ras</><entry>rebar</><entry>reg</>
263 </row><row><entry>
264 region</><entry>relay</><entry>resource</><entry>richedit</><entry>scroll</>
265 </row><row><entry>
266 segment</><entry>seh</><entry>selector</><entry>sendmsg</><entry>server</>
267 </row><row><entry>
268 setupapi</><entry>setupx</><entry>shell</><entry>snoop</><entry>sound</>
269 </row><row><entry>
270 static</><entry>statusbar</><entry>storage</><entry>stress</><entry>string</>
271 </row><row><entry>
272 syscolor</><entry>system</><entry>tab</><entry>tape</><entry>tapi</>
273 </row><row><entry>
274 task</><entry>text</><entry>thread</><entry>thunk</><entry>timer</>
275 </row><row><entry>
276 toolbar</><entry>toolhelp</><entry>tooltips</><entry>trackbar</><entry>treeview</>
277 </row><row><entry>
278 ttydrv</><entry>tweak</><entry>typelib</><entry>updown</><entry>ver</>
279 </row><row><entry>
280 virtual</><entry>vxd</><entry>wave</><entry>win</><entry>win16drv</>
281 </row><row><entry>
282 win32</><entry>winedbg</><entry>wing</><entry>wininet</><entry>winsock</>
283 </row><row><entry>
284 winspool</><entry>wnet</><entry>x11</>
285 </row>
286 </tbody>
287 </tgroup>
288 </table>
290 <para>
291 For more details about debug channels, check out the
292 <ulink url="http://wine.codeweavers.com/docs/wine-devel/">
293 The Wine Developer's Guide</ulink>.
294 </para>
295 </sect2>
297 <sect2>
298 <title>--dll</title>
299 <para>
300 Specifies whether to load the builtin or the native (if
301 available) version of a DLL.
302 Example:
303 <screen>
304 <prompt>$</prompt> <userinput>wine --dll setupx=n foo.exe</userinput>
305 </screen>
306 See the <link linkend="dll-config">DLL chapter</link> for more details.
307 </para>
308 </sect2>
310 <sect2>
311 <title>--help</title>
312 <para>
313 Shows a small command line help page.
314 </para>
315 </sect2>
317 <sect2>
318 <title>--version</title>
319 <para>
320 Shows the Wine version string. Useful to verify your installation.
321 </para>
322 </sect2>
323 </sect1>
325 <sect1 id="environment-variables">
326 <title>Setting Windows/DOS environment variables</title>
327 <para>
328 Your program might require some environment variable to be set
329 properly in order to run successfully.
330 In this case you need to set this environment variable in the
331 Linux shell, since Wine will pass on the entire shell environment
332 variable settings to the Windows environment variable space.
333 Example for the bash shell (other shells may have a different syntax
335 <screen>
336 export MYENVIRONMENTVAR=myenvironmentvarsetting
337 </screen>
338 This will make sure your Windows program can access the
339 MYENVIRONMENTVAR environment variable once you start your program
340 using Wine.
341 If you want to have MYENVIRONMENTVAR set permanently, then you can
342 place the setting into /etc/profile, or also ~/.bashrc in the case of
343 bash.
344 </para>
345 <para>
346 Note however that there is an exception to the rule:
347 If you want to change the PATH environment variable, then of
348 course you can't modify it that way, since this will alter the
349 Unix PATH environment setting. Instead, you should set the
350 WINEPATH environment variable. An alternative way to
351 indicate the content of the DOS PATH environment variable would
352 be to change the "path" setting in the wine config file's <link
353 linkend="config-wine">[wine]</link> section.
354 </para>
356 </sect1>
358 <sect1 id="CUI-programs">
359 <title>Text mode programs (CUI: Console User Interface)</title>
360 <para>Text mode programs are program which output is only made
361 out of text (surprise!). In Windows terminolgy, they are
362 called CUI (Console User Interface) executables, by opposition
363 to GUI (Graphical User Interface) executables. Win32 API
364 provide a complete set of APIs to handle this situation, which
365 goes from basic features like text printing, up to high level
366 functionnalities (like full screen editing, color support,
367 cursor motion, mouse support), going through features like
368 line editing or raw/cooked input stream support
369 </para>
370 <para>
371 Given the wide scope of features above, and the current usage
372 in Un*x world, Wine comes out with three different ways for
373 running a console program (aka a CUI executable):
374 <itemizedlist>
375 <listitem>
376 <para>bare streams</para>
377 </listitem>
378 <listitem>
379 <para>wineconsole with user backend</para>
380 </listitem>
381 <listitem>
382 <para>wineconsole with curses backend</para>
383 </listitem>
384 </itemizedlist>
385 </para>
386 <para>The names here are a bit obscure. "bare streams" means
387 that no extra support of wine is provide to map between the
388 unix console access and Windows console access. The two other
389 ways require the use of a specific Wine program (wineconsole)
390 which provide extended facilities. The following table
391 describes what you can do (and cannot do) with those three
392 ways.
393 <table>
394 <title>Basic differences in consoles</title>
395 <tgroup cols="4" align="left">
396 <thead>
397 <row>
398 <entry>Function</entry>
399 <entry>Bare streams</entry>
400 <entry>Wineconsole &amp; user backend</entry>
401 <entry>Wineconsole &amp; curses backend</entry>
402 </row>
403 </thead>
404 <tbody>
405 <row>
406 <entry>How to run (assuming executable is called foo.exe)</entry>
407 <entry><msgtext>
408 <screen><prompt>$</prompt> <userinput>wine foo.exe</userinput></screen>
409 </msgtext></entry>
410 <entry><msgtext>
411 <screen><prompt>$</prompt> <userinput>wineconsole -- --backend=user foo.exe</userinput></screen>
412 </msgtext></entry>
413 <entry><msgtext>
414 <screen><prompt>$</prompt> <userinput>wineconsole foo.exe</userinput></screen>
415 </msgtext>You can also use --backend=curses as an option</entry>
416 </row>
417 <row>
418 <entry>Good support for line oriented CUI applications
419 (which print information line after line)
420 </entry>
421 <entry>Yes</entry>
422 <entry>Yes</entry>
423 <entry>Yes</entry>
424 </row>
425 <row>
426 <entry>Good support for full screen CUI
427 applications (including but not limited to color
428 support, mouse support...)</entry>
429 <entry>No</entry>
430 <entry>Yes</entry>
431 <entry>Yes</entry>
432 </row>
433 <row>
434 <entry>Can be run even if X11 is not running</entry>
435 <entry>Yes</entry>
436 <entry>No</entry>
437 <entry>Yes</entry>
438 </row>
439 <row>
440 <entry>Implementation</entry>
441 <entry>Maps the standard Windows streams to the
442 standard Unix streams (stdin/stdout/stderr)
443 </entry>
444 <entry>
445 Wineconsole will create a new Window (hence
446 requiring the USER32 DLL is available) where all
447 information will be displayed
448 </entry>
449 <entry>
450 Wineconsole will use existing unix console
451 (from which the program is run) and with the help of
452 the (n)curses library take control of all the terminal
453 surface for interacting with the user
454 </entry>
455 </row>
456 <row>
457 <entry>Known limitations</entry>
458 <entry></entry>
459 <entry></entry>
460 <entry>
461 Will produce strange behavior if two (or more)
462 Windows consoles are used on the same Un*x terminal.
463 </entry>
464 </row>
465 </tbody>
466 </tgroup>
467 </table>
468 </para>
469 <sect2 id="CUI-programs-config">
470 <title>Configuration of CUI executables</title>
471 <para>
472 When wineconsole is used, several configuration options are
473 available. Wine (as Windows do) stores, on a per application
474 basis, several options in the registry. This let a user, for
475 example, define the default screen-buffer size he would like
476 to have for a given application.
477 </para>
478 <para>
479 As of today, only the USER backend allows you to edit those
480 options (we don't recommend editing by hand the registry
481 contents). This edition is fired when a user right click in
482 the console (this popups a menu), where you can either
483 choose from:
484 <itemizedlist>
485 <listitem>
486 <para>
487 Default: this will edit the settings shared by all
488 applications which haven't been configured yet. So,
489 when an application is first run (on your machine,
490 under your account) in wineconsole, wineconsole will
491 inherit this default settings for the
492 application. Afterwards, the application will have its
493 own settings, that you'll be able to modify at your will.
494 </para>
495 <para>
496 Properties: this will edit the application's
497 settings. When you're done, with the edition, you'll
498 be prompted whether you want to:
499 <orderedlist>
500 <listitem>
501 <para>
502 Keep these modified settings only for this
503 session (next time you run the application, you
504 will not see the modification you've just made).
505 </para>
506 </listitem>
507 <listitem>
508 <para>
509 Use the settings for this session and save them
510 as well, so that next you run your application,
511 you'll use these new settings again.
512 </para>
513 </listitem>
514 </orderedlist>
515 </para>
516 </listitem>
517 </itemizedlist>
518 </para>
519 <para>
520 Here's the list of the items you can configure, and their
521 meanings:
522 <table>
523 <title>Wineconsole configuration options</title>
524 <tgroup cols="2" align="left">
525 <thead>
526 <row>
527 <entry>Configuration option</entry>
528 <entry>Meaning</entry>
529 </row>
530 </thead>
531 <tbody>
532 <row>
533 <entry>Cursor's size</entry>
534 <entry>
535 Defines the size of the cursor. Three options are
536 available: small (33% of character height), medium
537 (66%) and large (100%)
538 </entry>
539 </row>
540 <row>
541 <entry>Popup menu</entry>
542 <entry>
543 It's been said earlier that wineconsole
544 configuration popup was triggered using a right
545 click in the console's window. However, this can
546 be an issue when the application you run inside
547 wineconsole expects the right click events to be
548 sent to it. By ticking control or shift you select
549 additional modifiers on the right click for
550 opening the popup. For example, ticking shift will
551 send events to the application when you right
552 click the window without shift being hold down,
553 and open the window when you right-click while
554 shift being hold down.
555 </entry>
556 </row>
557 <row>
558 <entry>Quick edit</entry>
559 <entry>
560 This tick box lets you decide whether left-click
561 mouse events shall be interpreted as events to be
562 sent to the underlying application (tick off) or
563 as a selection of rectangular part of the screen
564 to be later on copied onto the clipboard (tick on).
565 </entry>
566 </row>
567 <row>
568 <entry>History</entry>
569 <entry>
570 This lets you pick up how many commands you want
571 the console to recall. You can also drive whether
572 you want, when entering several times the same
573 command - potentially intertwened with others -
574 whether you want to store all of them (tick off)
575 or only the last one (tick on).
576 </entry>
577 </row>
578 <row>
579 <entry>Police</entry>
580 <entry>
581 The Police property sheet allows you to pick the
582 default font for the console (font file, size,
583 background and foreground color).
584 </entry>
585 </row>
586 <row>
587 <entry>Screenbuffer &amp; window size</entry>
588 <entry>
589 The console as you see it is made of two different
590 parts. On one hand there's the screenbuffer which
591 contains all the information your application puts
592 on the screen, and the window which displays a
593 given area of this screen buffer. Note that the
594 window is always smaller or of the same size than
595 the screen buffer. Having a stricly smaller window
596 size will put on scrollbars on the window so that
597 you can see the whole screenbuffer's content.
598 </entry>
599 </row>
600 <row>
601 <entry>Close on exit</entry>
602 <entry>
603 If it's ticked, then the wineconsole will exit
604 when the application within terminates. Otherwise,
605 it'll remain opened until the user manually closes
606 it: this allows seeing the latest information of a
607 program after it has terminated.
608 </entry>
609 </row>
610 <row>
611 <entry>Edition mode</entry>
612 <entry>
613 <msgtext>
614 <para>
615 When the user enter commands, he or she can
616 choose between several edition modes:
617 <itemizedlist>
618 <listitem>
619 <para>
620 Emacs: the same keybindings as under
621 emacs are available. For example, Ctrl-A
622 will bring the cursor to the beginning
623 of the edition line. See your emacs
624 manual for the details of the commands.
625 </para>
626 </listitem>
627 <listitem>
628 <para>
629 Win32: this are the standard Windows
630 console key-bindings (mainly using
631 arrows).
632 </para>
633 </listitem>
634 </itemizedlist>
635 </para>
636 </msgtext>
637 </entry>
638 </row>
639 </tbody>
640 </tgroup>
641 </table>
642 </para>
643 </sect2>
644 </sect1>
645 </chapter>
647 <!-- Keep this comment at the end of the file
648 Local variables:
649 mode: sgml
650 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")
651 End: