xlockmore-1.12 as of 2 September 1994, the UNofficial version of xlock David A. Bagley How to build? Check below to see if your machine is one mentioned that causes problems, otherwise it should be easy. Only if your using X11R6 then: xmkmf make depend make ./xlock -mode spline If your using X11R5 then: xmkmf make ./xlock -mode spline If your using X11R4 then: mv Imakefile Imakefile.r5 sed 's/^XCOMM/\/\*\*\/#/' > Imakefile < Imakefile.r5 xmkmf make ./xlock -mode spline Note: if you don't have 'xmkmf' or the "Makefile" it generates doesn't work well, edit Makefile.std for appropriate settings for XINCLUDEPATH and XLIBPATH, then try: make -f Makefile.std ./xlock -mode spline Likely problems: Solaris2.x users: You have a choice of (1) Not using the -DSOLARIS_SHADOW switch, then NIS passwords will work, but local and root passwords will not work (default). (2) Using the -DSOLARIS_SHADOW switch, then local and root passwords will work, but NIS passwords will not work. (3) Figuring out how you can have local and NIS passwords at the same time. Mail me the patches. Other Solaris problems: With Gnu's gcc, get rid of the "-ansi" during compilation. With Sun's unbundled cc, compile with a "-DSVR4" and link with "-lnsl -lsocket". XFree86 users: Control-Alt-Backspace will defeat locking mechanism and return your console back unless you put "dontzap" in your Xconfig file. Control-Alt-F1 (among others) will defeat locking mechanism with virtual terminals. This ain't too good, right? If your using Linux, try vlock on tsx-11.mit.edu /pub/linux/sources/usr.bin. I hear that XFree86 3.2 when it comes out MAY have a server extension for catching or disabling VT switching. Any ideas in the meanwhile? Linux users: If you are using shadow passwords make sure you: chown root.shadow xlock chmod 2755 xlock Also check that the following was done: chown root.shadow /etc/shadow chmod 440 /etc/shadow So far, Slackware does NOT come with shadow passwords standard. If you want to install shadow passwords (be careful, it can be tricky) it's on sunsite.unc.edu /pub/Linux/system/Admin. FreeBSD users: One may have to make xlock setuid root (are there any objections?). SGI users: Out of luck. I hear it does not work, probably something to how with how random is defined. If you get it working, mail me the patches. HP users: Shift-Control-Break is caught. X-Terminals users (my heart bleeds for you): To get xlock to run, run with -remote option or set XLock.remote on in XLock.ad. If all that does not work you may need to adjust xlock.h or usleep.c (and possibly xlock.c and resource.c) since these files are highly implementation dependent. If you have to make this kind of change to get it working, let me know. You may want to change the 1st line of XLock.ad "blank" to "random", "life", or whatever your favorite is. Acknowledgements: I did not write the original algorithms in any of the lockscreens, although I did convert the new ones to run with xlock. I tried to follow the original style of Patrick Naughton. Updates will just overwrite the old file at ftp.x.org in directory /contrib/applications. Most of the additions were "borrowed" from xscreensaver (Jamie Zawinski jwz@lucid.com). At the time, I had trouble with getting it to compile so I moved the "interesting" algorithms to xlock. Many of the others were "borrowed" from old demos from Sun. My favorite of this new bunch is "spline", "borrowed" from Jef Poskanzer (jef@netcom.com || jef@well.sf.ca.us). I will consider putting new ones in if (1) they are more or less public domain, (2) they are neat (I am biased towards mathematically based programs), and (3) I have the time. Recent Improvements: 1.12 Shadow passwords now work on Linux. Special thanks to H. J. Dihu Reorganized the Imakefile yet again. 1.11 Shadow passwords and DES encryption are now detected by the Imakefile. Victor Langeveld reorganized the Imakefile for shadow passwords and crypt. Now should compile "right out of the box" (although there are still problems on Solaris 2.3). Patch to fix sudden rotation changes in rock from Yoshiaki Kasahara . Slowed down rock and rotor a little. 1.10 R.K.Lloyd@csc.liv.ac.uk reorganized the Imakefile yet again. Fixed a bug in rect.c. Ditched bzero and bcopy since both are more generally available as memset and memcpy. Also removed some lint warnings. 1.9 "rect" mode was added from xscreensaver's greynetic. "helix" bug fixed. It is now more interesting. bounce.c divide by zero fixed and grav.c improvements. Thanks to Greg Bowering . grav.c, rock.c, world.c fixed so no black objects. 1.8 Imakefile did not work with R6. Also Solaris2.3 may use SVR4 instead of SYSV. Thanks to Chris P. Ross "grav" mode was added. Its a simplistic gravitational simulation, with (currently a constant 16) solid spheres (non-renderd) of equal size and mass orbiting a fixed central mass. The sphere's orbit in 3 dimensions, their position and size being projected with simple perspective. Thanks to Greg Bowering . "inwindow" option was added. Allows you to do what xlock already did when DEBUG was defined. It no longer locks your screen, but allows you to run xlock as a (somewhat distracting) decoration. Thanks to Greg Bowering . "bounce" mode (football) is back. "world" mode was added. Thanks to Matthew Moyle-Croft "image" mode was removed. It was very similar to world anyway. 1.7 Added a GENeric icon (its supposed to be 2 tetrahedrons superimposed or a stellated octahedron). cuserid() is needed by Solaris2.3 with shadow passwords in xlock.c. Thanks to Bill . 1.6 R.K.Lloyd@csc.liv.ac.uk pointed out again that gray_bits in maze.c needs a type cast. xlock.c defaults to "blank" to minimize cpu usage on a network. 1.5 xlock works again on VMS (see README.VMS) thanks to Anthony Clarke . memcpy and memset definitions for SYSV. Also there now is a switch for shadow passwords thanks to . 1.4 Now works on BSD. Thanks to Victor Langeveld Both Victor and Alexandre Miguel suggested taking out the cuserid() call in xlock.c. It seems to be fine on Linux 1.0, FreeBSD, SunOS 4.1.3, and HP-UX 9.0. For FreeBSD its a necessity and the old way is is a security hole in SunOS. 1.3 Linux port from Darren Senn's (sinster@scintilla.capitola.ca.us) xlock. Fixed drand to random in helix.c Fixed a memory leak in rock.c. 1.2 SHIFT - CONTROL - BREAK on the HP is trapped. Thanks to R.K.Lloyd@csc.liv.ac.uk who pointed out that this was done in xscreensaver. AIXV3 and HP bugs fixed, again due to R. K. Lloyd. (My fault as usual). 1.1 & 1.0 cp mazeicon.hp mazeicon.bit if you prefer the hp icon for "maze". cp lifeicon.hp lifeicon.bit if you prefer the hp icon for "life" took out "rint" from "worm.c" since HP's have trouble with it added spline, maze, sphere, hyper, helix, rock, & blot modes. fixed "xlock.h" and "usleep" for the HP. got some lint warnings out of "flame". changed border so it varies with size of screen on "swarm" so the wasp would not be stuck in a corner when the password is entered. Some open problems: (Suggestions for this would be nice) Penrose tiling lockscreen needed. Anyone have an algorithm out there? Sometimes xlock runs out of colors (for example, it might happen if you run xfishtank and run xlock at the same time). A possible solution seems to be to have a private colormap for each screen, then xlock will not have any problem allocating new colors. Unfortunately, it appears that window manager still uses the default colormap, although the window uses another colormap. For "bounce" see bounce.c "maze" and "helix" are a bit of a kludge, they need better interrupt mechanisms. Essentially you can't stop them until they are done drawing. Fortunately this is not (usually) a long time. "sphere" is too slow (but its neat if you let it run for a while). ------------------------------------------------------------------------------- Patrick J. Naughton This was the latest version of xlock (sccs version 23.21) patchlevel = 2.3 CHANGES: o added worm mode. o old -name and .name changed to -username and .username. o lint cast. o change color allocation to allow "#ffaabb" style color names. o portability bug in flame mode fixed plus some other nits. o white on black on monochrome screens fixed. o added -name to allow different resource files to be used. o added -usefirst to allow first keystroke to be used in password. o made changes to life mode to allow wraparound. o made old life cells stay blue. o added -resources to get default resource file. o added random mode o added pyro mode o added flame mode. o made passwords a little more secure. o use effective uid to find current user. o make main window managed by the wm in debug mode. o some more SVR4 portability changes. o resource code now looks at XUSERFILESEARCHPATH and XAPPLRESDIR. o removed verbose copyright info from each file. Copyright (c) 1988-91 by Patrick J. Naughton. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This file is provided AS IS with no warranties of any kind. The author shall have no liability with respect to the infringement of copyrights, trade secrets or any patents by this file or any part thereof. In no event will the author be liable for any lost revenue or profits or other special, indirect and consequential damages. ______________________________________________________________________ Patrick J. Naughton email: naughton@sun.com Sun Microsystems Laboratories, Inc. voice: (415) 336 - 1080