README
1
2 *** Xtoolwait 1.3 ***
3
4 Richard Huveneers <richard@hekkihek.hacom.nl>
5
6This utility notably decreases the startup time of your X sessions, provided
7that you start a number of X clients automatically during the X session
8startup.
9Most people, for instance, start X clients like xterm, xclock, xconsole and
10xosview from their .xinitrc, .openwin-init, .xtoolplaces or .xsession file.
11
12These X clients are started simultaneously (in the background) which puts a
13high load on the X server and the OS:
14
15* The X server is not multi-threaded, so all X clients are competing to get
16 access to the X server and to use its resources, which causes a lot of
17 overhead (= delay).
18
19* The performance of other (non X related) tasks served by the system degrades
20 badly due to the high load.
21 If the system has not enough RAM to hold all the X clients, it is swapping
22 heavily, resulting again in a lot of delay.
23
24On the Sun platform there is a utility called 'toolwait' which solves these
25problems: it starts one X client in the background, waits until it has mapped
26a window and then exits.
27
28Xtoolwait is a free implementation of exactly the same idea.
29
30HISTORY
31
32 Of course I first looked around if somebody else already wrote a
33 similar utility. I first stumbled upon this simple, but useless, shell
34 script:
35
36 #!/bin/sh
37 ${1+"$@"}&
38
39 Then I found 'toolwait-0.9' written by Brandon S. Allbery. His program
40 relies on the XView libraries to receive events from the X server. For
41 some reason this method fails to detect about 50% of the X events,
42 resulting in an equal amount of time-outs.
43
44 So I decided to write Xtoolwait. The result is this small, clean
45 utility which only uses standard Xlib calls and works 100% for me.
46
47 After releasing Xtoolwait 0.1, someone told me about xrunclient, which
48 is included in the MIT X11 distribution. Since both utilities share
49 the same goal, I would probably not have bothered to write Xtoolwait
50 if I had known of xrunclient before.
51 So, why should you use Xtoolwait instead of xrunclient? Simply because
52 Xtoolwait does the job much better, as is readily shown by timing the
53 startup of X clients like xterm.
54
55SUPPORTED PLATFORMS
56
57 This list is far from complete. I expect Xtoolwait to run under _any_
58 operating system, X11 release and window manager.
59 If you are using Xtoolwait under an unlisted operating system, X11
60 release or window manager, please let me know.
61
62 Xtoolwait is known to work on these platforms:
63
64 Operating system: Linux 1.x, 2.x
65 Ultrix 4.4
66 DEC OSF/1 3.0
67 Solaris 2.4
68 SunOS 4.1.x
69 SGI IRIX 5.2
70
71 X11 release: X11R5
72 X11R6
73 X11R6.1
74
75 Window manager: olvwm 4
76 olwm (version?)
77 tvtwm R5.7
78 twm R6
79 fvwm 1.23b
80 fvwm2
81 kwm v0.11
82
83INSTALLATION
84
85 Installing Xtoolwait is very easy:
86
87 xmkmf
88 make
89 make install
90 make install.man
91
92USAGE
93
94 This is the relevant part of my own .xinitrc file, showing the
95 proper use of xtoolwait:
96
97 #
98 # Startup the window manager first
99 #
100 olvwm & wmpid=$!
101 #
102 # Restore desktop settings
103 # Do _not_ put xtoolwait in the background
104 #
105 xtoolwait -mappings 2 contool -Wp 30 30 -Ws 575 246 -WP 3 533 -Wi
106 xtoolwait xeyes -geom 77x60+640+107
107 xtoolwait ansi_xterm -geom 80x24+22+11
108 xtoolwait clock -Wp 90 90 -Ws 150 150 -WP 733 110 -Wi
109 #
110 # Wait for the window manager
111 #
112 wait $wmpid
113
114 Note that the window manager must be started first. Xtoolwait depends
115 on it to detect window mappings. The first instance of Xtoolwait will
116 wait until both the window manager and the X client have finished
117 their initialization.
118
119 Note also that the first Xtoolwait uses the -mappings option to
120 detect the virtual desktop window, which is mapped by virtual window
121 managers. Omit this option if you use a non-virtual window manager.
122
123 Do not put Xtoolwait in the background with an '&'. When Xtoolwait
124 detects a window mapping it will put the X client in the background
125 and exit.
126
127 Xtoolwait has a few options. Examine the manual page (man xtoolwait)
128 after the installation.
129
130COPYRIGHT
131
132 Copyright (C) 1995-1999 Richard Huveneers <richard@hekkihek.hacom.nl>
133 Xtoolwait is released under the GNU General Public License.
134 The full copyright notice is stated at the start of the source code.
135
136SUPPORT
137
138 Support for Xtoolwait has been integrated in the official distribution
139 of Xtoolplaces. Using the -w option of Xtoolplaces, saved desktop
140 configurations will automatically be restored using Xtoolwait.
141
142 Xtoolplaces is written by Adam Stein <adam@iset.scan.mc.xerox.com>
143 and is available at
144 http://www.csh.rit.edu/~adam/Progs/programs.html
145
146 New releases of Xtoolwait will be available at
147 http://www.hacom.nl/~richard/software/xtoolwait.html
148
149Enjoy,
150
151Richard Huveneers
152<richard@hekkihek.hacom.nl>
153