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