xautolock(l)

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

VERSION
This man page applies to xautolock patchlevel 10 with local modifications (-idlefile option).

SYNOPSIS

xautolock
    [-help] [-version] [-time mins] [-locker locker] [-notify margin] [-notifier notifier] [-bell percent] [-corners xxxx] [-cornerdelay secs] [-cornerredelay altsecs] [-cornersize pixels] [-nocloseout] [-nocloseerr] [-noclose] [-disable] [-enable] [-toggle] [-idlefile stampfile]

DESCRIPTION
Xautolock monitors the user activity on an X Window display. If none is detected within mins minutes, a program is started as specified by the -locker 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 screen saver. This implies that it is the job of the locker 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 locker exits. A locker value of ``NONE'' suppresses the locking action, which is typically used in conjunction with the -idlefile feature (described below). In the presence of the -notify option, a warning signal will be issued margin seconds before starting the locker. Warning signals come in two kinds:

•   You can use the -notifier option to specify the command to be issued to perform notification.

•   Alternatively, you can let xautolock ring the bell. In this case, the -bell option specifies the loudness of the signal in percent.
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 -corners, -cornerdelay, -cornerredelay and -cornersize options. This works as follows: The xxxx argument to the -corners 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 locker after secs or altsecs 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 locker at all. The pixels argument specifies the size in pixels of the corner areas. Most users of the -corners option want the locker 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 -cornerdelay option. However, if the mouse is subsequently left where it is, xautolock will almost immediately start a new locker right after the user quits the current one. To prevent this from happening, the -cornerredelay 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 locker exited. A running xautolock process can been also be disabled, in which case it will not attempt to start the locker. To disable an already running xautolock process, use the -disable option. To re-enable it, use -enable. To toggle it between both states, use -toggle. Using this method is preferable to using sending it SIGSTOP and SIGCONT signals, because while disabled xautolock will still be emptying its event queue. The -idlefile option can be used to pass the (approximate) time of the last X input event on to other programs. xautolock must be able to create the specified stampfile, or it must be writable by the invoking user. xautolock will record the time of last input (keyboard or mouse) as the `last access' time of stampfile. The idlefile function can be explicitly disabled by giving ``NONE`` as the stampfile. By default xautolock closes stdout and stderr. This prevents the locker from writing error messages to these files in case you manually lock your display. The -nocloseout, -nocloseerr and -noclose options cause xautolock to not close stdout and/or stderr. On some platforms users of xnlock will need to use -nocloseout, in order to make xnlock's witty sayings show up. These options can also be used for debugging cases in which locker invocation is not successful. Xautolock is capable of managing multi-headed displays.

OPTIONS

-help
    Print a help message and exit.

-version
    Print the version number and exit.

-time
    Specifies the time-out interval. The default is 10 minutes, the minimum is 1 minute and the maximum is 1 hour.

-locker
    Specifies the locker to be used. The default is xlock. Notice that if locker contains several words, it must be specified between quotes. In order to use your PATH to locate the program, xautolock feeds the locker 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.

-notify
    Warn the user margin seconds before locking. The default is to not warn the user. If used in conjunction with -cornerdelay or -cornerredelay, the notification margin iused is the minimum of margin, secs and/or altsecs.

-notifier
    Specifies the notifier to be used. The default is none. This option is only useful in conjunction with -notify. Notice that if notifier contains several words, it must be specified between quotes. In order to use your PATH to locate the program, xautolock feeds the notifier 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.

-bell
    Specifies the loudness of the notification signal in the absence of the -notifier option. The default is 40 percent. This option is only useful in conjunction with -notify.

-corners
    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.

-cornerdelay
    Specifies the number of seconds to wait before reacting to the mouse entering a '+' corner. The default is 5 seconds.

-cornerredelay
    Specifies the number of seconds to wait before reacting again if the current locker exits while the mouse is sitting in a '+' corner. The default is for altsecs to equal secs.

-cornersize
    Specifies the size in pixels of the corner areas. The default is 10 pixels.

-nocloseout
    Don't close stdout.

-nocloseerr
    Don't close stderr.

-noclose
    Close neither stdout nor stderr.

-disable
    Disables an already running xautolock process (if there is one). In any case, the current invocation of xautolock exits.

-enable
    Enables an already running xautolock process (if there is one). In any case, the current invocation of xautolock exits.

-toggle
    Toggles an already running xautolock process (if there is one) between its disabled and enabled modes of operation. In any case, the current invocation of xautolock exits.

RESOURCES

time
    Specifies the time out period.

locker
    Specifies the locker. No quotes are needed, even if your locker command contains several words.

notify
    Specifies the notification margin.

notifier
    Specifies the notifier. No quotes are needed, even if your notifier command contains several words.

bell
    Specifies the notification loudness.

corners
    Specifies the corner behaviour.

cornersize
    Specifies the size of the corner areas.

cornerdelay
    Specifies the delay of a '+' corner.

cornerredelay
    Specifies the alternative delay of a '+' corner.

nocloseout
    Don't close stdout.

nocloseerr
    Don't close stderr.

noclose
    Close neither stdout nor stderr.

Resources can be specified in your ~/.Xdefaults file, either for class Xautolock, or for whatever name you renamed xautolock to. 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:

    Xautolock.corners: ++++

In addition, "xmonitor" will honour:

    xmonitor.cornersize: 10

while "xlogout" will honour:

    xlogout.cornersize: 5

Each command line option takes precedence over the corresponding default resource specification.

KNOWN BUGS
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 not been compiled to support the Xidle extension or in case the X server does not support Xidle. xautolock does not 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 not been compiled to support the Xidle extension or in case the X server does not support Xidle. xautolock does not check whether notifier and/or locker are available. The xautolock resources have dummy resource classes.

SEE ALSO
X(1), xlock(1), xnlock(1), xscreensaver(1).

COPYRIGHT
Copyright 1990, 1992-1995 by S. De Troch and MCE. Permission to use, copy, modify and distribute this software and the supporting documentation without fee is hereby granted, provided that

1:  Both the above copyright notice and this permission notice appear in all copies of both the software and the supporting documentation.

2:  No financial profit is made out of it.

THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AUTHORS
Stefan De Troch detroch@imec.be
Michel Eyckmans (MCE) eyckmans@imec.be

SPECIAL THANKS TO
Kris Croes croes@imec.be

LOCAL MODS
Andreas Stolcke    stolcke@icsi.berkeley.edu