home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / X / XLOCK / _XLOCK.TAR / usr / doc / xlock / README
Encoding:
Text File  |  1995-01-11  |  13.6 KB  |  305 lines

  1. xlockmore: the UNofficial version of xlock, see Revisions for version #
  2. Primary site: ftp.x.org in /contrib/applications
  3. Maintainer: David A. Bagley <bagleyd@source.asset.com>
  4. Adapted from Patrick J. Naughton's original (and official) xlock.
  5.  
  6. How to build?
  7.  
  8.   Check below to see if your machine is one mentioned that causes
  9.   problems, otherwise it should be easy.
  10.  
  11.     Only if your using X11R6 then:
  12.         xmkmf
  13.     make depend
  14.         make
  15.     ./xlock -mode spline
  16.  
  17.     If your using X11R5 then:
  18.         xmkmf
  19.         make
  20.     ./xlock -mode spline
  21.  
  22.     If your using X11R4 then:
  23.         mv Imakefile Imakefile.r5
  24.         sed 's/^XCOMM/\/\*\*\/#/' > Imakefile < Imakefile.r5
  25.         xmkmf
  26.         make
  27.         ./xlock -mode spline
  28.  
  29.     Note: if you don't have 'xmkmf' or the "Makefile" it generates
  30.     doesn't work well, edit Makefile.std for appropriate settings for
  31.     XINCLUDEPATH and XLIBPATH, then try:
  32.     make -f Makefile.std
  33.         ./xlock -mode spline
  34.  
  35. Likely problems:
  36.  
  37.   Solaris2.x users:
  38.     Imake will compile with the -DSOLARIS_SHADOW switch.
  39.     It doesn't use the root password feature, but otherwise should work
  40.       for both local, NIS and NIS+ passwords.
  41.       Is it possible to handle the root case for all configurations?
  42.     With Gnu's gcc, get rid of the "-ansi" during compilation.
  43.     With Sun's unbundled cc, compile with a "-DSVR4" and link with
  44.       "-lnsl -lsocket".
  45.  
  46.     Solaris2.3 and greater users:
  47.       Adjust the Imakefile to compile with HAS_NANOSLEEP.  Also need to
  48.         link with -lnsl -lposix4.  With this, less CPU cycles are
  49.         wasted and usleep is a lot more accurate (!).
  50.     Solaris2.4 users:
  51.       xlock will dump core if xlock is not setuid root.
  52.  
  53.   ESIX users:
  54.     Similar to Solaris2.x.  You will need a -DSVR4 to compile.
  55.     chmod 440 /etc/shadow
  56.     if you get libX11.so.xxx not found
  57.       link with the static versions of the X libraries 
  58.     random() may be buggy use the one from GNU.
  59.     chmod 2755 xlock
  60.  
  61.   XFree86 users:
  62.     Control-Alt-Backspace will defeat locking mechanism and return your
  63.       console back unless you put "DontZap" in your XF86Config file.
  64.       (In X11R5, that would be a "dontzap" in your Xconfig file).
  65.     Control-Alt-F1 (among others) will defeat locking mechanism with
  66.       virtual terminals. This ain't too good, right?  If your using Linux,
  67.       try vlock on tsx-11.mit.edu in /pub/linux/sources/usr.bin .  I hear
  68.       that XFree86 3.2 when it comes out MAY have a server extension for
  69.       catching or disabling VT switching. Any ideas in the meanwhile?
  70.  
  71.   Linux users:
  72.     If you are using shadow passwords make sure you:
  73.         chown root.shadow xlock
  74.         chmod 2755 xlock
  75.     Also check that the following was done:
  76.         chown root.shadow /etc/shadow
  77.         chmod 440 /etc/shadow
  78.     So far, Slackware (a major Linux distribution) does NOT come with shadow
  79.       passwords standard.  If you want to install shadow passwords (be
  80.       careful, it can be tricky) it's on sunsite.unc.edu in
  81.       /pub/Linux/system/Admin .
  82.  
  83.   FreeBSD users:
  84.     One may have to make xlock setuid root (are there any objections?).
  85.  
  86.   Alpha-OSF/1 enhanced security users:
  87.     Compile with -DOFS1_ENH_SEC see Imakefile
  88.         chown auth.auth xlock
  89.         chmod 2755 xlock
  90.  
  91.   HP users:
  92.     Shift-Control-Break is caught.
  93.  
  94.     xlock MAY bomb after 1 hour (or less) when the keyboard is pressed.
  95.       This has been known to happen on HP-UX 9.0x with HP 7xx
  96.  
  97.       XIO:  fatal IO error 0 (Error 0) on X server "unix:0.0"
  98.           after xxxxx requests (xxxx known processed) with 1 events remaining.
  99.    
  100.     Maybe I introduced a bug in a later version? I tend not to think so now.
  101.       If you get it working, LET ME KNOW. Note: I do not have an HP.
  102.  
  103.     I heard that it happens only with modes like galaxy and pyro
  104.       (lots of XDrawPoints) and it never happens with modes like hyper.
  105.       If true, mail me a more complete list, if not let me know.
  106.       Known problem modes: galaxy, pyro, and worm.
  107.       Suspected OK modes: hyper.
  108.  
  109.     I heard its runs OK at some sites ... If so tell me what version of
  110.       the OS and machine, and what patches have been applied.
  111.       Known problems exist on:
  112.         HP 712/60 (HPPA-1.1), HP-UX 9.05
  113.         HP 750, HP-UX 9.01
  114.         HP 715/80, HP-UX 9.05 
  115.         HP 725/75, HP-UX 9.01(3,5)
  116.         HP 7xx, HP-UX 9.04
  117.  
  118.     HP-UX with Secured Passwords:
  119.       Compile with -DHPUX_SECURE_PASSWD and have xlock setuid to root.
  120.  
  121.   X-Terminal users (my heart bleeds for you):
  122.     To get xlock to run, run with -remote option or set XLock.remote on
  123.       in XLock.ad.
  124.   
  125.   VAX/VMS users:
  126.     All you should need to do to build the executable is type @make
  127.       To run xlock a symbol needs to be defined, for example:
  128.           XLOCK:==$H268SYSEXE:XLOCK
  129.       where H268SYSEXE is a logical name pointing to the directory where
  130.       XLOCK.EXE resides. The '$' after == means this is a foreign command
  131.       and VMS makes the command line available to the program.
  132.  
  133.     worm may look a bit strange, since the scaling is wrong.
  134.     -allowroot only works if you have SYSPRV enabled which is a bit limiting.
  135.  
  136.     The XLock file normally in /usr/lib/X11/app-defaults needs to be in the
  137.       directory DECW$SYSTEM_DEFAULTS on VMS systems and be called
  138.       'DECW$XLOCK.DAT'.
  139.  
  140.   24-bit screen users (most people use 8):
  141.       world is just a black screen and swirl gives sqrt: DOMAIN error.
  142.  
  143.   Public Lab Administrators:
  144.     "bomb.c" contains a simple hack to provide a time-limited lock mode,
  145.       at the end of which the user will be logged out. This is useful in
  146.       public areas, where xlock could cause problems if terminals were
  147.       left locked for long periods.
  148.  
  149.     The graphics for bomb are fairly basic, but the structure is fairly
  150.       flexible and the changes localised as much as possible.  It can be
  151.       configured to offer this function as one mode among many (user's
  152.       choice) (the default), or to force timed locks based on local policy
  153.       (e.g. username or group).
  154.  
  155.     Don't PANIC, random will not run bomb, image, or blank, unless forcing
  156.       is used, then of course, bomb will always run.  You cannot run bomb
  157.       as root, since it will kill all of root's processes, not a good idea.
  158.       (Also bomb will not log you off if your debugging xlock).            
  159.  
  160.     If bomb is forced, you can still run the other locks in -inwindow or
  161.       -nolock. In bomb, you can not increase the delay for longer than
  162.      1 second.
  163.  
  164.     To force bomb edit the Imakefile and uncomment the -DFORCE_BOMB line.
  165.       Edit your /etc/xlock.staff file (or whatever you want to call it).
  166.       Code for forcing bomb is in bomb.c .
  167.  
  168.     (I personally tested it only on Solaris, SunOS, and Linux)
  169.     I had to use #undef passwd and getpwnam in bomb.c .  I am not sure if
  170.       it was wise, but it worked.  Shadow passwords conflicted with pwd.h .
  171.       I would be curious to know if it works with shadow passwords besides
  172.       Solaris 2.3.
  173.     The only problem I've noticed is that for the Suns, when bomb is
  174.       iconified, the time display does not stay in its window.
  175.   
  176.   xlock still does not work  :-( :
  177.     If all that does not work you may need to adjust xlock.h, usleep.c,
  178.     xlock.c, and resource.c since these files are highly implementation
  179.     dependent.  If you have to make this kind of change to get it working,
  180.     let me know.
  181.  
  182. All done and xlock works :-) :
  183.   You may want to compile xlock.c using -DMOUSEMOTION, then xlock will
  184.     respond to (you guessed it) the motion of the mouse.  This is not
  185.     recommended if your using a virtual desktop; a default root window that
  186.     may be larger than the physical displayed resolution on your screen.
  187.   You may want to change the 1st line of XLock.ad "blank" to "random",
  188.     "life", or whatever your favorite is and copy it to
  189.     /usr/lib/X11/app-defaults or $HOME (or wherever your application
  190.     defaults files are) and rename to XLock .
  191.   You may want to move xlock into /usr/bin/X11 (or wherever your X
  192.     binaries are). 
  193.   You may also want to move xlock.man to /usr/man/mann/xlock.n .
  194.   You may want to try xautolock.  It runs xlock after a user defined
  195.     idle time.  Its at ftp.x.org in /R5contrib, but I do not maintain it.
  196.  
  197. Operation: (Blurb taken from Darren Senn's xlock)
  198.  
  199.   Under X, run xlock.  The screen will clear, and some pretty animated
  200.     picture (exactly which depends on which module is active) will appear
  201.     on the screen.  If you hit a key, then the screen will clear, and
  202.     (unless you've changed the application defaults file that I packaged
  203.     with this) you'll get a white screen with some graphics in the top
  204.     center.  These graphics consist of a reduced size image of the module
  205.     you were viewing, the name of the user who executed xlock, and
  206.     password prompt field, and some short instructions.
  207.  
  208.   At this point, you can either click on the graphic to return to xlock,
  209.     or you can type a password.  If the password is verifiable as the
  210.     root password, or the password of the user listed above, then xlock
  211.     will terminate.  THIS IS THE ONLY WAY TO STOP XLOCK WITHOUT SHUTTING
  212.     DOWN THE X SERVER.  That's what makes it a lock.
  213.  
  214. Resources: (Also taken from Darren Senn's xlock)
  215.  
  216.   There are two sets of resources for XLock.  The first set are (what I
  217.     call) global XLock resources, while the second set consists of
  218.     module-specific resources.  I'll get more into modules a little further
  219.     below.
  220.  
  221.   The global resources are:
  222.         XLock.mode: This sets the module.  More about this later.
  223.         XLock.font: This is the font used on the password entry screen.
  224.         XLock.background: The background color for the password entry screen.
  225.         XLock.foreground: The foreground color for the password entry screen.
  226.         XLock.username: The label for the field indicating the user name.
  227.         XLock.password: The label for the password prompt.
  228.         XLock.info: The "short instructions" to print.
  229.         XLock.validate: A message to display while checking the password
  230.         XLock.invalid: A message to display if the password is incorrect
  231.         XLock.nice: How much XLock should nice itself.
  232.         XLock.timeout: How long to wait idle at the password prompt.
  233.         XLock.timeelapsed: Message to see how long lock running (yes or no)
  234.         XLock.mono: Monochrome mode (yes or no)
  235.         XLock.nolock: disable the lock mechanism (yes or no)
  236.         XLock.remote: allow remote locking (meaningless under linux)
  237.         XLock.allowroot: allow the root password to unlock (yes or no)
  238.         XLock.enablesaver: allow the system screensaver to work (yes or no)
  239.         XLock.allowaccess: allow other clients to connect while active
  240.         XLock.echokeys: Echo "?" for each password keypress (yes or no)
  241.         XLock.usefirst: Ignore the first character typed (yes or no)
  242.         XLock.verbose: Verbose mode. (yes or no)
  243.         XLock.inwindow: allow the xlock to run in a window (yes or no)
  244.  
  245.   Xlock has a number of modules which it can display.  (See the man page
  246.     for a complete list).  It turns out that each module is characterized
  247.     by a number of initializations, separated by a number of "draws".
  248.     Each module has the following resources defined:
  249.  
  250.         XLock.<module>.delay: How long to wait between draws (usec)
  251.         XLock.<module>.batchcount: May mean various things (see man page).
  252.         XLock.<module>.saturation: Saturation (as in HSV) of colors to use.
  253.  
  254. Acknowledgements:
  255.  
  256.   I did not write the original algorithms in any of the lockscreens,
  257.     although I did convert many of the new ones to run with xlock. I tried
  258.     to follow the original style of Patrick Naughton. Updates will just
  259.     overwrite the old file at ftp.x.org in directory /contrib/applications.
  260.     Many of the additions were "borrowed" from xscreensaver (Jamie Zawinski
  261.     jwz@lucid.com). At the time, I had trouble with getting it to compile so
  262.     I moved the "interesting" algorithms to xlock. Many of the others were
  263.     "borrowed" from old demos from Sun.  My favorite of this new bunch is
  264.     "spline", "borrowed" from Jef Poskanzer (jef@netcom.com ||
  265.     jef@well.sf.ca.us).
  266.  
  267.   I will consider putting new ones in if (1) they are more or less public
  268.     domain, (2) they are neat (I am biased towards mathematically based
  269.     programs), and (3) I have the time.
  270.  
  271. Some open problems:  (Suggestions for this would be nice)
  272.  
  273.   Xlock should check first to make sure it can have access to the
  274.     password before locking the screen.  If it does not have access
  275.     it should suggest something like ...
  276.     "Have your admininstrator setuid xlock to root".
  277.  
  278.   More bitmaps are needed like the HP and Sun icons (i.e. Linux & BSD)
  279.     but they must be small (<= 64x64).
  280.   
  281.   It would be nice to have an option -idletime time.  Where xlock would
  282.     run after a certain idle time.  (Here xautolock may help you, see
  283.     above).
  284.  
  285.   Penrose tiling lockscreen needed.  Anyone have an algorithm out there?
  286.  
  287.   Sometimes xlock runs out of colors (for example, it might happen if you
  288.     run xfishtank and run xlock at the same time).  A possible solution
  289.     seems to be to have a private colormap for each screen, then xlock
  290.     will not have any problem allocating new colors. Unfortunately, it
  291.     appears that window manager still uses the default colormap,
  292.     although the window uses another colormap.
  293.  
  294.   "swirl" cycles its colors, except black and white.
  295.   This is easily seen when on a color monitor one enters:
  296.        ./xlock -mode swirl -inwindow
  297.   now move the mouse in the window.
  298.   If you find this annoying compile swirl.c with -DFORCEFIXEDCOLORS.
  299.  
  300.   In "bounce" sometimes a ball does not roll off another ball.
  301.  
  302.   "maze" and "helix" are a bit of a kludge, they need better interrupt
  303.     mechanisms.  Essentially you can't stop them until they are done
  304.     drawing. Fortunately this is not (usually) a long time.
  305.