README
1# README for xcmd
2# created 30-May-1997 jmk
3# autodate: 1998-Mar-26
4# autotime: 22:53
5
6DESCRIPTION:
7
8Xcmd is a front-end for starting programs under X11. You can tell xcmd
9to look for a window with a specific class, resource name, or title
10string (using the `--find-<property>' options); if it finds one or
11more, xcmd will `raise' them, otherwise it will run the command you
12specify. You can tell xcmd to run commands that create their own
13windows (using `--xcmd'), or to run commands inside a terminal window
14(using `--cmd') with various options.
15
16
17CHANGES:
18
19 * Revision 1.8 1998/03/27 03:47:33 jmknoble
20 * bugfix: execl() wasn't getting called with NULL as last argument
21 * (how did it ever work?).
22 *
23 * Revision 1.7 1998/01/04 03:54:56 jmknoble
24 * Moved log to bottom of file. Updated spec file for use with
25 * rpm-2.3.9 and later.
26 *
27 * Revision 1.6 1998/01/04 03:53:52 jmknoble
28 * Some window managers (notably WindowMaker) create and destroy
29 * icon windows on the fly, and so if we've deiconified a window, and then
30 * we encounter its window id further down the list of the root window's
31 * children, we get BadWindow errors. Therefore, we install our own
32 * X error handler to ignore the error and keep processing.
33 * Also, now we default to raising the window only instead of
34 * iconifying it, then raising.
35 * Minor code reformatting.
36 *
37 * Revision 1.5 1997/08/11 05:21:13 jmknoble
38 * added command-line options to choose whether to
39 * iconify-and-raise or raise-only when we
40 * find a window; added environment variable
41 * to specify same behavior.
42
43
44NOTES:
45
46Xcmd requires X11R6 and a functioning Imake to build properly. You
47might be able to build it on X11R5 by hacking the Imakefile a bit; if
48you manage to, please send me patches and tell me what you did, and
49i'll try to integrate them into the source. Also, i have only tested
50xcmd on Linux-2.0.x on an i586 machine. Your mileage may vary.
51
52
53INSTALLING:
54
55For purists, untar and then:
56
57 cd ./xcmd-1.8
58 more README
59 xmkmf -a
60 make
61 make install
62 make install.man
63
64For Red Hat Linux users and RPM junkies, there's a .spec file included
65in the tarball which you can use to build a binary RPM if you have
66rpm-2.3.9 or later:
67
68 su
69 rpm -tb xcmd-1.8.tar.gz
70
71You can then install the binary RPM normally on your system. This is
72the recommended method of installation.
73
74
75SYNTAX:
76
77 xcmd version 1.8
78
79 usage: xcmd [options] {--cmd | --xcmd} <command>
80
81 execute <command>, with the option of finding and raising a prior
82 instance instead of running a new one. if `--cmd' is specified,
83 execute <command> in a terminal window; if `--xcmd' is specified,
84 execute <command> in its own window.
85
86 general options:
87 -c or --cmd <command> command to run in a terminal window
88 -d or --display <display> X display to use
89 -h or --help print this help
90 -x or --xcmd <command> command to run in its own window
91
92 find options:
93 -fc or --find-class <text> class of window to raise
94 -fr or --find-resource <text> resource name of window to raise
95 -fs or --find-substr <text> title-substring to raise
96 -ft or --find-title <text> title of window to raise
97
98 terminal window options (for --cmd):
99 -t or --title <text> title of window
100 -i or --icon <text> title of icon
101 -n or --name <text> name to retrieve resources under
102 -g or --geometry <geometry> geometry of terminal window
103 -s or --scroll display scrollbar in terminal window
104 +s or +scroll no scrollbar in terminal window
105 -o or --opt <options> options to pass to terminal program
106 -rt or --rxvt use rxvt as terminal program
107 -xt or --xterm use xterm as terminal program
108
109 raise options:
110 -ir or --iconify-and-raise first iconify, then raise windows we find
111 -or or --only-raise only raise windows we find (default)
112
113 environment variables:
114 XCMD_TERM (default terminal program to use; `xterm' if not set)
115 XCMD_ICONIFY (`0'/`no'/`false' => only raise windows we find [default];
116 `1'/`yes'/`true' => iconify window, then raise)
117
118
119TECHNICAL NOTES:
120
121Xcmd uses an execl(3) call to run `/bin/sh -c exec <command>', so that
122<command> inherits xcmd's process ID. Xcmd runs in the foreground by
123default; use your favorite shell's regular syntax to start xcmd in the
124background (e.g., `xcmd --find-title vi --cmd vi &' for
125Bourne-compatible shells).
126
127
128AUTHOR:
129
130Jim Knoble <jmknoble@pobox.com>
131Copyright � 1997,1998 Jim Knoble
132
133Xcmd is very loosely derived from portions of xwit by Mark Martin and
134David DiGiacomo and xwininfo by Mark Lillibridge. Almost none of the
135original code remains.
136
137Distributed under the GNU General Public License (GPL). See
138ftp://prep.ai.mit.edu/pub/gnu/COPYING for more details.
139
140# -------- End of document --------
141