File: xautolock.man

package info (click to toggle)
xautolock 1:2.2-5.1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 368 kB
  • ctags: 267
  • sloc: ansic: 1,428; cpp: 77; makefile: 10
file content (403 lines) | stat: -rw-r--r-- 16,428 bytes parent folder | download | duplicates (5)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
.TH xautolock 1 "December 28, 2007"

.SH NAME
xautolock \- fire up programs in case of user inactivity under X

.SH VERSION
This man page applies to xautolock version 2.2.

.SH SYNOPSIS 
.TP 10
.B \fBxautolock\fR
[\fB\-help\fR] [\fB\-version\fR] 
[\fB\-time\fR \fImins\fR] [\fB\-locker\fR \fIlocker\fR]
[\fB\-killtime \fIkillmins\fR\fR] [\fB\-killer\fR \fIkiller\fR]
[\fB\-notify \fImargin\fR] [\fB\-notifier \fInotifier\fR]
[\fB\-bell \fIpercent\fR]
[\fB\-corners\fR \fIxxxx\fR]
[\fB\-cornerdelay\fR \fIsecs\fR]
[\fB\-cornerredelay\fR \fIaltsecs\fR]
[\fB\-cornersize\fR \fIpixels\fR]
[\fB\-secure\fR]
[\fB\-resetsaver\fR]
[\fB\-nocloseout\fR] [\fB\-nocloseerr\fR] [\fB\-noclose\fR]
[\fB\-disable\fR] [\fB\-enable\fR] [\fB\-toggle\fR] [\fB\-exit\fR]
[\fB\-locknow\fR] [\fB\-unlocknow\fR] [\fB\-nowlocker\fR \fIlocker\fR]
[\fB\-restart\fR] [\fB\-detectsleep\fR]

.SH DESCRIPTION 
Xautolock monitors the user activity on an X Window display. If none is
detected within \fImins\fR minutes, a program is started as specified by
the \fB\-locker\fR option. Xautolock will typically be used to lock the
screen (hence its primary name) but it really doesn't care what program
you make it start. For this reason, xautolock does not interfere with the
default X screen saver, unless the \fB\-resetsaver\fR option is used. 
This implies that it is the job of the \fIlocker\fR or the user to take 
the appropriate actions if the default screen saver is to be disabled. 
The only real assumption made by xautolock is that a new countdown starts
as soon as the \fIlocker\fR exits.

