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