1 XLOCK 
Locks the local X display until a password is entered.

 $ xlock [-display " dsp"][-help][-name " resource-name"][-resources]
         [-/+remote][-/+mono][-/+nolock][-/+allowroot][-/+enablesaver]
         [-/+allowaccess][-/+grabmouse][-/+echokeys][-/+usefirst][-/+v]
         [-/+inwindow][-/+inroot][-/+timeelapsed][-/+install]
         [-delay " usecs"][-batchcount " num"][-cycles " num"]
         [-saturation " value"][-nice " level"][-timeout " seconds"]
         [-lockdelay " seconds"][-font " fontname"][-bg " color"]
         [-fg " color"][-mode " modename"][-username " textstring"]
         [-password " textstring"][-info " textstring"]
         [-validate " textstring"][-invalid " textstring"]
         [-cpasswd " crypted-password"][-geometry " geom"]
         [-program " programname"][-messagesfile " formatted-filename"]
         [-messagefile " filename"][-message " textstring"]
         [-mfont " mode-fontname"][-forceLogout " minutes"]
         [-logoutButtonLabel " textstring"][-logoutButtonHelp " textstring"]
         [-logoutFailedString " textstring"]

2 DESCRIPTION
xlock locks the X server till the user enters their password at the keyboard.
While xlock is running, all new server connections are refused.
The screen saver is disabled.
The mouse cursor is turned off.
The screen is blanked and a changing pattern is put on the screen.
If a key or a mouse button is pressed then the user is prompted for the
password of the user who started xlock.

If the correct password is typed, then the screen is unlocked and the X
server is restored.  When typing the password Control-U and Control-H are
active as kill and erase respectively.  To return to the locked screen,
click in the small icon version of the changing pattern.

2  NOTE_ON_ETIQUETTE
Xlock should not be used on public terminals when there is a high 
demand for them.

If you find a public terminal that has been locked by another user and
there are no other terminals available, and the terminal appears to have
been left idle for a while (normally more than 15 minutes), it is fair to
try to reset the session in some manner.

2 OPTIONS

   -display  dsp
The display option sets the X11 display to lock.
xlock locks all available screens on a given server,
and restricts you to locking only a local server such as
unix:0,localhost:0, or :0 unless you set the -remote option.

   -name  resource-name
resource-name is used instead ofXLock
when looking for resources to configure xlock .
 
   -mode  modename
As of this writing there are 45 display modes supported
(plus one more for random selection of one of the 45).

     ant
Ant mode shows Chris Langton's generalized ants.
 
     bat
Bat mode makes bouncing flying bats.
 
     blot
Blot mode shows Rorschach's ink blot test.
 
     bouboule
Bouboule mode shows moving stars.
 
     bounce
Bounce mode shows bouncing footballs.
 
     braid
Braid mode shows braids and knots.
 
     bug
Bug mode shows bugs evolving and a garden of Eden.
 
     clock
Clock mode shows Packard's oclock.
 
     demon
Demon mode shows Griffeath's cellular automata.
 
     eyes
Eyes mode shows eyes following a bouncing grelb.
 
     flag
Flame mode shows a flying flag of your operating system.
 
     flame
Flag mode shows weird but cool cosmic flame fractals.
 
     forest
Forest mode shows binary trees.
 
     galaxy
Galaxy mode makes crashing spinning galaxies.
 
     geometry
Morphing of complete graphs.
 
     grav
Grav mode shows orbiting planets.
 
     helix
Helix mode shows string art.
 
     hop
Hop mode shows the "real plane fractals" from the September 1986 issue of
Scientific American.
 
     hyper
Hyper mode draws a spinning tesseract in 4D space.
 
     image
Image mode shows several logos randomly appearing on the screen. 
 
     kaleid
Kaleid mode makes a kaleidoscope.
 
     laser
Laser mode shows spinning lasers.
 
     life
Life mode shows Conway's game of life.
 
     life1d
Life mode shows Wolfram's game of 1D life.
 
     life3d
Life3d mode shows Bays' game of 3D life.
 
     lissie
Lissie mode shows lissajous worms.
 
     marquee
Marquee mode shows messages.
 
     maze
Maze mode shows a random maze and a depth first search solution.
 
     mountain
Mountain mode shows a mountain range.
 
     nose
Nose mode a man with a big nose runs around spewing out messages to
the screen.
 
     petal
