xexit v2.0 by James F. Carter, dated 1997-10-14.
Version 1.0 was by Markus Stumpf.

xexit places a window on the X desktop and waits for it to be clicked with
Button-1. Then after a confirmation, it sends the window manager protocol atoms
WM_SAVE_YOURSELF and WM_DELETE_WINDOW to any windows (on its own screen) which
will accept them.  Finally it deletes all remaining windows (except its own)
using XKillClient, and exits.

xexit would normally be the last client in a .xsession or .xinitrc file, so
that exiting signifies that the X session is finished.  It can also be used
autonomously to kill a session in the manner of xkill(1).

PREREQUISITES

You need tcl/tk v7.4/4.0 or later.  Shared libraries for tcl/tk and for X
are much better, for this program, than static linking.  

Requires X11R5 (?) or later; uses window manager protocols.  

INSTALLATION

1.  Deal with not-as-assumed places for various stuff.
	If this...	Is not in	Edit this file
    a.  tclsh		/usr/local/bin	tcl2c, #! full path name
    b.  libtcl, libtk	/usr/local/lib	Makefile, LIBS definition
    c.	libX11		/usr/X11/lib	Makefile, LIBS definition
    d.	app-defaults	/usr/X11/lib/X11 xexit.tcl, "option readfile". (See
					step 5.)

2.  In the source directory, execute "make".  (Sorry, no Imakefile.)

3.  Install the executable (xexit) where it will be on your users' PATH.
/usr/local/bin is a good place.  Remember to make it world executable (755).

4.  Install the man page (xexit.man).  /usr/local/man/man1/xexit.1 is good.
Make it world readable.  If you use cat pages, run catman, or at least, as root
do "man xexit" to create the cat page.

5.  If you want bitmaps, pick a good place for the files.  
/usr/X11R6/include/X11/bitmaps is commonly used, but commingling outside
programs with X has always seems like a bad idea to me.  
/usr/local/lib/X11/bitmaps seems like a more sanitary choice.  

6.  If you need site-wide customization, create the app-defaults file.
/usr/X11/lib/X11/app-defaults/Xexit is the compiled-in value (see step 1).  It
should contain key-value pairs such as:

Xexit*waitBitmap: /usr/local/lib/X11/bitmaps/xexit/HaveSess2.bmp
Xexit*killBitmap: /usr/local/lib/X11/bitmaps/xexit/ExitSess2.bmp

But if only you are using xexit, it makes more sense to put the customizations
in your .Xresources file.  

RESOURCE USAGE

When just sitting, xexit loads 20 Kb of program text, 1588 Kb of data
(presumably belonging to tcl/tk and/or to Xlib), and about 1200 Kb of various
shared libraries.  This is under conditions of load such that every page ever
accessed would be included in the total.  The program text and shared libraries
occur at most once per site.  But the data segment occurs once per user.  It
would mostly be nonresident under conditions of high load.  These figures are
on Intel (80686) Linux; code size would be less on other architectures, but the
data size would probably be invariant.

On i686-Linux, the executable size is 15 Kb stripped with shared libraries.
It is about 700 Kb stripped with tcl/tk statically linked (shared Xlib),
and 3.1 Mb unstripped.  

Disc space to compile: about 100 Kb.

HISTORY AND CREDITS

As late as 1994, the X11R6 distribution's contrib portion included a program
called xexit by <Markus.Stumpf@Informatik.TU-Muenchen.DE>.  This program
however disappeared from the distribution.  When the old source was recompiled
it turned out to be erratic in killing all the windows; also the -now feature
was desired, as well as the possibility of text labels.

Thus James F. Carter <jimc@math.ucla.edu> reimplemented the program using
tcl-tk.  The original code was used as a guide to doing the Xlib calls, and
the original bitmaps are included in the distribution.  One pair of bitmaps 
is by Markus Stumpf, and the cartoons are from Thomas 'TiCi' Thissen.  

MASTER SITE

The (current) master site and filename for xexit v2.0 is

	http://www.math.ucla.edu/~jimc/xexit-2.0.tgz
	ftp://ftp.math.ucla.edu    pub/jimc/xexit-2.0.tgz

MANIFEST

ExitSess1.xbm		Bitmap for killing the session (Markus Stumpf)
ExitSess2.xbm		Bitmap for killing the session (Thomas Thissen)
HaveSess1.xbm		Bitmap while waiting for exit (Markus Stumpf)
HaveSess2.xbm		Bitmap while waiting for exit (Thomas Thissen)
Makefile		Makefile
README			This file
Tcl++.cc		An object oriented wrapper for tcl core procedures
Tcl++.h			Ditto
tcl2c			Tcl script to hardwire a tcl script in a "C" program
xexit-2.0.lsm		Linux software catalog file
xexit.cc		Main program with programmatic tcl commands
xexit.man		Manual page
xexit.tcl		Tcl script for higher level user interaction.
