![]() |
![]()
| ![]() |
![]()
NAMExtoolwait - start X client and wait for it to map a window SYNOPSISxtoolwait [ -display display-name ] [ -timeout nseconds ] [ -mappings nwindows ] [ -pid ] [ -help ] [ -version ] command DESCRIPTIONXtoolwait notably decreases the startup time of an X session by reducing the load on the X server and the OS. Xtoolwait starts the X client command in the background. It then waits until a window is mapped on the root window and exits. Xtoolwait also exits if a time-out occurs (by default after 15 seconds), or if command exits. OPTIONS
USAGEThis 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 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. EXIT STATUSXtoolwait returns 0 if it detected the mapping of a window on the root window, and 1 otherwise. The one exception to this rule is when command exits normally before mapping a window, in which case its return value is returned. ENVIRONMENT
SEE ALSOxtoolplaces(1) NOTESXtoolwait does not propagate the -display option to command. If you use this option, you should feed it both to Xtoolwait and to command. This is intentional, so don't report this as a bug. AUTHORXtoolwait was written by Richard Huveneers <richard@hekkihek.hacom.nl>. Check out http://www.hacom.nl/~richard for more information about the author. COPYRIGHTCopyright (C) 1995-1999 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. BUGSXtoolwait tries to ignore windows that are mapped by other X clients. The method used will fail if two or more X clients are started almost simultaneously. This situation does not arise as long as all X clients are started by Xtoolwait during the X session startup.
|