Jitterbug no more.
[fvwm.git] / doc / commands / Exec.xml
blobe3337521364e72920fef0dcc1de3788c1ff0a353
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3   "../docbook-xml/docbookx.dtd"
5 <!ENTITY % myents SYSTEM "../fvwm.ent" >
6 %myents;
7 ]>
9 <!-- $Id: Exec.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->
11 <section id='Exec'>
12 <title>Exec</title>
14 <cmdsynopsis>
15         <command>Exec</command
16         ><arg choice='plain'
17                 ><replaceable>command</replaceable
18         ></arg>
19 </cmdsynopsis>
21 <para>Executes
22 <replaceable>command</replaceable>.
23 You should not use an ampersand '&amp;' at the end of the command. You
24 probably want to use an additional "exec" at the beginning of
25 <replaceable>command</replaceable>.
26 Without that, the shell that fvwm invokes to run your command
27 stays until the command exits.  In effect, you'll have twice as
28 many processes running as you need.  Note that some shells are
29 smart enough to avoid this, but it never hurts to include the
30 "exec" anyway.</para>
32 <para>The following example binds function key
33 <keysym>F1</keysym>
34 in the root window, with no modifiers, to the exec function. The
35 program rxvt is started with an assortment of options.</para>
38 <programlisting>
39 <fvwmref cmd="Key"/> F1 R N Exec exec rxvt -fg yellow -bg blue \
40   -e /bin/tcsh
41 </programlisting>
43 <para>Note that this function doesn't wait for
44 <replaceable>command</replaceable>
45 to complete, so things like:</para>
47 <programlisting>
48 Exec "echo <fvwmref cmd="AddToMenu"/> ... &gt; /tmp/file"
49 <fvwmref cmd="Read"/> /tmp/file
50 </programlisting>
52 <para>do not work reliably
53 (see the
54 <fvwmref cmd="PipeRead"/>
55 command).</para>
58 </section>