1xautolock(1)                General Commands Manual               xautolock(1)
2
3
4

NAME

6       xautolock - fire up programs in case of user inactivity under X
7
8

VERSION

10       This man page applies to xautolock version 2.2.
11
12

SYNOPSIS

14       xautolock [-help]  [-version]  [-time mins] [-locker locker] [-killtime
15                 killmins] [-killer killer] [-notify margin] [-notifier  noti‐
16                 fier]  [-bell  percent]  [-corners  xxxx] [-cornerdelay secs]
17                 [-cornerredelay  altsecs]  [-cornersize   pixels]   [-secure]
18                 [-resetsaver]  [-nocloseout]  [-nocloseerr] [-noclose] [-dis‐
19                 able] [-enable]  [-toggle]  [-exit]  [-locknow]  [-unlocknow]
20                 [-nowlocker locker] [-restart] [-detectsleep]
21
22

DESCRIPTION

24       Xautolock monitors the user activity on an X Window display. If none is
25       detected within mins minutes, a program is started as specified by  the
26       -locker  option.  Xautolock  will  typically be used to lock the screen
27       (hence its primary name) but it really doesn't care  what  program  you
28       make  it  start. For this reason, xautolock does not interfere with the
29       default X screen saver, unless the -resetsaver option  is  used.   This
30       implies that it is the job of the locker or the user to take the appro‐
31       priate actions if the default screen saver is to be disabled.  The only
32       real  assumption  made  by  xautolock is that a new countdown starts as
33       soon as the locker exits.
34
35       In the presence of the -notify option, a warning signal will be  issued
36       margin  seconds before starting the locker. Warning signals come in two
37       kinds:
38
39       ·  You can use the -notifier option to specify the command to be issued
40          to perform notification.
41
42       ·  Alternatively,  you  can  let xautolock ring the bell. In this case,
43          the -bell option specifies the loudness of the signal in percent, as
44          described in the XBell man page.
45
46       You  can tell xautolock to take special actions when you move the mouse
47       into one of the corners of the display and leave it there, by using the
48       -corners,  -cornerdelay,  -cornerredelay  and -cornersize options. This
49       works as follows:
50
51       The xxxx argument to the -corners option  must  consist  of  exactly  4
52       characters  from  the  following  set: '0', '+', '-'. Each one of these
53       specifies what xautolock should do when the mouse enters a small square
54       area located in each of the corners of the screen. The corners are con‐
55       sidered in the following order: top left, top right, bottom left,  bot‐
56       tom  right.  A '0' indicates that xautolock should ignore the corner. A
57       '+' indicates that xautolock should start the locker after secs or alt‐
58       secs  seconds  (see  below for the difference between both), unless the
59       mouse is moved or keyboard input is received. A '-' indicates that xau‐
60       tolock  should  not start the locker at all. The pixels argument speci‐
61       fies the size in pixels of the corner areas.
62
63       Most users of the -corners option want the locker to activate within  a
64       very  short  time interval after they move the mouse into a '+' corner.
65       This can be achieved by specifying a small value for  the  -cornerdelay
66       option.  However,  if  the mouse is subsequently left where it is, xau‐
67       tolock will almost immediately start a new locker right after the  user
68       quits the current one. To prevent this from happening, the -cornerrede‐
69       lay option can be used to specify the time-out interval to be  used  if
70       and only if the mouse is sitting in a `+' corner and has not been moved
71       since the previous locker exited.
72
73       A running xautolock process can be  disabled  (unless  if  the  -secure
74       option  has been specified), in which case it will not attempt to start
75       the locker. To disable an already running xautolock  process,  use  the
76       -disable  option.  To  re-enable  it, use -enable. To toggle it between
77       both states, use -toggle. Using this  method  is  preferable  to  using
78       sending  it  SIGSTOP  and  SIGCONT signals, because while disabled xau‐
79       tolock will still be emptying its event queue.
80
81       A running xautolock process can also be told to  exit  (unless  if  the
82       -secure option has been specified). To do this, use the -exit option.
83
84       The  -killtime  and  -killer  options  allow,  amongst other things, to
85       implement an additional automatic  logout,  on  top  of  the  automatic
86       screen locking. In the presence of one or both of these options, a sec‐
87       ondary timeout will be triggered killmins  after  starting  the  locker
88       (unless  user  activity is detected in the mean time).  Upon expiration
89       of this secondary timer, the killer program is run. Note that,  despite
90       the  name of the options, xautolock really doesn't care what the killer
91       does in reality. If it doesn't  (indirectly)  cause  xautolock  to  get
92       killed,  and  assuming that no user activity is detected, the secondary
93       trigger will periodically expire every killmins minutes for as long  as
94       the locker runs.
95
96       In  combination  with  -killtime and -killer, the -secure option allows
97       system administrators to enforce xautolock as a part of their  security
98       procedures,  and  to prevent people from locking shared displays for an
99       excessive amount of time. One way to achieve this is to start xautolock
100       (using  -secure and optionally -killtime and -killer) from within XDM's
101       Xsession file in such a way that the session automatically ends if xau‐
102       tolock itself is killed.
103
104       By default xautolock closes stdout and stderr. This prevents the locker
105       from writing error messages to these files in case  you  manually  lock
106       your  display.  The -nocloseout, -nocloseerr and -noclose options cause
107       xautolock to not close stdout and/or stderr. On some platforms users of
108       xnlock  will  need  to use -nocloseout, in order to make xnlock's witty
109       sayings show up. These options can also be used for debugging cases  in
110       which locker invocation is not successful.
111
112       Xautolock is capable of managing multi-headed displays.
113
114

OPTIONS

116       -help           Print a help message and exit.
117
118       -version        Print the version number and exit.
119
120       -time           Specifies  the primary timeout interval. The default is
121                       10 minutes, the minimum is 1 minute, and the maximum is
122                       1 hour.
123
124       -locker         Specifies  the locker to be used. The default is xlock.
125                       Notice that if locker contains multiple words, it  must
126                       be specified between quotes.  In order to use your PATH
127                       to locate the program, xautolock feeds the locker  com‐
128                       mand  to  /bin/sh,  so  it should be understandable for
129                       whatever shell your /bin/sh is. Because this  typically
130                       is  a  Bourne  shell,  ~ expansion most likely will not
131                       work.
132
133       -killtime       Specifies the secondary timeout in minutes after start‐
134                       ing  the  locker.  This timer is only active as long as
135                       the locker is running, and  is  reset  each  time  user
136                       activity  is  detected. If it expires before the locker
137                       exits, the killer command is run.  The  default  is  20
138                       minutes,  the minimum is 10 minutes, and the maximum is
139                       2 hours.  This option is  only  useful  in  conjunction
140                       with -killer.
141
142       -killer         Specifies  the  killer to be used. The default is none.
143                       Notice that if killer contains multiple words, it  must
144                       be specified between quotes.  In order to use your PATH
145                       to locate the program, xautolock feeds the  killr  com‐
146                       mand  to  /bin/sh,  so  it should be understandable for
147                       whatever shell your /bin/sh is. Because this  typically
148                       is  a  Bourne  shell,  ~ expansion most likely will not
149                       work.
150
151       -notify         Warn  the  user  margin  seconds  before  locking.  The
152                       default is to not warn the user. If used in conjunction
153                       with -cornerdelay or -cornerredelay,  the  notification
154                       margin iused is the minimum of margin, secs and/or alt‐
155                       secs.
156
157       -notifier       Specifies the notifier to be used. The default is none.
158                       This option is only useful in conjunction with -notify.
159                       Notice that if notifier  contains  multiple  words,  it
160                       must be specified between quotes.  In order to use your
161                       PATH to locate the program, xautolock feeds  the  noti‐
162                       fier command to /bin/sh, so it should be understandable
163                       for whatever shell your /bin/sh is. Because this  typi‐
164                       cally  is  a Bourne shell, ~ expansion most likely will
165                       not work.
166
167       -bell           Specifies the loudness of the  notification  signal  in
168                       the  absence of the -notifier option. The default is 40
169                       percent. This option is only useful in conjunction with
170                       -notify.
171
172       -corners        Define  special  actions  to  be  taken  when the mouse
173                       enters one of the corners of the display.  The  default
174                       is 0000, which means that no special action is taken.
175
176       -cornerdelay    Specifies the number of seconds to wait before reacting
177                       to the mouse entering a '+' corner. The  default  is  5
178                       seconds.
179
180       -cornerredelay  Specifies the number of seconds to wait before reacting
181                       again if the current locker exits while  the  mouse  is
182                       sitting  in a '+' corner. The default is for altsecs to
183                       equal secs.
184
185       -cornersize     Specifies the size in pixels of the corner  areas.  The
186                       default is 10 pixels.
187
188       -resetsaver     Causes xautolock to reset the X screen saver after suc‐
189                       cessfully starting the locker. This is  typically  used
190                       in  case  the locker is not really intended to lock the
191                       screen, but to replace the default X screen saver. Note
192                       that  the  default  screen  saver is not disabled, only
193                       reset.  Also note that using -resetsaver will inferfere
194                       with the DPMS monitors, as the power down time out will
195                       also be also reset. The default is  not  to  reset  the
196                       screen saver.
197
198                       See the xset man page for more information about manag‐
199                       ing the X screen saver.
200
201       -detectsleep    Instructs xautolock to detect that  computer  has  been
202                       put  to sleep.  This is done by detecting that time has
203                       jumped by more than 3 seconds.  When this  occurs,  the
204                       lock  timer is reset and locker program is not launched
205                       even if primary timeout has been reached.  This  option
206                       is  typically  used  to  avoid  locker  program  to  be
207                       launched when awaking a laptop computer.
208
209       -secure         Instructs xautolock to run  in  secure  mode.  In  this
210                       mode,   xautolock  becomes  imune  to  the  effects  of
211                       -enable, -disable, -toggle, and -exit. The  default  is
212                       to honour these actions.
213
214       -nocloseout     Don't close stdout.
215
216       -nocloseerr     Don't close stderr.
217
218       -noclose        Close neither stdout nor stderr.
219
220       -disable        Disables an already running xautolock process (if there
221                       is one, and it does not have -secure switched  on).  In
222                       any case, the current invocation of xautolock exits.
223
224       -enable         Enables  an already running xautolock process (if there
225                       is one, and it does not have -secure switched  on).  In
226                       any case, the current invocation of xautolock exits.
227
228       -toggle         Toggles  an already running xautolock process (if there
229                       is one, and it  does  not  have  -secure  switched  on)
230                       between its disabled and enabled modes of operation. In
231                       any case, the current invocation of xautolock exits.
232
233       -exit           Causes an already running xautolock process  (if  there
234                       is  one,  and  it does not have -secure switched on) to
235                       exit. In any case, the current invocation of  xautolock
236                       also exits.
237
238       -locknow        Causes  an  already running xautolock process (if there
239                       is one, if it does not have -secure switched on, and is
240                       not  currently  disabled)  to  lock the display immedi‐
241                       ately. In any case, the current invocation of xautolock
242                       exits.
243
244       -unlocknow      Causes  an  already running xautolock process (if there
245                       is one, if it does not have -secure switched on, and is
246                       not  currently  disabled) to unlock the display immedi‐
247                       ately (if it's locked) by sending the locker a  SIGTERM
248                       signal.  In  any  case,  the current invocation of xau‐
249                       tolock exits.
250
251       -nowlocker      Specifies the locker to be used if the lock  is  initi‐
252                       ated  with  -locknow  option. The default is to use the
253                       locker  program  given  with  -locker   option,   which
254                       defaults to xlock.
255
256       -restart        Causes  an  already running xautolock process (if there
257                       is one and it does not have  -secure  switched  on)  to
258                       restart.  In  any  case, the current invocation of xau‐
259                       tolock exits.
260
261

RESOURCES

263       time            Specifies the primary timeout. Numerical.
264
265       locker          Specifies the locker. No quotes are needed, even if the
266                       locker command contains multiple words.
267
268       killtime        Specifies the secondary timeout. Numerical.
269
270       killer          Specifies the killer. No quotes are needed, even if the
271                       killer command contains multiple words.
272
273       notify          Specifies the notification margin. Numerical.
274
275       notifier        Specifies the notifier. No quotes are needed,  even  if
276                       the notifier command contains multiple words.
277
278       bell            Specifies the notification loudness. Numerical.
279
280       corners         Specifies the corner behaviour, as explained above.
281
282       cornersize      Specifies the size of the corner areas. Numerical.
283
284       cornerdelay     Specifies the delay of a '+' corner. Numerical.
285
286       cornerredelay   Specifies the alternative delay of a '+' corner. Numer‐
287                       ical.
288
289       resetsaver      Reset the default X screen saver. Boolean.
290
291       nocloseout      Don't close stdout. Boolean.
292
293       nocloseerr      Don't close stderr. Boolean.
294
295       noclose         Close neither stdout nor stderr. Boolean.
296
297
298       Resources can be specified in your ~/.Xresources or  ~/.Xdefaults  file
299       (whichever  your  system uses) and merged via the xrdb(1) command. They
300       can be specified either for class Xautolock, or for whatever name  your
301       xautolock  program has been given. This can be useful in case xautolock
302       is to be used for other purposes than simply locking  the  screen.  For
303       example:  if  you  have two copies of xautolock, one called "xmonitor",
304       and one called "xlogout", then both will honour the following:
305
306              Xautolock.corners: ++++
307
308       In addition, "xmonitor" will honour:
309
310              xmonitor.cornersize: 10
311
312       while "xlogout" will honour:
313
314              xlogout.cornersize: 5
315
316       Each command  line  option  takes  precedence  over  the  corresponding
317       (default) resource specification.
318
319

KNOWN BUGS

321       The  -disable,  -enable,  -toggle,  -exit,  -locknow,  -unlocknow,  and
322       -restart options depend on access to the X server  to  do  their  work.
323       This implies that they will be suspended in case some other application
324       has grabbed the server all for itself.
325
326       If, when creating a window, an application waits for more than 30  sec‐
327       onds  before  selecting  KeyPress events on non-leaf windows, xautolock
328       may interfere with the event propagation mechanism. This effect is the‐
329       oretical and has never been observed in real life. It can only occur in
330       case xautolock has been compiled without support for both the Xidle and
331       the  MIT  ScreenSaver extensions, or in case the X server does not sup‐
332       port these extensions.
333
334       xautolock does not always properly handle the secure keyboard  mode  of
335       terminal  emulators  like xterm, since that mode will prevent xautolock
336       from noticing the keyboard events occurring on the terminal. Therefore,
337       xautolock  sometimes thinks that there is no keyboard activity while in
338       reality there is. This can only occur in case xautolock has  been  com‐
339       piled without support for both the Xidle and the MIT ScreenSaver exten‐
340       sions, or in case the X server does not support these extensions.
341
342       xautolock does not check whether notifier and/or locker are available.
343
344       The xautolock resources have dummy resource classes.
345
346

SEE ALSO

348       X(1), xset(1), xlock(1), xnlock(1), xscreensaver(1).
349
350
352       Copyright 1990, 1992-1999, 2001-2002, 2004, 2007 by Stefan De Troch and
353       Michel Eyckmans.
354
355       Versions  2.0  and  above of xautolock are available under version 2 of
356       the GNU GPL. Earlier versions are available under other conditions. For
357       more information, see the License file.
358
359

AUTHORS

361       Xautolock was conceived, written, and performed by:
362
363       Michel Eyckmans (MCE)
364       Stefan De Troch
365
366       Please  send  queries  for help, feature suggestions, bug reports, etc.
367       to mce@scarlet.be.
368
369

SPECIAL THANKS TO

371       Kris Croes
372
373
374
375                               December 28, 2007                  xautolock(1)
Impressum