http://ftp.x.org/contrib/applications/xscreensaver-3.10.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 "27-Apr-99 (3.10)" "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] \
20 [\-timeout \fIint\fP] \
21 [\-cycle \fIint\fP] \
22 [\-lock\-mode] \
23 [\-no\-lock\-mode] \
24 [\-lock\-timeout \fIint\fP] \
25 [\-visual \fIvisual\fP] \
26 [\-install] \
27 [\-no\-install] \
28 [\-verbose] \
29 [\-silent] \
30 [\-timestamp] \
31 [\-capture\-stderr] \
32 [\-no\-capture\-stderr] \
33 [\-splash] \
34 [\-no\-splash] \
35 [\-nice \fIint\fP] \
36 [\-mit\-extension] \
37 [\-no\-mit\-extension] \
38 [\-sgi\-extension] \
39 [\-no\-sgi\-extension] \
40 [\-xidle\-extension] \
41 [\-no\-xidle\-extension] \
42 [\-proc\-interrupts] \
43 [\-no\-proc\-interrupts] \
44 [\-xrm \fIresources\fP]
45 .SH DESCRIPTION
46 The \fIxscreensaver\fP program waits until the keyboard and mouse have been 
47 idle for a period, and then runs a graphics demo chosen at random.  It 
48 turns off as soon as there is any mouse or keyboard activity.
49
50 This program can lock your terminal in order to prevent others from using it,
51 though its default mode of operation is merely to display pretty pictures on
52 your screen when it is not in use.  
53
54 The benefit that this program has over the combination of the
55 .BR xlock (1)
56 and
57 .BR xautolock (1)
58 programs is the ease with which new graphics hacks can be installed.  You
59 don't need to recompile (or even re-run) this program to add a new display
60 mode.
61 .SH GETTING STARTED
62 For the impatient, try this:
63 .EX
64 xscreensaver &
65 xscreensaver-demo
66 .EE
67 The
68 .BR xscreensaver-demo (1)
69 program should pop up a dialog box that lets you experiment with the
70 xscreensaver settings and graphics modes.
71
72 .B Note:
73 unlike
74 .BR xlock (1),
75 xscreensaver has a client-server model: the \fIxscreensaver\fP program is a
76 daemon that runs in the background; it is controlled by the foreground
77 .BR xscreensaver-demo (1)
78 and
79 .BR xscreensaver-command (1)
80 programs.
81 .SH CONFIGURATION
82 Options to \fIxscreensaver\fP are specified in one of two places: in 
83 a \fI.xscreensaver\fP file in your home directory; or in the X resource
84 database.  If the \fI.xscreensaver\fP file exists, it overrides any settings
85 in the resource database.  
86
87 The syntax of the \fI.xscreensaver\fP file is similar to that of
88 the \fI.Xdefaults\fP file; for example, to set the \fItimeout\fP paramter
89 in the \fI.xscreensaver\fP file, you would write the following:
90 .EX
91 timeout: 5
92 .EE
93 whereas, in the \fI.Xdefaults\fP file, you would write
94 .EX
95 xscreensaver.timeout: 5
96 .EE
97 If you change a setting in the \fI.xscreensaver\fP file while xscreensaver
98 is already running, it will notice this, and reload the file.  (The file will
99 be reloaded the next time the screen saver needs to take some action, such as
100 blanking or unblanking the screen, or picking a new graphics mode.)
101
102 If you change a setting in your X resource database, or if you want
103 xscreensaver to notice your changes immediately instead of the next time
104 it wakes up, then you will need to tell the running xscreensaver process
105 to re-initialize itself, like so:
106 .EX
107 xscreensaver-command -restart
108 .EE
109 Note that if you changed the \fI.Xdefaults\fP file, you might also need to run
110 .BR xrdb (1):
111 .EX
112 xrdb < ~/.Xdefaults
113 .EE
114 If you want to set the system-wide defaults, then make your edits to
115 the xscreensaver app-defaults file, which should have been installed
116 when xscreensaver itself was installed.  The app-defaults file will
117 usually be named /usr/lib/X11/app-defaults/XScreenSaver, but different
118 systems might keep it in a different place (for example,
119 /usr/openwin/lib/app-defaults/XScreenSaver on Solaris.)
120
121 When settings are changed in the Preferences dialog box (see above)
122 the current settings will be written to the \fI.xscreensaver\fP file.
123 (The \fI.Xdefaults\fP file and the app-defaults file will never be
124 written by xscreensaver itself.)
125 .PP
126 .TP 8
127 .B timeout\fP (class \fBTime\fP)
128 The screensaver will activate (blank the screen) after the keyboard and
129 mouse have been idle for this many minutes.  Default 10 minutes.
130 .TP 8
131 .B cycle\fP (class \fBTime\fP)
132 After the screensaver has been running for this many minutes, the currently
133 running graphics-hack sub-process will be killed (with \fBSIGTERM\fP), and a
134 new one started.  If this is 0, then the graphics hack will never be changed:
135 only one demo will run until the screensaver is deactivated by user activity.
136 Default 10 minutes.
137 .TP 8
138 .B lock\fP (class \fBBoolean\fP)
139 Enable locking: before the screensaver will turn off, it will require you 
140 to type the password of the logged-in user (really, the person who ran
141 xscreensaver), or the root password.  (\fBNote:\fP this doesn't work if the
142 screensaver is launched by
143 .BR xdm (1)
144 because it can't know the user-id of the logged-in user.  See 
145 the ``\fIUsing XDM(1)\fP'' section, below.
146 .TP 8
147 .B lockTimeout\fP (class \fBTime\fP)
148 If locking is enabled, this controls the length of the ``grace period''
149 between when the screensaver activates, and when the screen becomes locked.
150 For example, if this is 5, and \fI\-timeout\fP is 10, then after 10 minutes,
151 the screen would blank.  If there was user activity at 12 minutes, no password
152 would be required to un-blank the screen.  But, if there was user activity
153 at 15 minutes or later (that is, \fI\-lock\-timeout\fP minutes after 
154 activation) then a password would be required.  The default is 0, meaning
155 that if locking is enabled, then a password will be required as soon as the 
156 screen blanks.
157 .TP 8
158 .B passwdTimeout\fP (class \fBTime\fP)
159 If the screen is locked, then this is how many seconds the password dialog box
160 should be left on the screen before giving up (default 30 seconds.)  This
161 should not be too large: the X server is grabbed for the duration that the
162 password dialog box is up (for security purposes) and leaving the server 
163 grabbed for too long can cause problems.
164 .TP 8
165 .B visualID\fP (class \fBVisualID\fP)
166 Specify which X visual to use by default.  (Note carefully that this resource
167 is called \fBvisualID\fP, not merely \fBvisual\fP; if you set the \fBvisual\fP
168 resource instead, things will malfunction in obscure ways for obscure reasons.)
169
170 Legal values for the \fBVisualID\fP resource are:
171 .RS 8
172 .TP 8
173 .B default
174 Use the screen's default visual (the visual of the root window.)  
175 This is the default.
176 .TP 8
177 .B best
178 Use the visual which supports the most colors.  Note, however, that the
179 visual with the most colors might be a TrueColor visual, which does not
180 support colormap animation.  Some programs have more interesting behavior
181 when run on PseudoColor visuals than on TrueColor.
182 .TP 8
183 .B mono
184 Use a monochrome visual, if there is one.
185 .TP 8
186 .B gray
187 Use a grayscale or staticgray visual, if there is one and it has more than
188 one plane (that is, it's not monochrome.)
189 .TP 8
190 .B color
191 Use the best of the color visuals, if there are any.
192 .TP 8
193 .I class
194 where \fIclass\fP is one of \fBStaticGray\fP, \fBStaticColor\fP, 
195 \fBTrueColor\fP, \fBGrayScale\fP, \fBPseudoColor\fP, or \fBDirectColor\fP.
196 Selects the deepest visual of the given class.
197 .TP 8
198 .I number
199 where \fInumber\fP (decimal or hex) is interpreted as a visual id number, 
200 as reported by the
201 .BR xdpyinfo (1)
202 program; in this way you can have finer control over exactly which visual
203 gets used, for example, to select a shallower one than would otherwise
204 have been chosen.
205
206 .RE
207 .RS 8
208 Note that this option specifies only the \fIdefault\fP visual that will
209 be used: the visual used may be overridden on a program-by-program basis.
210 See the description of the \fBprograms\fP resource, below.
211 .RE
212 .TP 8
213 .B installColormap\fP (class \fBBoolean\fP)
214 Install a private colormap while the screensaver is active, so that the
215 graphics hacks can get as many colors as possible.  This is the 
216 default.  (This only applies when the screen's default visual is being
217 used, since non-default visuals get their own colormaps automatically.)
218 This can also be overridden on a per-hack basis: see the discussion of
219 the \fBdefault\-n\fP name in the section about the \fBprograms\fP resource.
220 .TP 8
221 .B verbose\fP (class \fBBoolean\fP)
222 Whether to print diagnostics.  Default false.
223 .TP 8
224 .B timestamp\fP (class \fBBoolean\fP)
225 Whether to print the time of day along with any other diagnostic messages.
226 Default false.
227 .TP 8
228 .B splash\fP (class \fBBoolean\fP)
229 Whether to display a splash screen at startup.  Default true.
230 .TP 8
231 .B splashDuration\fP (class \fBTime\fP)
232 How long the splash screen should remain visible; default 5 seconds.
233 .TP 8
234 .B helpURL\fP (class \fBURL\fP)
235 The splash screen has a \fIHelp\fP button on it.  When you press it, it will
236 display the web page indicated here in your web browser.
237 .TP 8
238 .B loadURL\fP (class \fBLoadURL\fP)
239 This is the shell command used to load a URL into your web browser.
240 The default setting will load it into Netscape if it is already running,
241 otherwise, will launch a new Netscape looking at the \fIhelpURL\fP.
242 .TP 8
243 .B demoCommand\fP (class \fBDemoCommand\fP)
244 This is the shell command run when the \fIDemo\fP button on the splash window
245 is pressed.  It defaults to \fIxscreensaver\-demo\fP.
246 .TP 8
247 .B prefsCommand\fP (class \fBPrefsCommand\fP)
248 This is the shell command run when the \fIPrefs\fP button on the splash window
249 is pressed.  It defaults to \fIxscreensaver\-demo\ \-prefs\fP.
250 .TP 8
251 .B nice\fP (class \fBNice\fP)
252 The sub-processes created by \fIxscreensaver\fP will be ``niced'' to this
253 level, so that they are given lower priority than other processes on the
254 system, and don't increase the load unnecessarily.  The default is 10.  
255
256 (Higher numbers mean lower priority; see 
257 .BR nice (1)
258 for details.)
259 .TP 8
260 .B fade\fP (class \fBBoolean\fP)
261 If this is true, then when the screensaver activates, the current contents
262 of the screen will fade to black instead of simply winking out.  This only
263 works on displays with writable colormaps, that is, if the screen's default
264 visual is a PseudoColor visual.  A fade will also be done when
265 switching graphics hacks (when the \fIcycle\fP timer expires.)
266 Default: true.  
267 .TP 8
268 .B unfade\fP (class \fBBoolean\fP)
269 If this is true, then when the screensaver deactivates, the original contents
270 of the screen will fade in from black instead of appearing immediately.  This
271 only works on displays with writable colormaps, and if \fIfade\fP is true
272 as well.  Default false.
273 .TP 8
274 .B fadeSeconds\fP (class \fBTime\fP)
275 If \fIfade\fP is true, this is how long the fade will be in 
276 seconds (default 3 seconds.)
277 .TP 8
278 .B fadeTicks\fP (class \fBInteger\fP)
279 If \fIfade\fP is true, this is how many times a second the colormap will
280 be changed to effect a fade.  Higher numbers yield smoother fades, but
281 may make the fades take longer than the specified \fIfadeSeconds\fP if
282 your server isn't fast enough to keep up.  Default 20.
283 .TP 8
284 .B captureStderr\fP (class \fBBoolean\fP)
285 Whether \fIxscreensaver\fP should redirect its stdout and stderr streams to
286 the window itself.  Since its nature is to take over the screen, you would not
287 normally see error messages generated by xscreensaver or the sub-programs it
288 runs; this resource will cause the output of all relevant programs to be
289 drawn on the screensaver window itself, as well as being written to the
290 controlling terminal of the screensaver driver process.  Default true.
291 .TP 8
292 .B font\fP (class \fBFont\fP)
293 The font used for the stdout/stderr text, if \fBcaptureStderr\fP is true.
294 Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP (a 14 point fixed-width font.)
295 .TP 8
296 .B programs\fP (class \fBPrograms\fP)
297 The graphics hacks which \fIxscreensaver\fP runs when the user is idle.
298 The value of this resource is a string, one \fIsh\fP-syntax command per line.  
299 Each line must contain exactly one command: no semicolons, no ampersands.
300
301 When the screensaver starts up, one of these is selected at random, and
302 run.  After the \fIcycle\fP period expires, it is killed, and another
303 is selected and run.
304
305 If the value of this resource is empty, then no programs will be run; the
306 screen will simply be made black.
307
308 If the display has multiple screens, then a different program will be run
309 for each screen.  (All screens are blanked and unblanked simultaniously.)
310
311 Note that you must escape the newlines; here is an example of how you
312 might set this in your \fI~/.xscreensaver\fP file:
313
314 .RS 8
315 .EX
316 programs:  \\
317        qix -root                          \\n\\
318        ico -r -faces -sleep 1 -obj ico    \\n\\
319        xdaliclock -builtin2 -root         \\n\\
320        xv -root -rmode 5 image.gif -quit  \\n
321 .EE
322 .RE
323 .RS 8
324 Make sure your \fB$PATH\fP environment variable is set up correctly
325 \fIbefore\fP xscreensaver is launched, or it won't be able to find the
326 programs listed in the \fIprograms\fP resource.
327
328 To use a program as a screensaver, two things are required: that that
329 program draw on the root window (or be able to be configured to draw on
330 the root window); and that that program understand ``virtual root''
331 windows, as used by virtual window managers such as
332 .BR tvtwm (1).
333 (Generally, this is accomplished by just including the \fI"vroot.h"\fP 
334 header file in the program's source.)
335
336 If there are some programs that you want to run only when using a color
337 display, and others that you want to run only when using a monochrome
338 display, you can specify that like this:
339 .EX
340        mono:   mono-program  -root        \\n\\
341        color:  color-program -root        \\n\\
342 .EE
343 .RE
344 .RS 8
345 More generally, you can specify the kind of visual that should be used for
346 the window on which the program will be drawing.  For example, if one 
347 program works best if it has a colormap, but another works best if it has
348 a 24-bit visual, both can be accommodated:
349 .EX
350        PseudoColor: cmap-program  -root   \\n\\
351        TrueColor:   24bit-program -root   \\n\\
352 .EE
353 .RE
354 .RS 8
355 In addition to the symbolic visual names described above (in the discussion
356 of the \fIvisualID\fP resource) one other visual name is supported in
357 the \fIprograms\fP list:
358 .RS 1
359 .TP 4
360 .B default-n
361 This is like \fBdefault\fP, but also requests the use of the default colormap,
362 instead of a private colormap.  (That is, it behaves as if 
363 the \fI\-no\-install\fP command-line option was specified, but only for
364 this particular hack.)  This is provided because some third-party programs
365 that draw on the root window (notably: 
366 .BR xv (1),
367 and
368 .BR xearth (1))
369 make assumptions about the visual and colormap of the root window: 
370 assumptions which xscreensaver can violate.
371
372 .RE
373 If you specify a particular visual for a program, and that visual does not
374 exist on the screen, then that program will not be chosen to run.  This
375 means that on displays with multiple screens of different depths, you can
376 arrange for appropriate hacks to be run on each.  For example, if one screen
377 is color and the other is monochrome, hacks that look good in mono can be 
378 run on one, and hacks that only look good in color will show up on the other.
379 .RE
380 .PP
381 .PP
382 Normally you won't need to change the following resources:
383 .PP
384 .TP 8
385 .B pointerPollTime\fP (class \fBTime\fP)
386 When server extensions are not in use, this controls how 
387 frequently \fIxscreensaver\fP checks to see if the mouse position or buttons
388 have changed.  Default 5 seconds.
389 .TP 8
390 .B windowCreationTimeout\fP (class \fBTime\fP)
391 When server extensions are not in use, this controls the delay between when 
392 windows are created and when \fIxscreensaver\fP selects events on them.
393 Default 30 seconds.
394 .TP 8
395 .B initialDelay\fP (class \fBTime\fP)
396 When server extensions are not in use, \fIxscreensaver\fP will wait this many
397 seconds before selecting events on existing windows, under the assumption that 
398 \fIxscreensaver\fP is started during your login procedure, and the window 
399 state may be in flux.  Default 0.  (This used to default to 30, but that was
400 back in the days when slow machines and X terminals were more common...)
401 .TP 8
402 .B sgiSaverExtension\fP (class \fBBoolean\fP)
403 There are a number of different X server extensions which can make
404 xscreensaver's job easier.  The next few resources specify whether these
405 extensions should be utilized if they are available.
406
407 This resource controls whether the SGI \fBSCREEN_SAVER\fP server extension
408 will be used to decide whether the user is idle.  This is the default 
409 if \fIxscreensaver\fP has been compiled with support for this 
410 extension (which is the default on SGI systems.).  If it is available, 
411 the \fBSCREEN_SAVER\fP method is faster and more reliable than what will
412 be done otherwise, so use it if you can.  (This extension is only available
413 on Silicon Graphics systems, unfortunately.)
414 .TP 8
415 .B mitSaverExtension\fP (class \fBBoolean\fP)
416 This resource controls whether the \fBMIT\-SCREEN\-SAVER\fP server extension
417 will be used to decide whether the user is idle.  However, the default for
418 this resource is \fIfalse\fP, because even if this extension is available,
419 it is flaky (and it also makes the \fBfade\fP option not work properly.)
420 Use of this extension is not recommended.
421 .TP 8
422 .B xidleExtension\fP (class \fBBoolean\fP)
423 This resource controls whether the \fBXIDLE\fP server extension will be
424 used to decide whether the user is idle.  This is the default 
425 if \fIxscreensaver\fP has been compiled with support for this extension.
426 (This extension is only available for X11R4 and X11R5 systems, unfortunately.)
427 .TP 8
428 .B procInterrupts\fP (class \fBBoolean\fP)
429 This resource controls whether the \fB/proc/interrupts\fP file should be
430 consulted to decide whether the user is idle.  This is the default
431 if \fIxscreensaver\fP has been compiled on a system which supports this
432 mechanism (i.e., Linux systems.)  
433
434 The benefit to doing this is that \fIxscreensaver\fP can note that the user
435 is active even when the X console is not the active one: if the user is 
436 typing in another virtual console, xscreensaver will notice that and will
437 fail to activate.  For example, if you're playing Quake in VGA-mode, 
438 xscreensaver won't wake up in the middle of your game and start competing 
439 for CPU.
440
441 The drawback to doing this is that perhaps you \fIreally do\fP want idleness
442 on the X console to cause the X display to lock, even if there is activity
443 on other virtual consoles.  If you want that, then set this option to False.
444 (Or just lock the X console manually.)
445
446 The default value for this resource is True, on systems where it works.
447 .TP 8
448 .B overlayStderr\fP (class \fBBoolean\fP)
449 If \fBcaptureStderr\fP is True, and your server supports ``overlay'' visuals,
450 then the text will be written into one of the higher layers instead of into
451 the same layer as the running screenhack.  Set this to False to disable 
452 that (though you shouldn't need to.)
453 .TP 8
454 .B overlayTextForeground\fP (class \fBForeground\fP)
455 The foreground color used for the stdout/stderr text, if \fBcaptureStderr\fP
456 is true.  Default: Yellow.
457 .TP 8
458 .B overlayTextBackground\fP (class \fBBackground\fP)
459 The background color used for the stdout/stderr text, if \fBcaptureStderr\fP
460 is true.  Default: Black.
461 .TP 8
462 .B bourneShell\fP (class \fBBourneShell\fP)
463 The pathname of the shell that \fIxscreensaver\fP uses to start subprocesses.
464 This must be whatever your local variant of \fB/bin/sh\fP is: in particular,
465 it must not be \fBcsh\fP.
466 .SH COMMAND-LINE OPTIONS
467 .I xscreensaver
468 also accepts the following command line options.  Except for 
469 the \fI\-display\fP option, these command-line options are all 
470 simply shorthand for the X resources described in 
471 the \fIConfiguration\fP section, above.
472 .TP 8
473 .B \-display \fIhost:display.screen\fP
474 The X display to use.  For displays with multiple screens, XScreenSaver 
475 will manage all screens on the display simultaniously; the \fIscreen\fP 
476 argument (the ``default'' screen) says which screen should be used for
477 dialog boxes (the password window, \fIDemo Mode\fP, etc.)
478 .TP 8
479 .B \-timeout \fIminutes\fP
480 Same as the \fItimeout\fP resource.
481 .TP 8
482 .B \-cycle \fIminutes\fP
483 Same as the \fIcycle\fP resource.
484 .TP 8
485 .B \-lock\-mode
486 Same as setting the \fIlock\fP resource to \fItrue\fP.
487 .TP 8
488 .B \-no\-lock\-mode
489 Same as setting the \fIlock\fP resource to \fIfalse\fP.
490 .TP 8
491 .B \-lock\-timeout \fIminutes\fP
492 Same as the \fIlockTimeout\fP resource.
493 .TP 8
494 .B \-visual \fIvisual\fP
495 Same as the \fIvisualID\fP resource.
496 .TP 8
497 .B \-install
498 Same as setting the \fIinstallColormap\fP resource to \fItrue\fP.
499 .TP 8
500 .B \-no\-install
501 Same as setting the \fIinstallColormap\fP resource to \fIfalse\fP.
502 .TP 8
503 .B \-verbose
504 Same as setting the \fIverbose\fP resource to \fItrue\fP.
505 .TP 8
506 .B \-silent
507 Same as setting the \fIverbose\fP resource to \fIfalse\fP.
508 .TP 8
509 .B \-timestamp
510 Same as setting the \fItimestamp\fP resource to \fItrue\fP.
511 .TP 8
512 .B \-capture\-stderr
513 Same as setting the \fIcaptureStderr\fP resource to \fItrue\fP.
514 .TP 8
515 .B \-no\-capture\-stderr
516 Same as setting the \fIcaptureStderr\fP resource to \fIfalse\fP.
517 .TP 8
518 .B \-splash
519 Same as setting the \fIsplash\fP resource to \fItrue\fP.
520 .TP 8
521 .B \-no\-splash
522 Same as setting the \fIsplash\fP resource to \fIfalse\fP.
523 .TP 8
524 .B \-nice \fIinteger\fP
525 Same as the \fInice\fP resource.
526 .TP 8
527 .B \-sgi\-extension
528 Same as setting the \fIsgiSaverExtension\fP resource to \fItrue\fP.
529 .TP 8
530 .B \-no\-sgi\-extension
531 Same as setting the \fIsgiSaverExtension\fP resource to \fIfalse\fP.
532 .TP 8
533 .B \-mit\-extension
534 Same as setting the \fImitSaverExtension\fP resource to \fItrue\fP.
535 .TP 8
536 .B \-no\-mit\-extension
537 Same as setting the \fImitSaverExtension\fP resource to \fIfalse\fP.
538 .TP 8
539 .B \-xidle\-extension
540 Same as setting the \fIxidleExtension\fP resource to \fItrue\fP.
541 .TP 8
542 .B \-no\-xidle\-extension
543 Same as setting the \fIxidleExtension\fP resource to \fIfalse\fP.
544 .TP 8
545 .B \-proc\-interrupts
546 Same as setting the \fIprocInterrupts\fP resource to \fItrue\fP.
547 .TP 8
548 .B \-no\-proc\-interrupts
549 Same as setting the \fIprocInterrupts\fP resource to \fIfalse\fP.
550 .TP 8
551 .B \-xrm \fIresource-specification\fP
552 As with all other Xt programs, you can specify X resources on the command-line
553 using the \fI\-xrm\fP argument.  Most of the interesting resources have 
554 command-line equivalents, however.
555 .SH HOW IT WORKS
556 When it is time to activate the screensaver, a full-screen black window is
557 created on each screen of the display.  Each window is created in such a way
558 that, to any subsequently-created programs, it will appear to be a ``virtual
559 root'' window.  Because of this, any program which draws on the root 
560 window (and which understands virtual roots) can be used as a screensaver.
561
562 When the user becomes active again, the screensaver windows are unmapped, and
563 the running subprocesses are killed by sending them \fBSIGTERM\fP.  This is 
564 also how the subprocesses are killed when the screensaver decides that it's
565 time to run a different demo: the old one is killed and a new one is launched.
566
567 Before launching a subprocess, \fIxscreensaver\fP stores an appropriate value
568 for \fB$DISPLAY\fP in the environment that the child will recieve.  (This is
569 so that if you start \fIxscreensaver\fP with a \fI-display\fP argument, the
570 programs which \fIxscreensaver\fP launches will draw on the same display;
571 and so that the child will end up drawing on the appropriate screen of a
572 multi-headed display.)
573
574 When the screensaver turns off, or is killed, care is taken to restore 
575 the ``real'' virtual root window if there is one.  Because of this, it is
576 important that you not kill the screensaver process with \fIkill -9\fP if
577 you are running a virtual-root window manager.  If you kill it with \-9,
578 you may need to restart your window manager to repair the damage.  This
579 isn't an issue if you aren't running a virtual-root window manager.
580
581 For all the gory details, see the commentary at the top of xscreensaver.c.
582
583 You can control a running screensaver process by using the
584 .BR xscreensaver\-command (1)
585 program (which see.)
586 .SH POWER MANAGEMENT
587 Modern X servers contain support to power down the monitor after an idle
588 period.  If the monitor has powered down, then \fIxscreensaver\fP will
589 notice this, and will not waste CPU by drawing graphics demos on a black
590 screen.  An attempt will also be made to explicitly power the monitor
591 back up as soon as user activity is detected.
592
593 If your X server supports power management, then
594 .BR xset (1)
595 will accept a \fBdpms\fP option.  So, if you wanted \fIxscreensaver\fP
596 to activate after 5 minutes, but you wanted your monitor to power down
597 after one hour (3600 seconds) you would do this:
598 .EX
599 xset dpms 3600
600 .EE
601 See the man page for the
602 .BR xset (1)
603 program for details.  (Note that power management requires both software
604 support in the X server, and hardware support in the monitor itself.)
605 .SH USING XDM(1)
606 You can run \fIxscreensaver\fP from your 
607 .BR xdm (1)
608 session, so that the screensaver will run even when nobody is logged 
609 in on the console.
610
611 The trick to using xscreensaver with \fIxdm\fP is this: keep in mind the 
612 two very different states in which xscreensaver will be running:
613 .RS 4
614 .TP 3
615 .B 1: Nobody logged in.
616
617 If you're thinking of running xscreensaver from XDM at all, then it's 
618 probably because you want graphics demos to be running on the console
619 when nobody is logged in there.  In this case, xscreensaver will function
620 only as a screen saver, not a screen locker: it doesn't make sense
621 for xscreensaver to lock the screen, since nobody is logged in yet!
622 The only thing on the screen is the XDM login prompt.
623 .TP 3
624 .B 2: Somebody logged in.
625
626 Once someone has logged in through the XDM login window, the situation is
627 very different.  For example: now it makes sense to lock the screen (and
628 prompt for the logged in user's password); and now xscreensaver should
629 consult that user's \fI~/.xscreensaver\fP file; and so on.
630 .RE
631
632 The difference between these two states comes down to a question of,
633 which user is the \fIxscreensaver\fP process running as?  For the first
634 state, it doesn't matter.  If you start \fIxscreensaver\fP in the usual
635 XDM way, then xscreensaver will probably end up running as root, which 
636 is fine for the first case (the ``nobody logged in'' case.)
637
638 However, once someone is logged in, running as root is no longer fine:
639 because xscreensaver will be consulting root's \fI.xscreensaver\fP file
640 instead of that of the logged in user, and won't be prompting for the
641 logged in user's password, and so on.  (This is not a security problem,
642 it's just not what you want.)
643
644 So, once someone has logged in, you want xscreensaver to be running as that
645 user.  The way to accomplish this is to kill the old xscreensaver process
646 and start a new one (as the new user.)
647
648 The simplest way to accomplish all of this is as follows:
649 .RS 4
650 .TP 3
651 .B 1: Launch xscreensaver before anyone logs in.
652
653 To the file \fI/usr/lib/X11/xdm/Xsetup\fP, add the lines
654 .EX
655 xscreensaver-command -exit
656 xscreensaver &
657 .EE
658 This will run xscreensaver as root, over the XDM login window.
659 Moving the mouse will cause the screen to un-blank, and allow the user
660 to type their password at XDM to log in.
661 .TP 3
662 .B 2: Restart xscreensaver when someone logs in.
663
664 Near the top of the file \fI/usr/lib/X11/xdm/Xsession\fP, add those same lines:
665 .EX
666 xscreensaver-command -exit
667 xscreensaver &
668 .EE
669 When someone logs in, this will kill off the existing (root) xscreensaver
670 process, and start a new one, running as the user who has just logged in.
671 If the user's .xscreensaver file requests locking, they'll get it.  They
672 will also get their own choice of timeouts, and graphics demos, and so on.
673
674 Alternately, each user could just put those lines in their 
675 personal \fI~/.xsession\fP files.
676 .RE
677
678 Make sure you have \fB$PATH\fP set up correctly in the \fIXsetup\fP 
679 and \fIXsession\fP scripts, or \fIxdm\fP won't be able to 
680 find \fIxscreensaver\fP, and/or \fIxscreensaver\fP won't be able to 
681 find its graphics demos.
682
683 (If your system does not seem to be executing the \fIXsetup\fP file, you
684 may need to configure it to do so: the traditional way to do this is
685 to make that file the value of the \fIDisplayManager*setup\fP resource
686 in the \fI/usr/lib/X11/xdm/xdm-config\fP file.  See the man page for
687 .BR xdm (1)
688 for more details.)
689
690 It is safe to run \fIxscreensaver\fP as root (as \fIxdm\fP is likely to do.)  
691 If run as root, \fIxscreensaver\fP changes its effective user and group ids 
692 to something safe (like \fI"nobody"\fP) before connecting to the X server
693 or launching user-specified programs.
694
695 An unfortunate side effect of this (important) security precaution is that
696 it may conflict with cookie-based authentication.
697
698 If you get "connection refused" errors when running \fIxscreensaver\fP
699 from \fIxdm\fP, then this probably means that you have
700 .BR xauth (1)
701 or some other security mechanism turned on.  One way around this is to
702 add \fB"xhost\ +localhost"\fP to \fIXsetup\fP, just before \fIxscreensaver\fP
703 is launched.  
704
705 Note that this will give access to the X server to anyone capable of logging
706 in to the local machine, so in some environments, this might not be 
707 appropriate.  If turning off file-system-based access control is not
708 acceptable, then running \fIxscreensaver\fP from the \fIXsetup\fP file
709 might not be possible, and xscreensaver will only work when running as
710 a normal, unprivileged user.
711
712 For more information on the X server's access control mechanisms, see the
713 man pages for
714 .BR X (1),
715 .BR Xsecurity (1),
716 .BR xauth (1),
717 and
718 .BR xhost (1).
719 .SH USING CDE (COMMON DESKTOP ENVIRONMENT)
720 The easiest way to use \fIxscreensaver\fP on a system with CDE is to simply
721 switch off the built-in CDE screensaver, and use \fIxscreensaver\fP instead;
722 and second, to tell the front panel to run 
723 .BR xscreensaver\-command (1)
724 with the \fI\-lock\fP option when the \fILock\fP icon is clicked.
725
726 To accomplish this involves five steps:
727 .RS 4
728 .TP 3
729 \fB1: Switch off CDE's locker\fP
730 Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the
731 Screen section of the Style Manager.
732 .TP 3
733 \fB2: Edit sessionetc\fP
734 Edit the file \fI~/.dt/sessions/sessionetc\fP and add to it the line
735 .EX
736 xscreensaver &
737 .EE
738 This will cause \fIxscreensaver\fP to be launched when you log in.
739 (As always, make sure that xscreensaver and the graphics demos are on
740 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP 
741 and/or \fI.dtprofile\fP, not \fI.login\fP.)
742 .TP 3
743 \fB3: Create XScreenSaver.dt\fP
744 Create a file called \fI~/.dt/types/XScreenSaver.dt\fP with the following
745 contents:
746 .EX
747 ACTION XScreenSaver
748 {
749   LABEL         XScreenSaver
750   TYPE          COMMAND
751   EXEC_STRING   xscreensaver-command -lock
752   ICON          Dtkey
753   WINDOW_TYPE   NO_STDIO
754 }
755 .EE
756 This defines a ``lock'' command for the CDE front panel, that knows how
757 to talk to \fIxscreensaver\fP.
758 .TP 3
759 \fB4: Create Lock.fp\fP
760 Create a file called \fI~/.dt/types/Lock.fp\fP with the following
761 contents:
762 .EX
763 CONTROL Lock
764 {
765   TYPE             icon
766   CONTAINER_NAME   Switch
767   CONTAINER_TYPE   SWITCH
768   POSITION_HINTS   1
769   ICON             Fplock
770   LABEL            Lock
771   PUSH_ACTION      XScreenSaver
772   HELP_TOPIC       FPOnItemLock
773   HELP_VOLUME      FPanel
774 }
775 .EE
776 This associates the CDE front panel ``Lock'' icon with the lock command
777 we just defined in step 3.
778 .TP 3
779 \fB5: Restart\fP
780 Select ``\fIRestart Workspace Manager\fP'' from the popup menu to make
781 your changes take effect.  If things seem not to be working, check the
782 file \fI~/.dt/errorlog\fP for error messages.
783 .RE
784 .SH USING HP VUE (VISUAL USER ENVIRONMENT)
785 Since CDE is a descendant of VUE, the instructions for using xscreensaver
786 under VUE are similar to the above:
787 .RS 4
788 .TP 3
789 \fB1: Switch off VUE's locker\fP
790 Open the ``\fIStyle Manager\fP'' and select ``\fIScreen\fP.''
791 Turn off ``\fIScreen Saver and Screen Lock\fP'' option.
792 .TP 3
793 \fB2: Make sure you have a Session\fP
794 Next, go to the Style Manager's, ``\fIStartup\fP'' page.
795 Click on ``\fISet Home Session\fP'' to create a session, then 
796 on ``\fIReturn to Home Session\fP'' to select this session each
797 time you log in.
798 .TP 3
799 \fB3: Edit vue.session\fP
800 Edit the file \fI~/.vue/sessions/home/vue.session\fP and add to it
801 the line
802 .EX
803 vuesmcmd -screen 0 -cmd "xscreensaver"
804 .EE
805 This will cause \fIxscreensaver\fP to be launched when you log in.
806 (As always, make sure that xscreensaver and the graphics demos are on
807 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP
808 and/or \fI.profile\fP, not \fI.login\fP.)
809 .TP 3
810 \fB3: Edit vuewmrc\fP
811 Edit the file \fI~/.vue/vuewmrc\fP and add (or change) the Lock control:
812 .EX
813 CONTROL Lock
814 {
815   TYPE         button
816   IMAGE        lock
817   PUSH_ACTION  f.exec "xscreensaver-command -lock"
818   HELP_TOPIC   FPLock
819 }
820 .EE
821 This associates the VUE front panel ``Lock'' icon with the xscreensaver 
822 lock command.
823 .RE
824 .PP
825 .SH ADDING TO MENUS
826 The
827 .BR xscreensaver-command (1)
828 program is a perfect candidate for something to add to your window manager's
829 popup menus.  If you use 
830 .BR mwm (1),
831 .BR 4Dwm (1),
832 .BR twm (1),
833 or (probably) any of \fItwm\fP's many descendants, you can do it like this:
834 .RS 0
835 .TP 3
836 \fB1. Create ~/.mwmrc (or ~/.twmrc or ...)\fP
837 If you don't have a \fI~/.mwmrc\fP file (or, on SGIs, a \fI~/.4Dwmrc\fP file;
838 or, with twm, a \fI~/.twmrc\fP file) then create one by making a copy of
839 the \fI/usr/lib/X11/system.mwmrc\fP 
840 file (or \fI/usr/lib/X11/twm/system.twmrc\fP, and so on.)
841 .TP 3
842 \fB2. Add a menu definition.\fP
843 Something like this:
844 .EX
845 menu XScreenSaver
846 {
847  "Blank Screen Now" !"sleep 3; xscreensaver-command -activate"
848  "Lock Screen Now"  !"sleep 3; xscreensaver-command -lock"
849  "Screen Saver Demo"         !"xscreensaver-demo"
850  "Screen Saver Preferences"  !"xscreensaver-demo -prefs"
851  "Reinitialize Screen Saver" !"xscreensaver-command -restart"
852  "Kill Screen Saver"         !"xscreensaver-command -exit"
853  "Launch Screen Saver"       !"xscreensaver &"
854 }
855 .EE
856 .TP 3
857 \fB3. Add the menu\fP
858 For
859 .BR mwm (1)
860 and
861 .BR 4Dwm (1),
862 find the section of the file that says \fIMenu DefaultRootMenu\fP.
863 For
864 .BR twm (1),
865 it will probably be \fImenu "defops"\fP.  If you add a line somewhere 
866 in that menu definition that reads
867 .EX
868   "XScreenSaver"        f.menu XScreenSaver
869 .EE
870 then this will add an XScreenSaver sub-menu to your default root-window
871 popup menu.  Alternately, you could just put the xscreensaver menu items
872 directly into the root menu.
873 .RE
874
875 Other window managers are guaranteed to do things gratuitously differently.
876 .SH BUGS
877 Bugs?  There are no bugs.  Ok, well, maybe.  If you find one, please let
878 me know.  http://www.jwz.org/xscreensaver/bugs.html explains how to
879 construct the most useful bug reports.
880 .TP 8
881 .B Locking and XDM
882 If xscreensaver has been launched from 
883 .BR xdm (1)
884 before anyone has logged in, you will need to kill and then restart the
885 xscreensaver daemon after you have logged in, or you will be confused by
886 the results.  (For example, locking won't work, and your \fI~/.xscreensaver\fP
887 file will be ignored.)
888
889 When you are logged in, you want the \fIxscreensaver\fP daemon to be 
890 running under \fIyour\fP user id, not as root or some other user.
891
892 If it has already been started by \fIxdm\fP, you can kill it by sending
893 it the \fBexit\fP command, and then re-launching it as you, by putting
894 something like the following in your personal X startup script:
895 .EX
896 xscreensaver-command -exit
897 xscreensaver &
898 .EE
899 The ``\fIUsing XDM(1)\fP'' section, above, goes into more detail, and explains
900 how to configure the system to do this for all users automatically.
901 .TP 8
902 .B Locking and root logins
903 In order for it to be safe for xscreensaver to be launched by \fIxdm\fP,
904 certain precautions had to be taken, among them that xscreensaver never
905 runs as \fIroot\fP.  In particular, if it is launched as root (as \fIxdm\fP
906 is likely to do), xscreensaver will disavow its privileges, and switch 
907 itself to a safe user id (such as \fInobody\fP.)
908
909 An implication of this is that if you log in as \fIroot\fP on the console, 
910 xscreensaver will refuse to lock the screen (because it can't tell
911 the difference between \fIroot\fP being logged in on the console, and a
912 normal user being logged in on the console but xscreensaver having been 
913 launched by the
914 .BR xdm (1)
915 .I Xsetup
916 file.)
917
918 The solution to this is simple: you shouldn't be logging in on the console
919 as \fIroot\fP in the first place!  (What, are you crazy or something?)  
920
921 Proper Unix hygiene dictates that you should log in as yourself, and
922 .BR su (1)
923 to \fIroot\fP as necessary.  People who spend their day logged in
924 as \fIroot\fP are just begging for disaster.
925 .TP 8
926 .B XAUTH and XDM
927 For xscreensaver to work when launched by
928 .BR xdm (1),
929 programs running on the local machine as user \fI"nobody"\fP must be
930 able to connect to the X server.  This means that if you want to run
931 xscreensaver on the console while nobody is logged in, you may need
932 to disable cookie-based access control (and allow all users who can log
933 in to the local machine to connect to the display.)  
934
935 You should be sure that this is an acceptable thing to do in your
936 environment before doing it.  See the ``\fIUsing XDM(1)\fP'' section, 
937 above, for more details.
938
939 If anyone has suggestions on how xscreensaver could be made to work with
940 .BR xdm (1)
941 without first turning off \fI.Xauthority\fP-based access control, please
942 let me know.
943 .TP 8
944 .B Passwords
945 If you get an error message at startup like ``couldn't get password
946 of \fIuser\fP'' then this probably means that you're on a system in which 
947 the
948 .BR getpwent (3)
949 library routine can only be effectively used by root.  If this is the case, 
950 then \fIxscreensaver\fP must be installed as setuid to root in order for
951 locking to work.  Care has been taken to make this a safe thing to do.  
952
953 It also may mean that your system uses shadow passwords instead of the standard
954 .BR getpwent (3)
955 interface; in that case, you may need to change some options 
956 with \fIconfigure\fP and recompile.
957
958 If you change your password after xscreensaver has been launched, it will
959 continue using your old password to unlock the screen until xscreensaver
960 is restarted.  So, after you change your password, you'll have to do
961 .EX
962 xscreensaver-command -restart
963 .EE
964 to make \fIxscreensaver\fP notice.
965 .TP 8
966 .B PAM Passwords
967 If your system uses PAM (Pluggable Authentication Modules), then in order
968 for xscreensaver to use PAM properly, PAM must be told about xscreensaver.
969 The xscreensaver installation process should update the PAM data (on Linux,
970 by creating the file \fI/etc/pam.d/xscreensaver\fP for you, and on Solaris, 
971 by telling you what lines to add to the \fI/etc/pam.conf\fP file.)  
972
973 If the PAM configuration files do not know about xscreensaver, then 
974 you \fImight\fP be in a situation where xscreensaver will refuse to ever
975 unlock the screen.
976
977 This is a design flaw in PAM (there is no way for a client to tell the
978 difference between PAM responding ``I have never heard of your module,''
979 and responding, ``you typed the wrong password.'')  As far as I can tell,
980 there is no way for xscreensaver to automatically work around this, or
981 detect the problem in advance, so if you have PAM, make sure it is
982 configured correctly!
983 .TP 8
984 .B Colormap lossage: TWM
985 The \fBinstallColormap\fP option doesn't work very well with the
986 .BR twm (1)
987 window manager and its descendants.  
988
989 There is a race condition between the screensaver and this window manager,
990 which can result in the screensaver's colormap not getting installed
991 properly, meaning the graphics hacks will appear in essentially random
992 colors.  (If the screen goes white instead of black, this is probably why.)
993
994 The
995 .BR mwm (1)
996 and
997 .BR olwm (1)
998 window managers don't have this problem.  The race condition exists
999 because X (really, ICCCM) does not provide a way for an OverrideRedirect 
1000 window to have its own colormap, short of grabbing the server (which is 
1001 neither a good idea, nor really possible with the current design.)  What 
1002 happens is that, as soon as xscreensaver installs its colormap, \fBtwm\fP 
1003 responds to the resultant \fBColormapNotify\fP event by re-instaling the 
1004 default colormap.  Apparently, \fBtwm\fP doesn't \fIalways\fP do this; it 
1005 seems to do it regularly if the screensaver is activated from a menu item, 
1006 but seems to not do it if the screensaver comes on of its own volition, or 
1007 is activated from another console.  
1008 .RS 8
1009 .TP 4
1010 .B Attention, window manager authors!
1011 You should only call
1012 .BR XInstallColormap (3)
1013 in response to user events.  That is, it is appropriate to install a colormap
1014 in response to \fBFocusIn\fP, \fBFocusOut\fP, \fBEnterNotify\fP, 
1015 and \fBLeaveNotify\fP events; but it is not appropriate to call it in
1016 response to \fBColormapNotify\fP events.  If you install colormaps in
1017 response to \fIapplication\fP actions as well as in response to \fIuser\fP
1018 actions, then you create the situation where it is impossible for 
1019 override-redirect applications (such as xscreensaver) to display their
1020 windows in the proper colors.
1021 .RE
1022 .TP 8
1023 .B Colormap lossage: XV, XAnim, XEarth
1024 Some programs don't operate properly on visuals other than the default one,
1025 or with colormaps other than the default one.  See the discussion of the
1026 magic "default-n" visual name in the description of the \fBprograms\fP 
1027 resource in the \fIConfiguration\fP section.  When programs only work with
1028 the default colormap, you need to use a syntax like this:
1029 .EX
1030    default-n: xv -root image-1.gif -quit  \\n\\
1031    default-n: xearth -nostars -wait 0     \\n\\
1032 .EE
1033 It would also work to turn off the \fBinstallColormap\fP option altogether,
1034 but that would deny extra colors to those programs that \fIcan\fP take
1035 advantage of them.
1036 .TP 8
1037 .B Machine Load
1038 Although this program ``nices'' the subprocesses that it starts, 
1039 graphics-intensive subprograms can still overload the machine by causing
1040 the X server process itself (which is not ``niced'') to suck a lot of 
1041 cycles.  Care should be taken to slow down programs intended for use as 
1042 screensavers by inserting strategic calls to
1043 .BR sleep (3)
1044 or
1045 .BR usleep (3)
1046 (or making liberal use of any \fI\-delay\fP options which the programs 
1047 may provide.)
1048
1049 Note that the OpenGL-based graphics demos are real pigs on machines that
1050 don't have texture hardware.
1051
1052 Also, an active screensaver will cause your X server to be pretty much 
1053 permanently swapped in; but the same is true of any program that draws
1054 periodically, like 
1055 .BR xclock (1)
1056 or
1057 .BR xload (1).
1058 .TP 8
1059 .B Latency and Responsiveness
1060 If the subprocess is drawing too quickly and the connection to the X
1061 server is a slow one (such as an X terminal running over a phone line) then 
1062 the screensaver might not turn off right away when the user becomes active
1063 again (the
1064 .BR ico (1)
1065 demo has this problem if being run in full-speed mode).  This can be
1066 alleviated by inserting strategic calls to
1067 .BR XSync (3)
1068 in code intended for use as a screensaver.  This prevents too much graphics
1069 activity from being buffered up.
1070 .TP 8
1071 .B XFree86's Magic Keystrokes
1072 The XFree86 X server traps certain magic keystrokes before client programs ever
1073 see them.  Two that are of note are Ctrl+Alt+Backspace, which causes 
1074 the X server to exit; and Ctrl+Alt+F\fIn\fP, which switches virtual consoles.
1075 The X server will respond to these keystrokes even if xscreensaver has the
1076 screen locked.  Depending on your setup, you might consider this a problem.
1077
1078 Unfortunately, there is no way for xscreensaver itself to override the
1079 interpretation of these keys.  If you want to disable Ctrl+Alt+Backspace
1080 globally, you need to set the \fIDontZap\fP flag in 
1081 your \fI/etc/X11/XF86Config\fP file.  See the
1082 .BR XF86Config (5)
1083 manual for details.
1084
1085 There is no way (as far as I can tell) to disable the VT-switching keystrokes.
1086
1087 Some Linux systems come with a VT_LOCKSWITCH ioctl, that one could 
1088 theoretically use to prevent VT-switching while the screen is locked; 
1089 but unfortunately, this ioctl can only be used by root, which means
1090 that xscreensaver can't use it (since xscreensaver disavows its privileges
1091 shortly after startup, for security reasons.)
1092
1093 Any suggestions for other solutions to this problem are welcome.
1094 .TP 8
1095 .B XView Clients
1096 Apparently there are some problems with XView programs getting confused
1097 and thinking that the screensaver window is the real root window even when
1098 the screensaver is not active: ClientMessages intended for the window manager
1099 are sent to the screensaver window instead.  This could be solved by making
1100 xscreensaver forward all unrecognised ClientMessages to the real root window,
1101 but there may be other problems as well.  If anyone has any insight on the
1102 cause of this problem, please let me know.  (XView is an X11 toolkit that 
1103 implements the (quite abominable) Sun OpenLook look-and-feel.)
1104 .TP 8
1105 .B MIT Extension and Fading
1106 The \fBMIT-SCREEN-SAVER\fP extension is junk.  Don't use it.
1107
1108 When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with 
1109 the \fBfade\fP option, you'll notice an unattractive flicker just before 
1110 the fade begins.  This is because the server maps a black window just before 
1111 it tells the \fIxscreensaver\fP process to activate.  The \fIxscreensaver\fP 
1112 process immediately unmaps that window, but this results in a flicker.  I 
1113 haven't figured a way  to get around this; it seems to be a fundamental
1114 property of the (mis-) design of this server extension.
1115
1116 It sure would be nice if someone would implement the \fBSGI SCREEN_SAVER\fP
1117 extension in XFree86; it's dead simple, and works far better than the
1118 overengineered and broken \fBMIT-SCREEN-SAVER\fP extension.
1119 .TP 8
1120 .B SGI Power Saver
1121 If you're running Irix 6.3, you might find that your monitor is powering down
1122 after an hour or two even if you've told it not to.  This is fixed by SGI
1123 patches 2447 and 2537.
1124 .TP 8
1125 .B OpenGL Programs and Visuals
1126 Some of the graphics demos included with xscreensaver make use of the 
1127 OpenGL (or MesaGL) 3D library, if it is available.  It is possible (even 
1128 likely) that \fIxscreensaver\fP's notion of the ``\fIbest\fP'' visual is 
1129 not quite right for these GL programs.  
1130
1131 The odd thing about GL programs is that, unlike normal X11 programs, they
1132 tend to work best on a visual \fIhalf\fP as deep as the depth of the screen,
1133 since that way, they can do double-buffering.  Try it and see, but you will
1134 probably find that, for these particular programs, you should specify the
1135 deepest visual that is half as deep as the screen.  (See the discussion
1136 of the \fBprograms\fP resource in the \fIConfiguration\fP section, above.)
1137
1138 For example, on a screen that supports both 24-bit TrueColor and 12-bit
1139 PseudoColor visuals, the 12-bit visual will probably work best (this is true
1140 of base-model SGI Indys: the 0x29 visual is the one you want.)  
1141
1142 Oddly, on SGI O2s (machines that have serious hardware support for GL), the
1143 12-bit PseudoColor visual looks awful (you get a black and white, flickery
1144 image.)  On these machines, the visual you want turns out to be 0x31.
1145 However, 0x31 is but \fIone\fP of the \fIeight\fP 15-bit TrueColor visuals
1146 (yes, 8, and yes, 15) that the O2 X server provides.  This is the only visual
1147 that works properly: as far as
1148 .BR xdpyinfo (1)
1149 is concerned, all of the 15-bit TrueColor visuals are identical, but some
1150 flicker like mad, and some have deeply weird artifacts (such as hidden 
1151 surfaces that show through, as if depth worked backwards!)  
1152
1153 I suppose these other visuals must be tied to some arcane hardware feature...
1154 If anyone would care to explain it to me, that would be great.
1155
1156 Your mileage, therefore, may vary dramatically.
1157 .TP 8
1158 .B MesaGL and Voodoo Cards
1159 If you have a 3Dfx/Voodoo card, the default settings for xscreensaver will
1160 run the GL-based graphics demos in such a way that they will not take 
1161 advantage of the 3D acceleration hardware.  The solution is to change
1162 the \fBprograms\fP entries for the GL hacks from this:
1163 .EX
1164        gears -root                        \\n\\
1165 .EE
1166 to this:
1167 .EX
1168        MESA_GLX_FX=fullscreen  gears      \\n\\
1169 .EE
1170 That is, make sure that \fB$MESA_GLX_FX\fP is set to \fIfullscreen\fP, and
1171 don't tell the program to draw on the root window.  This may seem strange,
1172 but the setup used by Mesa and these kinds of cards \fIis\fP strange!
1173
1174 For those who don't know, these cards work by sitting between your normal
1175 video card and the monitor, and seizing control of the monitor when it's 
1176 time to do 3D.  But this means that accelerated 3D only happens in full-screen
1177 mode (you can't do it in a window, and you can't see the output of 3D and 2D
1178 programs simultaniously), and that 3D will probably drive your monitor at a
1179 lower resolution, as well.  It's bizarre.
1180
1181 If you find that GL programs only work properly when run as root, and not
1182 as normal users, then the problem is that your \fI/dev/3dfx\fP file is not
1183 configured properly.  Check the Linux 3Dfx FAQ.
1184 .TP 8
1185 .B Keyboard LEDs
1186 If \fIprocInterrupts\fP is on (which is the default on Linux systems) and
1187 you're using some program that toggles the state of your keyboard LEDs,
1188 xscreensaver won't work right: turning those LEDs on or off causes a 
1189 keyboard interrupt, which xscreensaver will interpret as user activity.
1190 So if you're using such a program, set the \fIprocInterrupts\fP resource
1191 to False.
1192 .TP 8
1193 .B Extensions
1194 If you are not making use of one of the server extensions (\fBXIDLE\fP,
1195 \fBSGI SCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in 
1196 rare situations, for \fIxscreensaver\fP to interfere with event propagation 
1197 and make another X program malfunction.  For this to occur, that other
1198 application would need to \fInot\fP select \fBKeyPress\fP events on its 
1199 non-leaf windows within the first 30 seconds of their existence, but then 
1200 select for them later.  In this case, that client \fImight\fP fail to receive 
1201 those events.  This isn't very likely, since programs generally select a
1202 constant set of events immediately after creating their windows and then 
1203 don't change them, but this is the reason that it's a good idea to install 
1204 and use one of the server extensions instead, to work around this shortcoming
1205 in the X protocol.
1206
1207 In all these years, I've not heard of even a single case of this happening,
1208 but it is theoretically possible, so I'm mentioning it for completeness...
1209 .TP 8
1210 .B Red Hot Lava
1211 There need to be a lot more graphics hacks.  In particular, there should be
1212 a simulation of a Lavalite (tm).
1213 .SH ENVIRONMENT
1214 .PP
1215 .TP 8
1216 .B DISPLAY
1217 to get the default host and display number, and to inform the sub-programs
1218 of the screen on which to draw.
1219 .TP 8
1220 .B PATH
1221 to find the sub-programs to run.
1222 .TP 8
1223 .B HOME
1224 for the directory in which to read and write the \fI.xscreensaver\fP file.
1225 .TP 8
1226 .B XENVIRONMENT
1227 to get the name of a resource file that overrides the global resources
1228 stored in the RESOURCE_MANAGER property.
1229 .SH UPGRADES
1230 The latest version can always be found at 
1231 http://www.jwz.org/xscreensaver/
1232 .SH SEE ALSO
1233 .BR X (1),
1234 .BR xscreensaver\-demo (1),
1235 .BR xscreensaver\-command (1),
1236 .BR xdm (1),
1237 .BR xset (1),
1238 .BR Xsecurity (1),
1239 .BR xauth (1),
1240 .BR xhost (1).
1241 .BR ant (1),
1242 .BR atlantis (1),
1243 .BR attraction (1),
1244 .BR blitspin (1),
1245 .BR bouboule (1),
1246 .BR braid (1),
1247 .BR bsod (1),
1248 .BR bubbles (1),
1249 .BR cage (1),
1250 .BR coral (1),
1251 .BR cynosure (1),
1252 .BR decayscreen (1),
1253 .BR deco (1),
1254 .BR drift (1),
1255 .BR epicycle (1),
1256 .BR fadeplot (1),
1257 .BR flag (1),
1258 .BR flame (1),
1259 .BR forest (1),
1260 .BR galaxy (1),
1261 .BR gears (1),
1262 .BR goop (1),
1263 .BR grav (1),
1264 .BR greynetic (1),
1265 .BR halo (1),
1266 .BR helix (1),
1267 .BR hopalong (1),
1268 .BR hypercube (1),
1269 .BR ifs (1),
1270 .BR imsmap (1),
1271 .BR interference (1),
1272 .BR jigsaw (1),
1273 .BR julia (1),
1274 .BR kaleidescope (1),
1275 .BR laser (1),
1276 .BR lightning (1),
1277 .BR lisa (1),
1278 .BR lissie (1),
1279 .BR lmorph (1),
1280 .BR maze (1),
1281 .BR moebius (1),
1282 .BR moire (1),
1283 .BR moire2 (1),
1284 .BR morph3d (1),
1285 .BR mountain (1),
1286 .BR munch (1),
1287 .BR noseguy (1),
1288 .BR pedal (1),
1289 .BR penrose (1),
1290 .BR pipes (1),
1291 .BR pyro (1),
1292 .BR qix (1),
1293 .BR rd-bomb (1),
1294 .BR rocks (1),
1295 .BR rorschach (1),
1296 .BR rotor (1),
1297 .BR rubik (1),
1298 .BR sierpinski (1),
1299 .BR slidescreen (1),
1300 .BR slip (1),
1301 .BR sphere (1),
1302 .BR spiral (1),
1303 .BR sproingies (1),
1304 .BR stairs (1),
1305 .BR starfish (1),
1306 .BR strange (1),
1307 .BR superquadrics (1),
1308 .BR swirl (1),
1309 .BR triangle (1),
1310 .BR truchet (1),
1311 .BR vines (1),
1312 .BR worm (1),
1313 .BR xjack (1),
1314 .BR xlyap (1),
1315 .BR xroger (1),
1316 .BR bongo (1),
1317 .BR ico (1),
1318 .BR xaos (1),
1319 .BR xbouncebits (1),
1320 .BR xcthugha (1),
1321 .BR xdaliclock (1),
1322 .BR xfishtank (1),
1323 .BR xmountains (1),
1324 .BR xsplinefun (1),
1325 .BR xswarm (1),
1326 .BR xtacy (1),
1327 .BR xv (1),
1328 .BR xwave (1).
1329 .SH COPYRIGHT
1330 Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
1331 by Jamie Zawinski.  Permission to use, copy, modify, distribute, and sell
1332 this software and its documentation for any purpose is hereby granted without
1333 fee, provided that the above copyright notice appear in all copies and that
1334 both that copyright notice and this permission notice appear in supporting
1335 documentation.  No representations are made about the suitability of this
1336 software for any purpose.  It is provided "as is" without express or implied
1337 warranty.
1338 .SH AUTHOR
1339 Jamie Zawinski <jwz@jwz.org>.  Written in late 1991; first posted
1340 to comp.sources.x on 13-Aug-1992.
1341
1342 Please let me know if you find any bugs or make any improvements.
1343 .SH ACKNOWLEDGEMENTS
1344 Thanks to David Wojtowicz for implementing \fIlockTimeout\fP.
1345
1346 Thanks to Martin Kraemer for adding support for shadow passwords and
1347 locking-disabled diagnostics.
1348
1349 Thanks to the many people who have contributed graphics demos to the package.
1350
1351 Thanks to Patrick Moreau for the VMS port.
1352
1353 Thanks to Mark Bowyer for figuring out how to hook it up to CDE.
1354
1355 And huge thanks to Jon A. Christopher for implementing the Athena dialog
1356 support, back in the days before Lesstif was a viable alternative to Motif.