10
by Scott Balneaves
Added manpages, and did a bit of cleanup |
1 |
.TH "xexit" "1" 20110328 |
2 |
.SH "NAME" |
|
3 |
exit \(em execute a program on loss of X display. |
|
4 |
||
5 |
.SH "SYNOPSIS" |
|
6 |
.PP
|
|
7 |
\fBxexit\fR <PROGRAM> |
|
8 |
||
9 |
.SH "DESCRIPTION" |
|
10 |
.PP
|
|
11 |
\fBxexit\fR spawns a thread that checks to see if the X display is still |
|
12 |
functioning. On the loss of the X display, \fBxexit\fR will execute PROGRAM. |
|
13 |
.PP
|
|
14 |
The intended use of \fBxexit\fR is within LTSP environments, to clean up poorly |
|
15 |
written applications that don't properly exit on the termination of the |
|
16 |
session, or to clean up after a user has improperly logged out. |
|
17 |
.PP
|
|
18 |
You can, via xatoms, cause the program to "die" and execute it's |
|
19 |
script without ending the session, by setting an Xprop: |
|
20 |
.PP
|
|
21 |
xprop -root -f LTSP_XEXIT 8s -set LTSP_XEXIT "DIE" |
|
22 |
.PP
|
|
23 |
If you want the program to exit WITHOUT executing the program: |
|
24 |
.PP
|
|
25 |
xprop -root -f LTSP_XEXIT 8s -set LTSP_XEXIT "EXIT" |
|
26 |
.PP
|
|
27 |
By default, xexit ships with a shell script called \fBEndXSession\fR, which |
|
28 |
will look for all scripts in \fB/etc/Xexit.d\fR and execute them. By naming |
|
29 |
the scripts with the usual convention of <number><name>, one can dictate the |
|
30 |
order in which the scripts run. |
|
31 |
.PP
|
|
32 |
Note that the scripts are sourced with . so you must make sure that |
|
33 |
\fBexit\fR isn't called within the script, and that the scripts return true. |
|
34 |
||
35 |
.SH "SEE ALSO" |
|
36 |
.PP
|
|
37 |
\fBxprop\fP\fB(1)\fP |
|
38 |
||
39 |
.SH "AVAILABILITY" |
|
40 |
.PP
|
|
41 |
The latest version of \fBxexit\fR is available in source form from |
|
42 |
\fIhttps://code.launchpad.net/~sbalneav/ltsp/xexit\fR. |
|
43 |
||
44 |
.SH "MAN PAGE AUTHOR" |
|
45 |
.PP
|
|
46 |
Copyright 2011 Scott Balneaves <sbalneav@ltsp.org>, distributed under |
|
47 |
the terms of the GNU General Public License version 2 or any later version. |