~sbalneav/ltsp/xexit

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
.TH "xexit" "1" 20110328
.SH "NAME" 
exit \(em execute a program on loss of X display.

.SH "SYNOPSIS" 
.PP 
\fBxexit\fR <PROGRAM>

.SH "DESCRIPTION" 
.PP 
\fBxexit\fR spawns a thread that checks to see if the X display is still
functioning.  On the loss of the X display, \fBxexit\fR will execute PROGRAM.
.PP
The intended use of \fBxexit\fR is within LTSP environments, to clean up poorly
written applications that don't properly exit on the termination of the
session, or to clean up after a user has improperly logged out.
.PP
You can, via xatoms, cause the program to "die" and execute it's
script without ending the session, by setting an Xprop:
.PP
xprop -root -f LTSP_XEXIT 8s -set LTSP_XEXIT "DIE"
.PP
If you want the program to exit WITHOUT executing the program:
.PP
xprop -root -f LTSP_XEXIT 8s -set LTSP_XEXIT "EXIT"
.PP
By default, xexit ships with a shell script called \fBEndXSession\fR, which
will look for all scripts in \fB/etc/Xexit.d\fR and execute them.  By naming
the scripts with the usual convention of <number><name>, one can dictate the
order in which the scripts run.
.PP
Note that the scripts are sourced with . so you must make sure that
\fBexit\fR isn't called within the script, and that the scripts return true.

.SH "SEE ALSO" 
.PP 
\fBxprop\fP\fB(1)\fP 

.SH "AVAILABILITY" 
.PP 
The latest version of \fBxexit\fR is available in source form from
\fIhttps://code.launchpad.net/~sbalneav/ltsp/xexit\fR.

.SH "MAN PAGE AUTHOR" 
.PP 
Copyright 2011 Scott Balneaves <sbalneav@ltsp.org>, distributed under
the terms of the GNU General Public License version 2 or any later version.