PURPOSE ======= Xautolock monitors console activity under the X window system, and fires up a program of your choice if nothing happens during a user configurable period of time. You can use this to automatically start up a screen locker in case you tend to forget to do so manually before having a coffee break. PLATFORMS ========= Patchlevel 15 of xautolock has been verified on the following platforms: HP-UX 10.20 / X11R6 Linux 2.2.3 / XFree86 3.3.3 Other people have reported patchlevel 8 through 14 to work on: Linux 2.x.y / XFree86 3.2(A), 3.3, and 3.3.x Linux 1.0.9 / XFree 2.1.1 (Slackware 2.0.1) Linux 0.99pl3 or later / XFree 1.3 or later Novell Unixware 1.1.2 / beta X11R5 NetBSD/i386 1.2 / XFree86 3.3.1 SCO UnixWare 7 / X11R6 FreeBSD 2.0 HP-UX 8.07, 9.0x, and 10.20 / X11R5 and X11R6 OSF/1 2.0 and 3.0 SunOS 4.1.3 / X11R5 and X11R6 Solaris 2.2, 2.3, 2.4, and 2.5 / Openwindows 3.4 Solaris 2.4 (GCC 2.7.0 and Sun ProC 2.0.1) Ultrix 4.3 and Ultrix 4.4 / X11R4 and X11R5 IRIX 5.2 and 5.3 / X11R5 and X11R6 AIX 3.2 and 4.2 AOS 4.3 EP/IX 2.1 BSD 4.3 Vax/VMS OpenVMS Tektronix XD88/10 Earlier versions also ran on the following machinery, but we no longer have access to these, so testing it is a bit difficult :-): Ultrix 4.2 / X11R3 Ultrix 4.2a and 4.3 / X11R4 DomainOS SR10 / X11R3 and X11R4 DomainOS 10.3.5 / X11R4 Sony's Unix variant / X11R4 SunOS 4.1.2 / X11R4 SunOs ?.?.? / X11R3 HOW TO USE IT ============= Just read the man page, it's really simple. If you're on VMS, you should also check out the VMS.NOTES file. HOW IT WORKS ============ If xautolock has been compiled to support either the Xidle, or the MIT ScreenSaver extensions (or both), it first tries to find out whether the X server also supports one of them. If it does, xautolock will periodically call it to determine the amount of time elapsed since the last input event, and will then base its actions upon that. In the absence of both extensions, xautolock starts by traversing the window tree, selecting SubstructureNotify on all windows and adding each window to a temporary list. About +- 30 seconds later, it scans this list, and now asks for KeyPress events. However, it takes care to interfere as little as possible with the event propagation mechanism. This is the reason for the delay between the moment xautolock learns about a new window (and consequently asks for SubstructureNotify events) and the moment it asks for KeyPress events. Whenever a new window is created by an application, a similar process takes place. In contradiction to what many people believe, this scheme does not cause a noticeable overhead. In addition, xautolock periodically issues a QueryPointer request in order to find out whether the pointer has moved and implement the "corners" feature as decribed in the man page. If nothing happens within a user-specified period of time, xautolock will fire up a program which is supposed to lock the screen. While this program is running, xautolock itself remains on the look-out for user interaction. COMPILING XAUTOLOCK =================== Xautolock should compile straight out of the box. Here's the recepy: 1. Edit the Imakefile to your likings. 2. Type: xmkmf make make install make clean 3. Have fun. If this procedure fails, the most likely reason is the absence of the MIT ScreenSaver extension on your system. If this is the case, simply edit the Imakefile accordingly and try again. If compilation fails because MIT ScreenSaver is not available, do the following: + Find out whether the X server supports it (use the xdpyinfo command for this). Quite often it will, even if the support for compiling programs with it is absent. If this applies to you, nag your sysadmin and/or vendor about it. MIT ScreenSaver is a pretty standard extension that IMHO should be provided with any X based system. + If you cannot find MIT ScreenSaver, repeat the same procedure with Xidle (except for the `nag your vendor' bit). If your server supports Xidle, but you do not have the development files and cannot find them on the web, just send me and e-mail and I will forward you a copy. + If you are still out of luck, use the good old backup mechanism. Xautolock wil be just as happy without server extensions. KNOWN BUGS ========== Important notice: the first two bugs listed here are only present in case xautolock has been compiled without support for both the Xidle and the MIT ScreenSaver extensions, or in case the X server being used does not support them. They make up a good reason to get one of these extensions installed. 1. If, when creating a window, an application waits for more than 30 seconds before calling 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. 2. Xautolock can not properly handle the secure keyboard mode of xterm, since that will prevent any other process, including xautolock, from noticing the keyboard events aimed at the xterm. Consequently, xautolock sometimes will think that there is no keyboard activity while in reality there is. 3. Under some configurations, xautolock fails to exit upon logout. This problem can occur (but does not always do so) under the following combined circumstances: + Xautolock is started in background from within a .xinitrc. + Your are trusting your windowmanager to kill all X processes when quitting (which, by the way, is not a good idea). One well known source of problems in this area consists of olwm and its look-alikes. + The .xinitrc contains a "wait" statement to make it collect all background processes upon logout. The simplest workround for this problem is to start xautolock from within a subshell. I.e. use this: ( xautolock & ) On Solaris an alternative solution (which basically works in exactly the same way) is to use this: toolwait xautolock 4. Xautolock does not check whether the screen locker specified actually is available. 5. The xautolock resources have a dummy resource classes. If you can find others, please notify eyckmans@imec.be. Note that, while I still scan most X related newsgroups, I do not actually read them on a regular basis anymore, as X no longer is a part of my job. I do still actively support xautolock on a daily basis, though. Hence you are much more likely to get quick help if you contact me directly. CONTRIB DIRECTORY ================= The contrib directory contains various patches that have been contributed over time. If a patch is in there, I have for some reason or another decided not to include it in xautolock proper, but still consider it to be sufficiently usefull to other people in order to add it to the distribution. Note that the contents of the contrib directory are *not* part of xautolock. Each of the contributions lives under its own copyright. WARNING ======= It looks like there is a bug in the event management code of some X servers (amongst which both X11R4 and X11R5 on older versions of SunOS). If you are using patchlevel 7 of xautolock, it is best to reset the server before switching to patchlevel 8 or later. If you fail to do so, an old patchlevel 7 bug may still show up. (Some keyboard events were being hijacked by patchlevel 7 of xautolock, particularly when using tvtwm). COPYRIGHT ========= Copyright 1990, 1992-1999 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 commercial use is made out of it. DISCLAIMER ========== 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 ======= Xautolock was conceived, written, and performed by: Michel Eyckmans (MCE) eyckmans@imec.be Stefan De Troch stefan@specs.philips.com ACKNOWLEDGEMENTS ================ Special thanks to: Kris Croes croes@imec.be The patchlevel 8 beta testers: Paul D. Smith paul_smith@dg.com Brian brian@natinst.com And the patchlevel 9 beta testers: Thanh Ma tma@encore.com Pierre Didierjean cisitm@nyassa.cad.cea.fr No thanks to a certain commercial X server provider who volunteered to beta test patchlevel 9 on many, *many* platforms but didn't live up to it. Also our apologies to the candidate beta testers who were not retained because of this candidate.