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