http://ftp.x.org/contrib/applications/xscreensaver-2.17.tar.gz
[xscreensaver] / driver / xscreensaver.man
1 .de EX          \"Begin example
2 .ne 5
3 .if n .sp 1
4 .if t .sp .5
5 .nf
6 .in +.5i
7 ..
8 .de EE
9 .fi
10 .in -.5i
11 .if n .sp 1
12 .if t .sp .5
13 ..
14 .TH XScreenSaver 1 "16-Jan-98" "X Version 11"
15 .SH NAME
16 xscreensaver - graphics hack and screen locker, launched when the user is idle
17 .SH SYNOPSIS
18 .B xscreensaver
19 [\-display \fIhost:display.screen\fP] [\-timeout \fIint\fP] [\-cycle \fIint\fP] [\-nice \fIint\fP] [\-lock] [\-no\-lock] [\-lock\-timeout \fIint\fP] [\-demo] [\-visual \fIvisual\fP] [\-install] [\-no\-install] [\-verbose] [\-silent] [\-xidle\-extension] [\-no\-xidle\-extension] [\-sgi\-extension] [\-no\-sgi\-extension] [\-mit\-extension] [\-no\-mit\-extension] [\-xrm \fIresources\fP]
20 .SH DESCRIPTION
21 The \fIxscreensaver\fP program waits until the keyboard and mouse have been 
22 idle for a period, and then runs a graphics demo chosen at random.  It 
23 turns off as soon as there is any mouse or keyboard activity.
24
25 This program can lock your terminal in order to prevent others from using it,
26 though its default mode of operation is merely to display pretty pictures on
27 your screen when it is not in use.  
28
29 The benefit that this program has over the combination of the
30 .BR xlock (1)
31 and
32 .BR xautolock (1)
33 programs is the ease with which new graphics hacks can be installed.  You
34 don't need to recompile (or even re-run) this program to add a new display
35 mode.
36 .SH GETTING STARTED
37 For the impatient, try this:
38 .EX
39         xscreensaver &
40         xscreensaver-command -demo
41 .EE
42 After a few seconds, the screen should go black, and a dialog box should
43 appear in the upper right corner.  This is \fIDemo Mode\fP.
44 .SH DEMO MODE
45 If \fIxscreensaver\fP receives the \fBDEMO\fP ClientMessage, which is done
46 by running the
47 .BR xscreensaver\-command (1)
48 program with the \fB\-demo\fP option, the screensaver will black the screen
49 and pop up a dialog box from which you can examine and experiment with the
50 client programs.
51
52 The dialog box contains a scrolling list, a text field, and a number of 
53 buttons.  
54
55 Double-clicking on one of the programs in the list will run it.  The dialog
56 box will disappear, allowing the program access to the full screen.  Clicking
57 the mouse again will bring the dialog box back.
58
59 Single-clicking in the list will place the indicated program and its args
60 in the text field to be edited.  Edit the arguments and hit return to run
61 the program with the parameters you have specified.  (Note that these are
62 one-time changes and won't be remembered; to make the changes permanent,
63 you need to edit your X resource file.)
64
65 The buttons are:
66 .TP 8
67 .B Run Next
68 Clicking this button will run the next program in the list after the 
69 currently-selected one, and will scroll around to the top when it reaches
70 the bottom.
71 .TP 8
72 .B Run Previous
73 Opposite of Run Next; at the top, it scrolls around to the bottom.
74 .TP 8
75 .B Edit Parameters
76 This pops up a second dialog box, in which you have the option to 
77 interactively change most of the screensaver's operational parameters,
78 such as its timeouts, and whether it should lock the screen.  Changing 
79 these parameters here will affect only the running \fIxscreensaver\fP 
80 process; to make the changes permanent, you need to edit your X resource
81 file.  (See below.)
82 .TP 8
83 .B Exit Demo Mode
84 Returns to normal screensaver operation.
85 .TP 8
86 .B Reinitialize
87 This causes the X resource database to be re-read, to pick up any changes
88 you might have made.  This works by causing the screensaver process to exit
89 and then restart itself with the same command-line arguments.  This is just
90 like the \fI\-restart\fP argument to 
91 .BR xscreensaver\-command (1)
92 except that when executed from this button, the screensaver will 
93 automatically return to demo mode after restarting.
94 .SH OPTIONS
95 .I xscreensaver
96 accepts the following command line options:
97 .TP 8
98 .B \-timeout \fIminutes\fP
99 The screensaver will activate after the keyboard and mouse have been idle
100 for this many minutes.  Default 10.
101 .TP 8
102 .B \-cycle \fIminutes\fP
103 After the screensaver has been running for this many minutes, the currently
104 running graphics hack sub-process will be killed (with \fBSIGTERM\fP), and a
105 new one started.  If this is 0, then the graphics hack will not be changed:
106 only one demo will run until the screensaver is deactivated by user activity.
107 Default 10.
108 .TP 8
109 .B \-nice \fIinteger\fP
110 The sub-processes created by \fIxscreensaver\fP will be ``niced'' to this
111 level, so that they are given lower priority than other processes on the
112 system, and don't increase the load unnecessarily.  The default is 20.  
113
114 (Higher numbers mean lower priority; see 
115 .BR nice (1)
116 for details.)
117 .TP 8
118 .B \-lock
119 Enable locking: before the screensaver will turn off, it requires you to
120 type the password of the person who launched the screensaver, or the root
121 password.  (Note: this doesn't work if the screensaver is launched
122 by
123 .BR xdm (1)
124 because it can't know the user-id of the logged-in user.)
125 .TP 8
126 .B \-no\-lock
127 Disable locking.  This is the default.
128 .TP 8
129 .B \-lock\-timeout \fIminutes\fP
130 This is how long after the screensaver activates that locking is enabled.
131 For example, if this is 5, and \fI\-timeout\fP is 10, then after 10 minutes,
132 the screen would blank.  If there was user activity at 12 minutes, no password
133 would be required.  But, if there was user activity at 15 minutes or later 
134 (\fI\-lock\-timeout\fP minutes after activation) then a password would be
135 required.  The default is 0, meaning that if locking is enabled, then
136 a password will be required as soon as the screensaver activates.
137 .TP 8
138 .B \-demo
139 Enter the interactive demo mode immediately after startup.  Normally
140 demo mode is invoked via the
141 .BR xscreensaver\-command (1)
142 program, but this is a shortcut for new users.  See below for a description
143 of how demo-mode works.
144 .TP 8
145 .B \-visual \fIvisual\fP
146 Specify which X visual to use by default.  Legal values are:
147 .RS 8
148 .TP 8
149 .B default
150 Use the screen's default visual (the visual of the root window.)  
151 This is the default.
152 .TP 8
153 .B best
154 Use the visual which supports the most colors.  Note, however, that the
155 visual with the most colors might be a TrueColor visual, which does not
156 support colormap animation.  Some programs have more interesting behavior
157 when run on PseudoColor visuals than on TrueColor.
158 .TP 8
159 .B mono
160 Use a monochrome visual, if there is one.
161 .TP 8
162 .B gray
163 Use a grayscale or staticgray visual, if there is one and it has more than
164 one plane (that is, it's not monochrome.)
165 .TP 8
166 .B color
167 Use the best of the color visuals, if there are any.
168 .TP 8
169 .I class
170 where \fIclass\fP is one of \fBStaticGray\fP, \fBStaticColor\fP, 
171 \fBTrueColor\fP, \fBGrayScale\fP, \fBPseudoColor\fP, or \fBDirectColor\fP.
172 Selects the deepest visual of the given class.
173 .TP 8
174 .I number
175 where \fInumber\fP (decimal or hex) is interpreted as a visual id number, 
176 as reported by the
177 .BR xdpyinfo (1)
178 program; in this way you can have finer control over exactly which visual
179 gets used, for example, to select a shallower one than would otherwise
180 have been chosen.
181
182 .RE
183 .RS 8
184 Note that this option specifies only the \fIdefault\fP visual that will
185 be used: the visual used may be overridden on a program-by-program basis.
186 See the description of the \fBprograms\fP resource, below.
187 .RE
188 .TP 8
189 .B \-install
190 Install a private colormap while the screensaver is active, so that the
191 graphics hacks can get as many colors as possible.  This is the 
192 default.  (This only applies when the screen's default visual is being
193 used, since non-default visuals get their own colormaps automatically.)
194 This can also be overridden on a per-hack basis: see the discussion of
195 the \fBdefault\-n\fP name in the section about the \fBprograms\fP resource.
196 .TP 8
197 .B \-no\-install
198 Use the default colormap.
199 .TP 8
200 .B \-verbose
201 Print diagnostics.
202 .TP 8
203 .B \-silent
204
205 .TP 8
206 .B \-xidle\-extension
207 Use the \fBXIDLE\fP server extension to decide whether the user is idle.
208 This is the default if \fIxscreensaver\fP has been compiled with support
209 for this extension.  On X11R4 or X11R5 systems, the XIdle method is faster 
210 and more reliable than what will be done otherwise, so use it if you can.
211 .TP 8
212 .B \-no\-xidle\-extension
213 Don't use the \fBXIDLE\fP server extension.
214 .TP 8
215 .B \-sgi\-extension
216 Use the SGI \fBSCREEN_SAVER\fP server extension to decide whether the user
217 is idle.  This is the default if \fIxscreensaver\fP has been compiled with
218 support for this extension (which is the default on SGI systems.).  If it
219 is available, the \fBSCREEN_SAVER\fP method is faster and more reliable than
220 what will be done otherwise, so use it if you can.
221 .TP 8
222 .B \-no\-sgi\-extension
223 Don't use the SGI \fBSCREEN_SAVER\fP server extension.
224 .TP 8
225 .B \-mit\-extension
226 Use the \fBMIT\-SCREEN\-SAVER\fP server extension to decide whether the user
227 is idle.  This is the default if \fIxscreensaver\fP has been compiled with
228 support for this extension.  However, this extension is flaky, so it's use 
229 is not really recommended.  (It also makes the \fIfade\fP option not work
230 properly.)
231 .TP 8
232 .B \-no\-mit\-extension
233 Don't use the \fBMIT\-SCREEN\-SAVER\fP server extension.
234 .SH X RESOURCES
235 \fIxscreensaver\fP understands the following resources:
236 .PP
237 .TP 8
238 .B timeout\fP (class \fBTime\fP)
239 Same as the \fI\-timeout\fP command-line option.  Default 10 minutes.
240 .TP 8
241 .B cycle\fP (class \fBTime\fP)
242 Same as the \fI\-cycle\fP command-line option.  Default 10 minutes.
243 .TP 8
244 .B nice\fP (class \fBNice\fP)
245 Same as the \fI\-nice\fP command-line option.  Default 10.
246 .TP 8
247 .B lock\fP (class \fBBoolean\fP)
248 Same as the \fI\-lock\fP command-line option.
249 .TP 8
250 .B lockTimeout\fP (class \fBTime\fP)
251 Same as the \fI\-lock\-timeout\fP command-line option.
252 .TP 8
253 .B passwdTimeout\fP (class \fBTime\fP)
254 If the screen is locked, then this is how many seconds the password dialog box
255 should be left on the screen before giving up (default 30.)  This should not
256 be too large: the X server is grabbed for the duration that the password
257 dialog box is up (for security purposes) and leaving the server grabbed for
258 too long can cause problems.
259 .TP 8
260 .B verbose\fP (class \fBBoolean\fP)
261 Same as the \fI\-verbose\fP command-line option.
262 .TP 8
263 .B xidle\fP (class \fBBoolean\fP)
264 Same as the \fI\-xidle\fP command-line option.
265 .TP 8
266 .B fade\fP (class \fBBoolean\fP)
267 If this is true, then when the screensaver activates, the current contents
268 of the screen will fade to black instead of simply winking out.  This only
269 works on displays with writable colormaps, that is, if the screen's default
270 visual is a PseudoColor visual.  Default true.  A fade will also be done when
271 switching graphics hacks (when the \fIcycle\fP timer expires.)
272 .TP 8
273 .B unfade\fP (class \fBBoolean\fP)
274 If this is true, then when the screensaver deactivates, the original contents
275 of the screen will fade in from black instead of appearing immediately.  This
276 only works on displays with writable colormaps, and if \fIfade\fP is true
277 as well.  Default false.
278 .TP 8
279 .B fadeSeconds\fP (class \fBTime\fP)
280 If \fIfade\fP is true, this is how long the fade will be in 
281 seconds (default 3.)
282 .TP 8
283 .B fadeTicks\fP (class \fBInteger\fP)
284 If \fIfade\fP is true, this is how many times a second the colormap will
285 be changed to effect a fade.  Higher numbers yield smoother fades, but
286 may make the fades take longer than the specified \fIfadeSeconds\fP if
287 your server isn't fast enough to keep up.  Default 20.
288 .TP 8
289 .B visualID\fP (class \fBVisualID\fP)
290 Same as the \fI\-visual\fP command-line option.  Default \fBdefault\fP.
291 .TP 8
292 .B installColormap\fP (class \fBBoolean\fP)
293 Same as the \fI\-install\fP command-line option.  Default true.
294 .TP 8
295 .B captureStderr\fP (class \fBBoolean\fP)
296 Whether \fIxscreensaver\fP should redirect its standard-error stream to the
297 window itself.  Since its nature is to take over the screen, you would not
298 normally see error messages generated by the screensaver or the programs it
299 runs; this resource will cause the output of all relevant programs to be
300 drawn on the screensaver window itself instead of written to the controlling
301 terminal of the screensaver driver process.  Default true.
302 .TP 8
303 .B captureStdout\fP (class \fBBoolean\fP)
304 Like \fBcaptureStderr\fP but for the standard-output stream.  Default true.
305 .TP 8
306 .B font\fP (class \fBFont\fP)
307 The font used for the stdout/stderr text, if \fBcaptureStdout\fP or
308 \fBcaptureStderr\fP are true.  Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP
309 (a 14 point fixed-width font.)
310 .TP 8
311 .B textForeground\fP (class \fBForeground\fP)
312 The foreground color used for the stdout/stderr text, if \fBcaptureStdout\fP 
313 or \fBcaptureStderr\fP are true.  Default: Yellow.
314 .TP 8
315 .B textBackground\fP (class \fBBackground\fP)
316 The background color used for the stdout/stderr text, if \fBcaptureStdout\fP 
317 or \fBcaptureStderr\fP are true.  Default: Black.
318 .TP 8
319 .B programs\fP (class \fBPrograms\fP)
320 The graphics hacks which \fIxscreensaver\fP runs when the user is idle.
321 The value of this resource is a string, one \fIsh\fP-syntax command per line.  
322 Each line must contain exactly one command -- no semicolons, no ampersands.
323
324 When the screensaver starts up, one of these is selected at random, and
325 run.  After the \fIcycle\fP period expires, it is killed, and another
326 is selected and run.
327
328 If the value of this resource is empty, then no programs will be run; the
329 screen will simply be made black.
330
331 If the display has multiple screens, then a different program will be run 
332 for each screen.
333
334 Note that you must escape the newlines; here is an example of how you
335 might set this in your \fI.Xdefaults\fP file:
336
337 .RS 8
338 .EX
339 xscreensaver.programs:  \\
340         qix -root                          \\n\\
341         ico -r -faces -sleep 1 -obj ico    \\n\\
342         xdaliclock -builtin2 -root         \\n\\
343         xv -root -rmode 5 image.gif -quit  \\n
344 .EE
345 .RE
346 .RS 8
347 Make sure your \fB$PATH\fP environment variable is set up correctly
348 \fIbefore\fP xscreensaver is launched, or it won't be able to find the
349 programs listed in the \fIprograms\fP resource.
350
351 To use a program as a screensaver, two things are required: that that
352 program draw on the root window (or be able to be configured to draw on
353 the root window); and that that program understand ``virtual root''
354 windows, as used by virtual window managers such as \fItvtwm\fP.  (Generally,
355 this is accomplished by just including the \fI"vroot.h"\fP header file in
356 the program's source.)
357
358 If there are some programs that you want to run only when using a color
359 display, and others that you want to run only when using a monochrome
360 display, you can specify that like this:
361
362 .EX
363         mono:   mono-program  -root        \\n\\
364         color:  color-program -root        \\n\\
365 .EE
366 .RE
367 .RS 8
368 More generally, you can specify the kind of visual that should be used for
369 the window on which the program will be drawing.  For example, if one 
370 program works best if it has a colormap, but another works best if it has
371 a 24-bit visual, both can be accommodated:
372
373 .EX
374         PseudoColor: cmap-program  -root   \\n\\
375         TrueColor:   24bit-program -root   \\n\\
376 .EE
377 .RE
378 .RS 8
379 (This sort of thing used to be accomplished with the \fIcolorPrograms\fP
380 and \fImonoPrograms\fP resources, but those resources have now been removed;
381 a warning will be issued if they are used.)
382
383 In addition to the symbolic visual names described above (in the section
384 about the \fI\-visual\fP command-line option) one other visual name is
385 supported in the \fIprograms\fP list:
386 .RS 1
387 .TP 4
388 .B default-n
389 This is like \fBdefault\fP, but also requests the use of the default colormap,
390 instead of a private colormap.  (That is, it behaves as if 
391 the \fI\-no\-install\fP command-line option was specified, but only for
392 this particular hack.)  This is provided because some third-party programs
393 that draw on the root window make assumptions about the visual and colormap
394 of that window: assumptions which xscreensaver can violate.
395
396 .RE
397 If you specify a particular visual for a program, and that visual does not
398 exist on the screen, then that program will not be chosen to run.  This
399 means that on displays with multiple screens of different depths, you can
400 arrange for appropriate hacks to be run on each.  For example, if one screen
401 is color and the other is monochrome, hacks that look good in mono can be 
402 run on one, and hacks that only look good in color will show up on the other.
403 .RE
404 .PP
405 .PP
406 Normally you won't need to change the following resources:
407 .PP
408 .TP 8
409 .B bourneShell\fP (class \fBBourneShell\fP)
410 The pathname of the shell that \fIxscreensaver\fP uses to start subprocesses.
411 This must be whatever your local variant of \fB/bin/sh\fP is -- in particular,
412 it must not be \fBcsh\fP.
413 .TP 8
414 .B windowCreationTimeout\fP (class \fBTime\fP)
415 When server extensions are not in use, this controls the delay between when 
416 windows are created and when \fIxscreensaver\fP selects events on them.
417 Default 30 seconds.
418 .TP 8
419 .B pointerPollTime\fP (class \fBTime\fP)
420 When server extensions are not in use, this controls how 
421 frequently \fIxscreensaver\fP checks to see if the mouse position or buttons
422 have changed.  Default 5 seconds.
423 .TP 8
424 .B initialDelay\fP (class \fBTime\fP)
425 When server extensions are not in use, \fIxscreensaver\fP will wait this many
426 seconds before selecting events on existing windows, under the assumption that 
427 \fIxscreensaver\fP is started during your login procedure, and the window 
428 state may be in flux.  Default 30 seconds.
429 .TP 8
430 .B overlayStderr\fP (class \fBBoolean\fP)
431 If \fBcaptureStderr\fP or \fBcaptureStdout\fP are True, and your server 
432 supports ``overlay'' visuals, then the text will be written into one of
433 the higher layers instead of into the same layer as the running screenhack.
434 Set this to False to disable that (though you shouldn't need to.)
435 .SH HOW IT WORKS
436 When it is time to activate the screensaver, a full-screen black window is
437 created on each screen of the display.  The window or windows is given the
438 appropriate properties so that, to any subsequently-created programs, it 
439 will appear to be a ``virtual root'' window.  Because of this, any program 
440 which draws on the root window (and which understands virtual roots) can be
441 used as a screensaver.
442
443 When the user becomes active again, the screensaver windows are unmapped and
444 the running subprocesses are killed by sending them \fBSIGTERM\fP.  This is 
445 also how the subprocesses are killed when the screensaver decides that it's
446 time to run a different demo: the old one is killed and a new one is launched.
447
448 Before launching a subprocess, \fIxscreensaver\fP stores an appropriate value
449 for \fB$DISPLAY\fP in the environment that the child will recieve.  (This is
450 so that if you start \fIxscreensaver\fP with a \fI-display\fP argument, the
451 programs which \fIxscreensaver\fP launches will draw on the same display;
452 and so that the child will end up drawing on the appropriate screen of a
453 multi-headed display.)
454
455 When the screensaver turns off, or is killed, care is taken to restore 
456 the ``real'' virtual root window if there is one.  Because of this, it is
457 important that you not kill the screensaver process with \fIkill -9\fP if
458 you are running a virtual-root window manager.  If you kill it with \-9,
459 you may need to restart your window manager to repair the damage.  This
460 isn't an issue if you aren't running a virtual-root window manager.
461
462 For all the gory details, see the commentary at the top of xscreensaver.c.
463
464 You can control a running screensaver process by using the
465 .BR xscreensaver\-command (1)
466 program (which see.)
467 .SH USING XDM(1)
468 You can run \fIxscreensaver\fP from your xdm session, so that the 
469 screensaver will run even when nobody is logged in on the console.  
470 Simply add \fB"xscreensaver &"\fP to your \fI/usr/lib/X11/xdm/Xsetup\fP 
471 file.  Because \fIxdm\fP grabs the keyboard, keypresses will not make 
472 the screensaver deactivate, but any mouse activity will.
473
474 Make sure you have \fB$PATH\fP set up correctly in the Xsetup script, or
475 \fIxdm\fP won't be able to find \fIxscreensaver\fP, and/or \fIxscreensaver\fP
476 won't be able to find its graphics hacks.
477
478 (If your system does not seem to be executing the \fIXsetup\fP file, you
479 may need to configure it to do so -- the traditional way to do this is
480 to make that file the value of the \fIDisplayManager*setup\fP resource
481 in the \fIxdm-config\fP file.  See the man page for
482 .BR xdm (1)
483 for more details.)
484
485 Users may want to add \fB"xscreensaver-command -restart"\fP to their 
486 startup scripts, so that the screensaver will be reinitialized with
487 their private resource settings when they log in.
488
489 It is safe to run this program as root (as \fIxdm\fP is likely to do.)  If 
490 run as root, \fIxscreensaver\fP changes its effective user and group ids to
491 something safe (like \fI"nobody"\fP) before connecting to the X server
492 or launching user-specified programs.
493
494 Locking doesn't work if the screensaver is launched by \fIxdm\fP.  To get
495 around this, you can run the screensaver from \fIxdm\fP without locking, 
496 and kill and restart it from your personal X startup script to enable
497 locking; for example, by using this pair of commands:
498
499 .EX
500         xscreensaver-command -exit ; xscreensaver
501 .EE
502 .SH USING CDE (COMMON DESKTOP ENVIRONMENT)
503 The easiest way to use \fIxscreensaver\fP on a system with CDE is to simply
504 switch off the built-in CDE screensaver, and use \fIxscreensaver\fP instead;
505 and second, to tell the front panel to run 
506 .BR xscreensaver\-command (1)
507 with the \fI\-lock\fP option when the \fILock\fP icon is clicked.
508
509 To accomplish this involves five steps:
510 .RS 4
511 .TP 3
512 \fB1: Switch off CDE's locker\fP
513 Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the
514 Screen section of the Style Manager.
515 .TP 3
516 \fB2: Edit sessionetc\fP
517 Edit the file \fI~/.dt/sessions/sessionetc\fP and add to it the line
518
519 .EX
520     xscreensaver &
521 .EE
522 This will cause \fIxscreensaver\fP to be launched when you log in.
523 (As always, make sure that xscreensaver and the graphics demos are on
524 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP 
525 and/or \fI.dtprofile\fP, not \fI.login\fP.)
526 .TP 3
527 \fB3: Create XScreenSaver.dt\fP
528 Create a file called \fI~/.dt/types/XScreenSaver.dt\fP with the following
529 contents:
530
531 .EX
532 ACTION XScreenSaver
533 {
534   LABEL         XScreenSaver
535   TYPE          COMMAND
536   EXEC_STRING   xscreensaver-command -lock
537   ICON          Dtkey
538   WINDOW_TYPE   NO_STDIO
539 }
540 .EE
541 This defines a ``lock'' command for the CDE front panel, that knows how
542 to talk to \fIxscreensaver\fP.
543 .TP 3
544 \fB4: Create Lock.fp\fP
545 Create a file called \fI~/.dt/types/Lock.fp\fP with the following
546 contents:
547
548 .EX
549 CONTROL Lock
550 {
551   TYPE             icon
552   CONTAINER_NAME   Switch
553   CONTAINER_TYPE   SWITCH
554   POSITION_HINTS   1
555   ICON             Fplock
556   LABEL            Lock
557   PUSH_ACTION      XScreenSaver
558   HELP_TOPIC       FPOnItemLock
559   HELP_VOLUME      FPanel
560 }
561 .EE
562 This associates the CDE front panel ``Lock'' icon with the lock command
563 we just defined in step 3.
564 .TP 3
565 \fB5: Restart\fP
566 Select ``\fIRestart Workspace Manager\fP'' from the popup menu to make
567 your changes take effect.  If things seem not to be working, check the
568 file \fI~/.dt/errorlog\fP for error messages.
569 .RE
570 .SH USING HP VUE (VISUAL USER ENVIRONMENT)
571 Since CDE is a descendant of VUE, the instructions for using xscreensaver
572 under VUE are similar to the above:
573
574 .RS 4
575 .TP 3
576 \fB1: Switch off VUE's locker\fP
577 Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the
578 Screen section of the Style Manager.
579 .TP 3
580 \fB2: Edit vue.session\fP
581 Edit the file \fI~/.vue/sessions/home/vue.session\fP and add to it
582 the line
583 .EX
584     vuesmcmd -screen 0 -cmd "xscreensaver"
585 .EE
586 This will cause \fIxscreensaver\fP to be launched when you log in.
587 (As always, make sure that xscreensaver and the graphics demos are on
588 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP
589 and/or \fI.profile\fP, not \fI.login\fP.)
590 .TP 3
591 \fB3: Edit vuewmrc\fP
592 Edit the file \fI~/.vue/vuewmrc\fP and add (or change) the Lock control:
593 .EX
594 CONTROL Lock
595 {
596   TYPE         button
597   IMAGE        lock
598   PUSH_ACTION  f.exec "xscreensaver-command -lock"
599   HELP_TOPIC   FPLock
600 }
601 .EE
602 This associates the VUE front panel ``Lock'' icon with the xscreensaver 
603 lock command.
604 .RE
605 .PP
606 .SH BUGS
607 (This is not a bug, but) note that as of release 1.32, the \fBcolorPrograms\fP 
608 and \fBmonoPrograms\fP resources are no longer used: they have been 
609 supplanted by the extended syntax of the \fBprograms\fP resource (which is
610 described above, in the \fIX Resources\fP section.)
611 .TP 8
612 .B Extensions
613 If you are not making use of one of the server extensions (\fBXIDLE\fP,
614 \fBSGI SCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in 
615 rare situations, for \fIxscreensaver\fP to interfere with event propagation 
616 and make another X program malfunction.  For this to occur, that other
617 application would need to \fInot\fP select \fBKeyPress\fP events on its 
618 non-leaf windows within the first 30 seconds of their existence, but then 
619 select for them later.  In this case, that client \fImight\fP fail to receive 
620 those events.  This isn't very likely, since programs generally select a
621 constant set of events immediately after creating their windows and then 
622 don't change them, but this is the reason that it's a good idea to install 
623 and use one of the server extensions instead, to work around this shortcoming
624 in the X protocol.
625 .TP 8
626 .B Machine Load
627 Although this program ``nices'' the subprocesses that it starts, 
628 graphics-intensive subprograms can still overload the machine by causing
629 the X server process itself (which is not ``niced'') to suck a lot of 
630 cycles.  Care should be taken to slow down programs intended for use as 
631 screensavers by inserting strategic calls to
632 .BR sleep (3)
633 or
634 .BR usleep (3)
635 (or making liberal use of any \fI\-delay\fP options which the programs 
636 may provide.)
637
638 Also, an active screensaver will cause your X server to be pretty much 
639 permanently swapped in; but the same is true of any program that draws
640 periodically, like 
641 .BR xclock (1)
642 or
643 .BR xload (1).
644 .TP 8
645 .B Latency and Responsiveness
646 If the subprocess is drawing too quickly and the connection to the X
647 server is a slow one (such as an X terminal running over a phone line) then 
648 the screensaver might not turn off right away when the user becomes active
649 again (the
650 .BR ico (1)
651 demo has this problem if being run in full-speed mode).  This can be
652 alleviated by inserting strategic calls to
653 .BR XSync (3)
654 in code intended for use as a screensaver.  This prevents too much graphics
655 activity from being buffered up.
656 .TP 8
657 .B Locking and XDM
658 Locking doesn't work if the screensaver is launched by \fIxdm\fP.
659 The reason for this is that when it is launched by \fIxdm\fP, the
660 screensaver process is owned by some standard user id (such as \fIroot\fP
661 or \fIdaemon\fP) instead of the user who is logged in on the console:
662 because the screensaver was started \fIbefore\fP anyone was logged in.
663 In order for the screensaver to prompt for the password of the person
664 who had logged in from \fIxdm\fP, it would need to know who that user was, 
665 and there is no reliable and safe way to figure that out.  (And even if 
666 there was, there would be some other security issues here as well.)
667
668 So if you want to use it as a locker, you must start it with your user id.
669 If it has already been started by \fIxdm\fP, you can kill it with
670 \fBxscreensaver\-command -exit\fP, and then start it again as you.
671 .TP 8
672 .B Locking and root logins
673 An implication of the above is that if you log in as \fIroot\fP on the
674 console, xscreensaver will refuse to lock the screen (because it can't tell
675 the difference between \fIroot\fP being logged in on the console, and a
676 normal user being logged in on the console but xscreensaver having been run
677 by \fIxdm\fP.)
678
679 The solution to this is simple: you shouldn't be logging in on the console
680 as \fIroot\fP in the first place (what, are you crazy or something?)  You 
681 should log in as you, and
682 .BR su (1)
683 to \fIroot\fP as necessary.  People who spend their day logged in 
684 as \fIroot\fP are just begging for disaster.
685 .TP 8
686 .B Passwords
687 If you get an error message like ``couldn't get password of \fIuser\fP'' 
688 then this probably means that you're on a system in which the
689 .BR getpwent (3)
690 library routine can only be effectively used by root.  If this is the case, 
691 then \fIxscreensaver\fP must be installed as setuid to root.  Care has 
692 been taken to make this a safe thing to do.  
693
694 It also may mean that your system uses shadow passwords instead of the
695 standard \fIgetpwent\fP interface; in that case, you may need to change
696 some options with \fIconfigure\fP and recompile.
697
698 If you change your password after xscreensaver has been launched, it will
699 continue using your old password to unlock the screen until xscreensaver
700 is restarted.  This turns out to be kind of hard to fix.  (But remember,
701 kids!  Unix security doesn't do much more than keep honest people honest...)
702 .TP 8
703 .B Colormap lossage: TWM
704 The \fBinstallColormap\fP option doesn't work very well with the
705 .BR twm (1)
706 window manager and its descendants.  
707
708 There is a race condition between the screensaver and this window manager,
709 which can result in the screensaver's colormap not getting installed
710 properly, meaning the graphics hacks will appear in essentially random
711 colors.  (If the screen goes white instead of black, this is probably why.)
712
713 The
714 .BR mwm (1)
715 and
716 .BR olwm (1)
717 window managers don't seem to have this problem.  The race condition exists
718 because X does not provide a way for an OverrideRedirect window to have its
719 own colormap, short of grabbing the server (which is neither a good idea, nor
720 really possible with the current design.)  What happens is that, as soon as
721 the screensaver installs its colormap, \fBtwm\fP responds to 
722 the \fBColormapNotify\fP event that is generated by re-instaling the default
723 colormap.  Apparently, \fBtwm\fP doesn't \fIalways\fP do this; it seems to do
724 it regularly if the screensaver is activated from a menu item, but seems to
725 not do it if the screensaver comes on of its own volition, or is activated
726 from another console.  Any thoughts on this problem are welcome...
727 .TP 8
728 .B Colormap lossage: XV, XAnim, XEarth
729 Some programs don't operate properly on visuals other than the default one,
730 or with colormaps other than the default one.  See the discussion of the
731 magic "default-n" visual name in the section about the \fBprograms\fP 
732 resource.  When programs only work with the default colormap, you need to
733 use a syntax like this:
734 .EX
735     default-n: xv -root image-1.gif -quit  \\n\\
736     default-n: xearth -nostars -wait 0     \\n\\
737 .EE
738 It would also work to turn off the \fBinstallColormap\fP option altogether,
739 but that would deny extra colors to those programs that \fIcan\fP take
740 advantage of them.
741 .TP 8
742 .B XView Clients
743 Apparently there are some problems with XView programs getting confused
744 and thinking that the screensaver window is the real root window even when
745 the screensaver is not active: ClientMessages intended for the window manager
746 are sent to the screensaver window instead.  This could be solved by making
747 xscreensaver forward all unrecognised ClientMessages to the real root window,
748 but there may be other problems as well.  If anyone has any insight on the
749 cause of this problem, please let me know.  (XView is an X11 toolkit that 
750 implements the (quite abominable) Sun OpenLook look-and-feel.)
751 .TP 8
752 .B MIT Extension and Fading
753 When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with 
754 the \fBfade\fP option, you may notice an unattractive flicker just before 
755 the fade begins.  This is because the server maps a black window just before 
756 it tells the \fIxscreensaver\fP process to activate.  The \fIxscreensaver\fP 
757 process immediately unmaps that window, but this results in a flicker.  I 
758 haven't figured a way  to get around this; it seems to be a fundamental
759 property of the (mis-) design of this server extension.
760 .TP 8
761 .B Lesstif (Motif clone)
762 Demo mode is buggy if XScreenSaver was compiled against really old versions
763 Lesstif; if you use Lesstif, use version 0.82 or newer.
764 .TP 8
765 .B Athena Widgets
766 If you compiled against the Athena widget toolkit, the dialog boxes are
767 pretty ugly, especially the password dialog.  Use Motif!  If you don't
768 have OSF Motif, use GNU Lesstif, it's free: http://www.lesstif.org/
769 .TP 8
770 .B SGI Power Saver
771 If you're running Irix 6.3, you might find that your monitor is powering down
772 after an hour or two even if you've told it not to.  This is fixed by SGI
773 patches 2447 and 2537.
774 .TP 8
775 .B Red Hot Lava
776 There need to be a lot more graphics hacks.  In particular, there should be
777 a simulation of a Lavalite (tm).
778 .SH ENVIRONMENT
779 .PP
780 .TP 8
781 .B DISPLAY
782 to get the default host and display number, and to inform the sub-programs
783 of the screen on which to draw.
784 .TP 8
785 .B PATH
786 to find the sub-programs to run.
787 .TP 8
788 .B XENVIRONMENT
789 to get the name of a resource file that overrides the global resources
790 stored in the RESOURCE_MANAGER property.
791 .SH UPGRADES
792 The latest version can always be found at 
793 http://people.netscape.com/jwz/xscreensaver/
794 .SH SEE ALSO
795 .BR X (1),
796 .BR xscreensaver\-command (1),
797 .BR xdm (1),
798 .BR ant (1),
799 .BR atlantis (1),
800 .BR attraction (1),
801 .BR blitspin (1),
802 .BR bouboule (1),
803 .BR braid (1),
804 .BR bubbles (1),
805 .BR cage (1),
806 .BR coral (1),
807 .BR cynosure (1),
808 .BR decayscreen (1),
809 .BR deco (1),
810 .BR drift (1),
811 .BR fadeplot (1),
812 .BR flag (1),
813 .BR flame (1),
814 .BR forest (1),
815 .BR galaxy (1),
816 .BR gears (1),
817 .BR goop (1),
818 .BR grav (1),
819 .BR greynetic (1),
820 .BR halo (1),
821 .BR helix (1),
822 .BR hopalong (1),
823 .BR hypercube (1),
824 .BR ifs (1),
825 .BR imsmap (1),
826 .BR jigsaw (1),
827 .BR julia (1),
828 .BR kaleidescope (1),
829 .BR laser (1),
830 .BR lightning (1),
831 .BR lisa (1),
832 .BR lissie (1),
833 .BR lmorph (1),
834 .BR maze (1),
835 .BR moebius (1),
836 .BR moire (1),
837 .BR moire2 (1),
838 .BR morph3d (1),
839 .BR mountain (1),
840 .BR munch (1),
841 .BR noseguy (1),
842 .BR pedal (1),
843 .BR penrose (1),
844 .BR pipes (1),
845 .BR pyro (1),
846 .BR qix (1),
847 .BR rd-bomb (1),
848 .BR rocks (1),
849 .BR rorschach (1),
850 .BR rotor (1),
851 .BR rubik (1),
852 .BR sierpinski (1),
853 .BR slidescreen (1),
854 .BR slip (1),
855 .BR sphere (1),
856 .BR spiral (1),
857 .BR sproingies (1),
858 .BR stairs (1),
859 .BR starfish (1),
860 .BR strange (1),
861 .BR superquadrics (1),
862 .BR swirl (1),
863 .BR triangle (1),
864 .BR vines (1),
865 .BR worm (1),
866 .BR xjack (1),
867 .BR xlyap (1),
868 .BR xroger (1),
869 .BR bongo (1),
870 .BR ico (1),
871 .BR xaos (1),
872 .BR xbouncebits (1),
873 .BR xcthugha (1),
874 .BR xdaliclock (1),
875 .BR xfishtank (1),
876 .BR xmountains (1),
877 .BR xsplinefun (1),
878 .BR xswarm (1),
879 .BR xtacy (1),
880 .BR xv (1),
881 .BR xwave (1).
882 .SH COPYRIGHT
883 Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
884 by Jamie Zawinski.  Permission to use, copy, modify, distribute, and sell
885 this software and its documentation for any purpose is hereby granted without
886 fee, provided that the above copyright notice appear in all copies and that
887 both that copyright notice and this permission notice appear in supporting
888 documentation.  No representations are made about the suitability of this
889 software for any purpose.  It is provided "as is" without express or implied
890 warranty.
891 .SH AUTHOR
892 Jamie Zawinski <jwz@netscape.com>.  Written in late 1991; first posted
893 to comp.sources.x on 13-Aug-1992.
894
895 Please let me know if you find any bugs or make any improvements.
896 .SH ACKNOWLEDGEMENTS
897 Thanks to David Wojtowicz for implementing \fIlockTimeout\fP.
898
899 Thanks to Martin Kraemer for adding support for shadow passwords and
900 locking-disabled diagnostics.
901
902 Thanks to the many people who have contributed graphics demos to the package.
903
904 Thanks to Patrick Moreau for the VMS port.
905
906 Thanks to Mark Bowyer for figuring out how to hook it up to CDE.
907
908 And huge thanks to Jon A. Christopher for implementing the Athena dialog
909 support, back in the days before Lesstif was a viable alternative to Motif.