
			  *** Xtoolwait 0.1 ***

		Richard Huveneers <richard@hekkihek.hacom.nl>

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.

So, I wanted a toolwait program for Linux too!
And I found one, included with my Slackware (2.1) distribution, which didn't
cure any of the above problems. I soon discovered that it was just a simple
shell script consisting of only these two lines:

#!/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, guided by Brandon's source code.
The result is this small, clean utility which only uses standard Xlib calls
and works 100% for me.
I think it's a perfect clone of Sun's toolwait.

INSTALLATION

	Installing Xtoolwait is very easy:

	xmkmf
	make
	make install
	make install.man

USAGE

	Basically, just prepend 'xtoolwait' to the command to start your
	X client. For instance, use 'xtoolwait xterm -geometry 100x37' instead
	of 'xterm -geometry 100x37 &'.

	Xtoolwait has a few options. Examine the manual page (man xtoolwait)
	after the installation.

COPYRIGHT

	Copyright (C) 1995  Richard Huveneers <richard@hekkihek.hacom.nl>
	Xtoolwait is released under the GNU General Public License.
	The full copyright notice is stated at the start of the source code.

SUPPORT

A friend of mine, Peter Bollerman <bollerma@math.ruu.nl>, has added support
for Xtoolwait to Xtoolplaces 1.3p3, in such a way that saved desktop
configurations will automatically be restored using Xtoolwait.

He also fixed the bug that causes a segmentation fault on ELF systems!

With Peter's permission, I have included his patch in this distribution.
To install his patch, you need the source code of Xtoolplaces 1.3p3, which is
not included in this distribution. Read the manual page after applying the
patch, in particular the description of the -w option.

Enjoy,

Richard Huveneers
<richard@hekkihek.hacom.nl>