In the presence of the \fB\-notify\fR option, a warning signal will be 
issued \fImargin\fR seconds before starting the \fIlocker\fR. Warning 
signals come in two kinds:
.TP 3
\(bu
You can use the \fB\-notifier\fR option to specify the command to be
issued to perform notification.
.TP
\(bu
Alternatively, you can let xautolock ring the bell. In this case, the
\fB\-bell\fR option specifies the loudness of the signal in \fIpercent\fR,
as described in the \fIXBell\fR man page.
.PP

You can tell xautolock to take special actions when you move the mouse into
one of the corners of the display and leave it there, by using the
\fB\-corners\fR, \fB\-cornerdelay\fR, \fB\-cornerredelay\fR and
\fB\-cornersize\fR options. This works as follows:

The \fIxxxx\fR argument to the \fB\-corners\fR option must consist of exactly
4 characters from the following set: '0', '+', '-'. Each one of these
specifies what xautolock should do when the mouse enters a small square area
located in each of the corners of the screen. The corners are considered in
the following order: top left, top right, bottom left, bottom right.  A '0'
indicates that xautolock should ignore the corner. A '+' indicates that
xautolock should start the \fIlocker\fR after \fIsecs\fR or \fIaltsecs\fR
seconds (see below for the difference between both), unless the mouse is
moved or keyboard input is received. A '-' indicates that xautolock should
not start the \fIlocker\fR at all. The \fIpixels\fR argument specifies the
size in pixels of the corner areas.

Most users of the \fB\-corners\fR option want the \fIlocker\fR to activate
within a very short time interval after they move the mouse into a '+' corner.
This can be achieved by specifying a small value for the \fB\-cornerdelay\fR
option. However, if the mouse is subsequently left where it is, xautolock
will almost immediately start a new \fIlocker\fR right after the user quits
the current one. To prevent this from happening, the \fB\-cornerredelay\fR
option can be used to specify the time-out interval to be used if and only
if the mouse is sitting in a `+' corner and has not been moved since the 
previous \fIlocker\fR exited.

A running xautolock process can be disabled (unless if the \fB\-secure\fR
option has been specified), in which case it will not attempt to start the
\fIlocker\fR. To disable an already running xautolock process, use the
\fB\-disable\fR option. To re-enable it, use \fB\-enable\fR. To toggle it
between both states, use \fB\-toggle\fR. Using this method is preferable 
to using sending it SIGSTOP and SIGCONT signals, because while disabled 
xautolock will still be emptying its event queue. 

A running xautolock process can also be told to exit (unless if the 
\fB\-secure\fR option has been specified). To do this, use the
\fB\-exit\fR option.

The \fB\-killtime\fR and \fB\-killer\fR options allow, amongst other
things, to implement an additional automatic logout, on top of the
automatic screen locking. In the presence of one or both of these
options, a secondary timeout will be triggered \fIkillmins\fR after
starting the \fIlocker\fR (unless user activity is detected in the
mean time).  Upon expiration of this secondary timer, the \fIkiller\fR
program is run. Note that, despite the name of the options, xautolock
really doesn't care what the \fIkiller\fR does in reality. If it
doesn't (indirectly) cause xautolock to get killed, and assuming that
no user activity is detected, the secondary trigger will periodically
expire every \fIkillmins\fR minutes for as long as the \fIlocker\fR runs.

In combination with \fB\-killtime\fR and \fB\-killer\fR, the \fB\-secure\fR
option allows system administrators to enforce xautolock as a part of their
security procedures, and to prevent people from locking shared displays for
an excessive amount of time. One way to achieve this is to start xautolock
(using \fB-secure\fR and optionally \fB\-killtime\fR and \fB\-killer\fR)
from within XDM's Xsession file in such a way that the session
automatically ends if xautolock itself is killed.

By default xautolock closes stdout and stderr. This prevents the \fIlocker\fR
from writing error messages to these files in case you manually lock your
display.  The \fB\-nocloseout\fR, \fB\-nocloseerr\fR and \fB\-noclose\fR
options cause xautolock to not close stdout and/or stderr. On some platforms
users of xnlock will need to use \fB\-nocloseout\fR, in order to make xnlock's
witty sayings show up. These options can also be used for debugging cases in
which \fIlocker\fR invocation is not successful.

Xautolock is capable of managing multi-headed displays.

.SH OPTIONS
.TP 16
\fB\-help\fR
Print a help message and exit.
.TP 
\fB\-version\fR
Print the version number and exit.
.TP 
\fB\-time\fR
Specifies the primary timeout interval. The default is 10 minutes,
the minimum is 1 minute, and the maximum is 1 hour.
.TP 
\fB\-locker\fR
Specifies the \fIlocker\fR to be used. The default is xlock. Notice that if
\fIlocker\fR contains multiple words, it must be specified between quotes.
In order to use your PATH to locate the program, xautolock feeds the
\fIlocker\fR command to /bin/sh, so it should be understandable for
whatever shell your /bin/sh is. Because this typically is a Bourne
shell, ~ expansion most likely will not work. 
.TP 
\fB\-killtime\fR
Specifies the secondary timeout in minutes after starting the \fIlocker\fR.
This timer is only active as long as the \fIlocker\fR is running, and is 
reset each time user activity is detected. If it expires before the 
\fIlocker\fR exits, the \fIkiller\fR command is run. The default is
20 minutes, the minimum is 10 minutes, and the maximum is 2 hours.
This option is only useful in conjunction with \fB\-killer\fR.
.TP 
\fB\-killer\fR
Specifies the \fIkiller\fR to be used. The default is none. Notice that 
if \fIkiller\fR contains multiple words, it must be specified between
quotes.  In order to use your PATH to locate the program, xautolock feeds 
the \fIkillr\fR command to /bin/sh, so it should be understandable 
for whatever shell your /bin/sh is. Because this typically is a Bourne 
shell, ~ expansion most likely will not work.
.TP 
\fB\-notify\fR
Warn the user \fImargin\fR seconds before locking. The default is to not
warn the user. If used in conjunction with \fB\-cornerdelay\fR or 
\fB\-cornerredelay\fR, the notification margin iused is the minimum of
\fImargin\fR, \fIsecs\fR and/or \fIaltsecs\fR.
.TP
\fB\-notifier\fR
Specifies the \fInotifier\fR to be used. The default is none. This
option is only useful in conjunction with \fB\-notify\fR. Notice that 
if \fInotifier\fR contains multiple words, it must be specified between
quotes.  In order to use your PATH to locate the program, xautolock feeds 
the \fInotifier\fR command to /bin/sh, so it should be understandable 
for whatever shell your /bin/sh is. Because this typically is a Bourne 
shell, ~ expansion most likely will not work.
.TP
\fB\-bell\fR
Specifies the loudness of the notification signal in the absence of the
\fB\-notifier\fR option. The default is 40 percent. This option is only 
useful in conjunction with \fB\-notify\fR.
.TP 
\fB\-corners\fR
Define special actions to be taken when the mouse enters one of the
corners of the display. The default is 0000, which means that no special
action is taken.
.TP 
\fB\-cornerdelay\fR
Specifies the number of seconds to wait before reacting to the mouse
entering a '+' corner. The default is 5 seconds.
.TP 
\fB\-cornerredelay\fR
Specifies the number of seconds to wait
before reacting again if the current \fIlocker\fR exits while the mouse is
sitting in a '+' corner. The default is for \fIaltsecs\fR to equal
\fIsecs\fR.
.TP 
\fB\-cornersize\fR
Specifies the size in pixels of the corner areas. The default is 10 pixels.
.TP 
\fB\-resetsaver\fR
Causes xautolock to reset the X screen saver after successfully starting 
the \fIlocker\fR. This is typically used in case the locker is not
really intended to lock the screen, but to replace the default X screen
saver. Note that the default screen saver is not disabled, only reset.
Also note that using \fB\-resetsaver\fR will inferfere with the DPMS
monitors, as the power down time out will also be also reset. The
default is not to reset the screen saver.

See the \fIxset\fR man page for more information about managing the 
X screen saver.
.TP 
\fB\-detectsleep\fR
Instructs xautolock to detect that computer has been put to sleep. 
This is done by detecting that time has jumped by more than 3 seconds. 
When this occurs, the lock timer is reset and locker program is not
launched even if primary timeout has been reached. This option is 
typically used to avoid locker program to be launched when awaking a 
laptop computer.
.TP 
\fB\-secure\fR
Instructs xautolock to run in secure mode. In this mode, xautolock
becomes imune to the effects of \fB\-enable\fR, \fB\-disable\fR, 
\fB\-toggle\fR, and \fB\-exit\fR. The default is to honour these 
actions.
.TP 
\fB\-nocloseout\fR
Don't close stdout.
.TP 
\fB\-nocloseerr\fR
Don't close stderr.
.TP 
\fB\-noclose\fR
Close neither stdout nor stderr.
.TP 
\fB\-disable\fR
Disables an already running xautolock process (if there is one, and
it does not have \fB\-secure\fR switched on). In any case, the current
invocation of xautolock exits.
.TP 
\fB\-enable\fR
Enables an already running xautolock process (if there is one, and
it does not have \fB\-secure\fR switched on). In any case, the current
invocation of xautolock exits.
.TP 
\fB\-toggle\fR
Toggles an already running xautolock process (if there is one, and
it does not have \fB\-secure\fR switched on) between its disabled and
enabled modes of operation. In any case, the current invocation of
xautolock exits.
.TP 
\fB\-exit\fR
Causes an already running xautolock process (if there is one, and
it does not have \fB\-secure\fR switched on) to exit. In any case,
the current invocation of xautolock also exits.
.TP 
\fB\-locknow\fR
Causes an already running xautolock process (if there is one, if
it does not have \fB\-secure\fR switched on, and is not currently
disabled) to lock the display immediately. In any case, the current
invocation of xautolock exits.
.TP 
\fB\-unlocknow\fR
Causes an already running xautolock process (if there is one, if
it does not have \fB\-secure\fR switched on, and is not currently
disabled) to unlock the display immediately (if it's locked) by
sending the \fIlocker\fR a SIGTERM signal. In any case, the current
invocation of xautolock exits.
.TP 
\fB\-nowlocker\fR
Specifies the \fIlocker\fR to be used if the lock is initiated with 
\fB\-locknow\fR option. The default is to use the \fIlocker\fR
program given with \fB\-locker\fR option, which defaults to xlock. 
.TP
\fB\-restart\fR
Causes an already running xautolock process (if there is one and 
it does not have \fB\-secure\fR switched on) to restart. In any
case, the current invocation of xautolock exits.

.SH RESOURCES
.TP 16
.B time 
Specifies the primary timeout. Numerical.
.TP 
.B locker 
Specifies the \fIlocker\fR. No quotes are needed, even if the 
\fIlocker\fR command contains multiple words.
.TP 
.B killtime
Specifies the secondary timeout. Numerical.
.TP   
.B killer
Specifies the \fIkiller\fR. No quotes are needed, even if the
\fIkiller\fR command contains multiple words.
.TP   
.B notify 
Specifies the notification margin. Numerical.
.TP 
.B notifier 
Specifies the \fInotifier\fR. No quotes are needed, even if the 
\fInotifier\fR command contains multiple words.
.TP 
.B bell 
Specifies the notification loudness. Numerical.
.TP 
.B corners 
Specifies the corner behaviour, as explained above.
.TP 
.B cornersize 
Specifies the size of the corner areas. Numerical.
.TP 
.B cornerdelay 
Specifies the delay of a '+' corner. Numerical.
.TP 
.B cornerredelay 
Specifies the alternative delay of a '+' corner. Numerical.
.TP   
.B resetsaver
Reset the default X screen saver. Boolean.
.TP   
.B nocloseout
Don't close stdout. Boolean.
.TP   
.B nocloseerr
Don't close stderr. Boolean.
.TP   
.B noclose 
Close neither stdout nor stderr. Boolean.

.PP
Resources can be specified in your \fI~/.Xresources\fR or \fI~/.Xdefaults\fR
file (whichever your system uses) and merged via the xrdb(1) command. They
can be specified either for class \fIXautolock\fR, or for whatever name 
your xautolock program has been given. This can be useful in case xautolock
is to be used for other purposes than simply locking the screen. For example:
if you have two copies of xautolock, one called "xmonitor", and one called 
"xlogout", then both will honour the following:
.IP
\fBXautolock.corners: ++++\fR
.PP
In addition, "xmonitor" will honour:
.IP
\fBxmonitor.cornersize: 10\fR
.PP
while "xlogout" will honour:
.IP
\fBxlogout.cornersize: 5\fR
.PP
Each command line option takes precedence over the corresponding
(default) resource specification.

.SH KNOWN\ BUGS 

The \fB\-disable\fR, \fB\-enable\fR, \fB\-toggle\fR, \fB\-exit\fR,
\fB\-locknow\fR, \fB\-unlocknow\fR, and \fB\-restart\fR options depend 
on access to the X server to do their work. This implies that they will
be suspended in case some other application has grabbed the server 
all for itself.

If, when creating a window, an application waits for more than 30 seconds 
before selecting KeyPress events on non-leaf windows, xautolock may
interfere with the event propagation mechanism. This effect is theoretical
and has never been observed in real life. It can only occur in case
xautolock has been compiled without support for both the Xidle
and the MIT ScreenSaver extensions, or in case the X server does 
not support these extensions.

xautolock does not always properly handle the secure keyboard mode of 
terminal emulators like xterm, since that mode will prevent xautolock 
from noticing the keyboard events occurring on the terminal. Therefore,
xautolock sometimes thinks that there is no keyboard activity while in 
reality there is. This can only occur in case xautolock has been 
compiled without support for both the Xidle and the MIT ScreenSaver
extensions, or in case the X server does not support these extensions.

xautolock does not check whether \fInotifier\fR and/or \fIlocker\fR are
available.

The xautolock resources have dummy resource classes. 

.SH SEE\ ALSO
X(1),
xset(1),
xlock(1),
xnlock(1),
xscreensaver(1).

.SH COPYRIGHT
Copyright 1990, 1992-1999, 2001-2002, 2004, 2007 by Stefan De Troch and
Michel Eyckmans.

Versions 2.0 and above of xautolock are available under version 2 of the
GNU GPL. Earlier versions are available under other conditions. For more
information, see the License file.

.SH AUTHORS   
Xautolock was conceived, written, and performed by:

Michel Eyckmans (MCE) 
.br
Stefan De Troch 

Please send queries for help, feature suggestions, bug reports, etc.
to mce@scarlet.be.

.SH SPECIAL\ THANKS\ TO
Kris Croes