Pedal mode shows various mathematical flowers.
 
     puzzle
Puzzle mode shows a puzzle being scrambled.
 
     pyro
Pyro mode shows fireworks.
 
     qix
Qix mode shows the spinning lines similar to the old video game
by the same name.
 
     rock
Rock mode shows asteroid field with a twist.
 
     rotor
Rotor mode shows a swirling rotorlike thing.
 
     shape 
Shape mode makes the stippled rectangles and ellipses.
 
     slip
Slip mode slipping blits. 
 
     sphere
Sphere mode draws a bunch of shaded spheres.
 
     spiral
Helixes of dots.
 
    spline
Spline mode shows colorful moving splines, from spline fun #3.
 
     swarm
Swarm mode shows a swarm of bees following a wasp.
 
     swirl
Swirl mode makes animated swirling patterns.
 
     triangle
Triangle mode shows a triangular mountain range.
 
     wator
Wator mode makes a Water-Torus planet of fish and sharks.
 
     world
World mode makes the Earth spin.
 
     worm
Worm mode shows wiggly worms...
 
     blank
Blank mode shows nothing but a black screen.
 
     random
Random mode picks a random mode from all of the above except
blank mode.

 
   -delay usecs
The delay
option sets the speed at which a mode will operate.  It simply sets the
number of microseconds to delay between batches of animations.  In
blank mode, it is important to set this to some small number of seconds,
because the keyboard and mouse are only checked after each delay, so you
cannot set the delay too high, but a delay of zero would needlessly
consume cpu checking for mouse and keyboard input in a tight loop, since
blank mode has no work to do.
 
   -batchcount  num
The batchcount option sets number of things
to do per batch to num . 

In ant mode this refers the number of ants.

In bat mode it is the number of bats, could be less because of conflicts.

In blot mode this refers to the number of pixels rendered in the same color.

In bouboule mode it is the number of stars.

In bounce mode it is the number of balls, could be less because of conflicts.

In braid mode it is the upper bound number of strands.

In bug mode it is the number of bugs, could be less because of conflicts.

In clock mode it is the percentage of the screen, but less than 100%.

In demon mode this refers the number of colors.

In eyes mode it is the number of eyes.

In flame mode it is the number of levels to recurse (larger = more complex).

In forest mode it is the number trees that make a forest.

In galaxy mode it means the number of galaxies.

In geometry mode it is the number of vertices, random if too large.

In grav mode it is the number of planets.

In helix mode it means nothing.

In hop mode this refers to the number of pixels rendered in the same color.

In hyper mode it means nothing.

In image mode it means it is the number of logos on screen at once.

In kaleid mode it means nothing.

In laser mode it is the number lasers, random if too large.

In life mode it is the number of generations before a glider is introduced.

In life1d mode it means nothing.

In life3d mode it is the number of generations before a glider is introduced.

In lissie mode it is the number of worms.

In marquee mode it means nothing.

In maze mode it is the size of the maze, random if too large.

In mountain mode it is the number of mountains. 

In nose mode it means nothing.

In qix mode it is the number of lines rendered in the same color.

In petal mode it the greatest random number of petals.

In puzzle mode it the number of moves.

In pyro mode it is the maximum number flying rockets at one time.

In rock mode it is the number of asteroids on the screen at once.

In rotor mode it is the number of rotor thingys which whirr...

In shape mode it means nothing.

In slip mode it means nothing.

In sphere mode it means nothing.

In spiral mode it is the number of spirals, random if too large.

In spline mode it is the number of points "splined", random if too large.

In swirl mode it means the number of "knots".

In swarm mode it is the number of bees.

In triangular mode it is the number of mountains. 

In wator mode it means the breed time for the fish.

In world mode it is the number of worlds.

In worm mode it is the number of worms.

In blank mode it means nothing.
 
   -cycles  num
The cycles
option sets the number of cycles until time out for ant, blot, braid,
bug, clock, demon, eyes, flag, forest, helix, hop, hyper, kaleid, laser,
life, life1d, life3d, lissie, maze, mountain, petal, shape, spline, triangle,
and wator.  For qix it is the length of the trail of lines, for spiral it is
the length of the trail of dots.  For bouboule it is the maximum size of
a star.  For others it means nothing.
 
   -saturation  value
The saturation option sets saturation of the color ramp used to value .
0 is grayscale and 1 is very rich color.  0.4 is a nice pastel.
 
   -nice  nicelevel
The nice option sets system nicelevel of the
xlock process to nicelevel .
 
   -timeout  seconds
The timeout option sets the number of seconds
before the password screen will time out.
 
   -lockdelay  seconds
The lockdelay option sets the number of seconds
before the screen needs a password to be unlocked.  
Good for use with an autolocking mechanism.
 
   -font  fontname
The font option sets the font to be used on the prompt screen.
 
   -fg  color
The fg option sets the color of the text on the password screen to color .
 
   -bg  color
The bg option sets the color of the background on the 
password screen to color .
 
   -username  textstring
textstring is shown in front of user name, defaults to "Name: ".
 
   -password  textstring
textstring is the password prompt string, defaults to "Password: ".
 
   -info  textstring
textstring is an informational message to tell the user what to do, 
defaults to "Enter password to unlock; select icon to lock.".
 
   -validate  textstring
textstring is a message shown while validating the password, 
defaults to "Validating login..."
 
   -invalid  textstring
textstring is a message shown when password is invalid, 
defaults to "Invalid login."
 
   -geometry  geom
The geometry option sets geom
the size and offset of the lock window (normally the entire screen).
The entire screen format is still used for entering the password.  The
purpose is to see the screen even though it is locked.  This should be
used with caution since many of the modes will fail if the windows
are far from square or are too small.  This should also be used with
-enablesaver to protect screen from phosphor burn.
 
   -forceLogout  minutes
The forceLogout option sets minutes
to auto-logout.  This might not be enforced 
depending how your system is configured.
 
   -logoutButtonLabel  textstring
textstring is a message shown inside logout button when logout 
button is displayed. May not be available, depending how your 
system is configured. Defaults to "Logout".
 
   -logoutButtonHelp  textstring
textstring is a message shown outside logout button when logout 
button is displayed.  May not be available, depending how your 
system is configured.  Defaults to
"Click the "Logout" button to log out current user and 
make workstation available."
 
   -logoutFailedString  textstring
textstring
is a message shown when a logout is attempted and fails.
May not be available, depending how your system is configured.
Defaults to "Logout attempt FAILED.
Current user could not be automatically logged out."
 
   -resources
The resources
option prints the default resource file for
xlock to standard output.
 
   -/+remote
The remote option tells xlock
to not stop you from locking remote X11 servers.  This option should be
used with care and is intended mainly to lock X11 terminals which cannot
run xlock locally.  If you lock someone else's workstation, they will 
have to know your password to unlock it.  Using +remote
overrides any resource derived values for remote and prevents xlock
from being used to lock other X11 servers.  (Use `+' instead of `-' to
override resources for other options that can take the `+' modifier
similarly.)
 
   -/+mono
The mono option causes xlock to display monochrome, 
(black and white) pixels rather than the default
colored ones on color displays.
 
   +/-nolock
The nolock option causes xlock
to only draw the patterns and not lock the display.
A key press or a mouse click will terminate the screen saver.
 
   -/+allowroot
The allowroot option allows the root password to unlock the server 
as well as the user who started xlock .
May not be able to turn this on and off depending on your system and how
xlock was configured.
 
   -/+enablesaver
By default xlock will disable the normal X server's screen saver since
it is in effect a replacement for it.  Since it is possible to set delay
parameters long enough to cause phosphor burn on some displays, this
option will turn back on the default screen saver which is very careful
to keep most of the screen black.
 
   -/+allowaccess
This option is required for servers which do not allow clients to modify
the host access control list.  It is also useful if you need to run x
clients on a server which is locked for some reason...  When allowaccess
is true, the X11 server is left open for clients to attach and thus
lowers the inherent security of this lock screen.  A side effect of using
this option is that if xlock is killed -KILL, the access control list 
is not lost.
 
   -/+grabmouse
The grabmouse option causes xlock
to grab the mouse and keyboard, this is the default.
xlock can not lock the screen without this.
 
   -/+echokeys
The echokeys option causes xlock
to echo '?' characters for each key typed into the password prompt.
Some consider this a security risk, so the default is to not echo
anything. 
 
  -/+usefirst
The usefirst option causes xlock
to use the keystroke which got you to the password screen as the first
character in the password.  The default is to ignore the first key
pressed.
 
   -/+v
Verbose mode, tells what options it is going to use.
 
   -/+inwindow
Runs xlock in a window, so that you can iconify, move, or resize it and
still use your screen for other stuff.  When running in a window,
xlock no longer locks your screen, it just looks good.
 
   -/+inroot
Runs xlock in your root window.  Like the inwindow
option it no longer locks the screen, it just looks good.
 
   -/+timeelapsed
Allows you to find out how long a machine is locked so you can complain
to an administrator that someone is hogging a machine.
 
   -/+install
Allows xlock to install its own colormap if xlock runs out of colors.
May not work on with some window managers (fvwm) and does not work with
the -inroot option.
 
   -program  programname
The program
option sets the program to be used as the fortune generator.  Currently
used only for marquee and nose modes.
 
   -messagesfile  formatted-filename
The messagesfile
option sets the file to be used as the fortune generator.  The first
entry is the number of fortunes, the next line contains the first fortune.
Fortunes begin with a "%%" on a line by itself.  Currently used only for
marquee and nose modes.  If one exists, it takes precedence over the
fortune program.
 
   -messagefile  filename
The messagefile
option sets the file where the contents are the message.  Currently
used only for marquee and nose modes.  If one exists, it takes
precedence over the fortune program and messagesfile.
 
   -message  textstring
The message
option sets the message.  Currently used only for marquee and nose modes.
If one exists, it takes precedence over the fortune program,
messagesfile and messagefile.
 
   -mfont  mode-fontname
The  mfont
option sets the font to be used in the mode.  Currently used only for
marquee and nose modes.

2 SPECIAL_MODE_DEPENDENT_OPTIONS
   -imagefile  filename
The imagefile
option sets the ras or xpm file to be displayed with image or puzzle mode.
Raster files work with -install as well.
 
   -duration  seconds
Allows one to set a duration for a mode in random.
Duration of 0 is defined as infinite.
 
   -modelist  textstring
Allows one to pass a list of files to randomly display to random.
"all" will get all files but blank. "all,blank" will get all modes.
"all,-image bounce,+blank" will get all modes but image and bounce.
"bug wator" will get only bug and wator.  "random" can not be referenced.

2 **WARNING**
xlock can appear to hang if it is competing with a high-priority 
process for the CPU. For example, if xlock
is started after a process with 'nice -20'
(high priority), xlock
will take  considerable amount of time to respond.

2 SHADOW_PASSWORDS
If the machine is using a shadow password system, then
xlock may not be set up to get the real password and so must be given one
of its own. This can be either on the command line, via the
-cpasswd option, or in the file $HOME/.xlockrc ,
with the first taking precedence.  In both cases an encrypted password
is expected (see makekey(8)).  If neither is given, then
xlock will prompt for a password and will use that, also storing an
encrypted version of it in $HOME/.xlockrc
for future use.

2 BUGS
"kill -KILL xlock" causes the server that was locked to be unusable, 
since all hosts (including localhost) were removed from the access 
control list to lock out new X clients, and since xlock
could not catch SIGKILL, it terminated before restoring the access
control list.  This will leave the X server in a state where
"you can no longer connect to that server,
and this operation cannot be reversed unless you reset the server."
		-From the X11R4 Xlib Documentation, Chapter 7.

NCD terminals do not allow xlock to remove all the hosts from the access
control list.  Therefore you will need to use the "-remote" and
"-allowaccess" switches.  If you happen to run without "-allowaccess" on an
NCD terminal, xlock
will not work and you will need to reboot the terminal, or simply go into
the SETUP menus, under 'Network Parameters', and turn off TCP/IP access
control. 

2 AUTHOR
Maintained by:
 David A. Bagley      (bagleyd@hertz.njit.edu)
 The latest version is currently at:
 ftp.x.org in /contrib/applications/xlockmore-2.??.tar.gz
Original Author:
 Patrick J. Naughton	 (naughton@eng.sun.com)
 Mailstop 21-14
 Sun Microsystems Laboratories, Inc.
 Mountain View, CA  94043
 415/336-1080
with many additional contributors.
2 COPYRIGHT
Copyright (c) 1988-91 by Patrick J. Naughton
Copyright (c) 1993-95 by David A. Bagley
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. 

The original BSD daemon is Copyright (c) 1988 Marshall Kirk McKusick.
All Rights Reserved.

Sun, HP, and SGI icons have their respective copyrights.
