14 .TH XScreenSaver 1 "02-Oct-98 (2.31)" "X Version 11"
16 xscreensaver - graphics hack and screen locker, launched when the user is idle
19 [\-display \fIhost:display.screen\fP] \
20 [\-timeout \fIint\fP] \
24 [\-lock\-timeout \fIint\fP] \
25 [\-visual \fIvisual\fP] \
35 [\-no\-mit\-extension] \
37 [\-no\-sgi\-extension] \
38 [\-xidle\-extension] \
39 [\-no\-xidle\-extension] \
40 [\-xrm \fIresources\fP]
42 The \fIxscreensaver\fP program waits until the keyboard and mouse have been
43 idle for a period, and then runs a graphics demo chosen at random. It
44 turns off as soon as there is any mouse or keyboard activity.
46 This program can lock your terminal in order to prevent others from using it,
47 though its default mode of operation is merely to display pretty pictures on
48 your screen when it is not in use.
50 The benefit that this program has over the combination of the
54 programs is the ease with which new graphics hacks can be installed. You
55 don't need to recompile (or even re-run) this program to add a new display
58 For the impatient, try this:
61 xscreensaver-command -demo
63 After a few seconds, the screen should go black, and a dialog box should
64 appear in the upper right corner. This is \fIDemo Mode\fP.
69 xscreensaver has a client-server model: the xscreensaver process is a
70 daemon that runs in the background; it is controlled by the foreground
71 .BR xscreensaver-command (1)
74 If \fIxscreensaver\fP receives the \fBDEMO\fP ClientMessage, which is done
76 .BR xscreensaver\-command (1)
77 program with the \fB\-demo\fP option, the screensaver will black the screen
78 and pop up a dialog box from which you can examine and experiment with the
81 The dialog box contains a scrolling list, a text field, and a number of
84 Double-clicking on one of the programs in the list will run it. The dialog
85 box will disappear, allowing the program access to the full screen. Clicking
86 the mouse again will bring the dialog box back.
88 Single-clicking in the list will place the indicated program and its args
89 in the text field to be edited. Edit the arguments and hit return to run
90 the program with the parameters you have specified. (Note that these are
91 one-time changes and won't be remembered; to make the changes permanent,
92 you need to edit your X resource file.)
97 Clicking this button will run the next program in the list after the
98 currently-selected one, and will scroll around to the top when it reaches
102 Opposite of Run Next; at the top, it scrolls around to the bottom.
105 This pops up a second dialog box, in which you have the option to
106 interactively change most of the screensaver's operational parameters,
107 such as its timeouts, and whether it should lock the screen. Changing
108 these parameters here will affect only the running \fIxscreensaver\fP
109 process; to make the changes permanent, you need to edit your X resource
110 file. (See the \fIConfiguration\fP section, below.)
113 Returns to normal screensaver operation.
116 This causes the X resource database to be re-read, to pick up any changes
117 you might have made. This works by causing the screensaver process to exit
118 and then restart itself with the same command-line arguments. This is just
119 like the \fI\-restart\fP argument to
120 .BR xscreensaver\-command (1)
121 except that when executed from this button, the screensaver will
122 automatically return to Demo Mode after restarting.
124 \fIxscreensaver\fP understands the following X resources. The best way
125 to specify these parameters is to set them in your X resource file,
126 which is usually called \fI~/.Xdefaults\fP. For example, to set the
127 default value of the \fItimeout\fP resource, you would add the following
128 line to your .Xdefaults file:
130 xscreensaver.timeout: 5
132 To make the system notice this change, you might also need to run
137 And if xscreensaver was already running, and you would like it to notice
138 your changes, you'll also have to tell the running xscreensaver process
139 to re-initialize itself, like so:
141 xscreensaver-command -restart
143 If you want to set the system-wide defaults, then make your edits to
144 the xscreensaver app-defaults file, which should have been installed
145 when xscreensaver itself was installed. The app-defaults file will
146 usually be named /usr/lib/X11/app-defaults/XScreenSaver, but different
147 systems might keep it in a different place (for example,
148 /usr/openwin/lib/app-defaults/XScreenSaver on Solaris.)
151 .B timeout\fP (class \fBTime\fP)
152 The screensaver will activate (blank the screen) after the keyboard and
153 mouse have been idle for this many minutes. Default 10 minutes.
155 .B cycle\fP (class \fBTime\fP)
156 After the screensaver has been running for this many minutes, the currently
157 running graphics-hack sub-process will be killed (with \fBSIGTERM\fP), and a
158 new one started. If this is 0, then the graphics hack will never be changed:
159 only one demo will run until the screensaver is deactivated by user activity.
162 .B lock\fP (class \fBBoolean\fP)
163 Enable locking: before the screensaver will turn off, it will require you
164 to type the password of the logged-in user (really, the person who ran
165 xscreensaver), or the root password. (\fBNote:\fP this doesn't work if the
166 screensaver is launched by
168 because it can't know the user-id of the logged-in user. See
169 the ``\fIUsing XDM(1)\fP'' section, below.
171 .B lockTimeout\fP (class \fBTime\fP)
172 If locking is enabled, this controls the length of the ``grace period''
173 between when the screensaver activates, and when the screen becomes locked.
174 For example, if this is 5, and \fI\-timeout\fP is 10, then after 10 minutes,
175 the screen would blank. If there was user activity at 12 minutes, no password
176 would be required to un-blank the screen. But, if there was user activity
177 at 15 minutes or later (that is, \fI\-lock\-timeout\fP minutes after
178 activation) then a password would be required. The default is 0, meaning
179 that if locking is enabled, then a password will be required as soon as the
182 .B passwdTimeout\fP (class \fBTime\fP)
183 If the screen is locked, then this is how many seconds the password dialog box
184 should be left on the screen before giving up (default 30 seconds.) This
185 should not be too large: the X server is grabbed for the duration that the
186 password dialog box is up (for security purposes) and leaving the server
187 grabbed for too long can cause problems.
189 .B visualID\fP (class \fBVisualID\fP)
190 Specify which X visual to use by default. (Note carefully that this resource
191 is called \fBvisualID\fP, not merely \fBvisual\fP; if you set the \fBvisual\fP
192 resource instead, things will malfunction in obscure ways for obscure reasons.)
194 Legal values for the \fBVisualID\fP resource are:
198 Use the screen's default visual (the visual of the root window.)
202 Use the visual which supports the most colors. Note, however, that the
203 visual with the most colors might be a TrueColor visual, which does not
204 support colormap animation. Some programs have more interesting behavior
205 when run on PseudoColor visuals than on TrueColor.
208 Use a monochrome visual, if there is one.
211 Use a grayscale or staticgray visual, if there is one and it has more than
212 one plane (that is, it's not monochrome.)
215 Use the best of the color visuals, if there are any.
218 where \fIclass\fP is one of \fBStaticGray\fP, \fBStaticColor\fP,
219 \fBTrueColor\fP, \fBGrayScale\fP, \fBPseudoColor\fP, or \fBDirectColor\fP.
220 Selects the deepest visual of the given class.
223 where \fInumber\fP (decimal or hex) is interpreted as a visual id number,
226 program; in this way you can have finer control over exactly which visual
227 gets used, for example, to select a shallower one than would otherwise
232 Note that this option specifies only the \fIdefault\fP visual that will
233 be used: the visual used may be overridden on a program-by-program basis.
234 See the description of the \fBprograms\fP resource, below.
237 .B installColormap\fP (class \fBBoolean\fP)
238 Install a private colormap while the screensaver is active, so that the
239 graphics hacks can get as many colors as possible. This is the
240 default. (This only applies when the screen's default visual is being
241 used, since non-default visuals get their own colormaps automatically.)
242 This can also be overridden on a per-hack basis: see the discussion of
243 the \fBdefault\-n\fP name in the section about the \fBprograms\fP resource.
245 .B verbose\fP (class \fBBoolean\fP)
246 Whether to print diagnostics. Default false.
248 .B timestamp\fP (class \fBBoolean\fP)
249 Whether to print the time of day along with any other diagnostic messages.
252 .B splash\fP (class \fBBoolean\fP)
253 Whether to display a splash screen at startup. Default true.
255 .B splashDuration\fP (class \fBTime\fP)
256 How long the splash screen should remain visible; default 5 seconds.
258 .B helpURL\fP (class \fBURL\fP)
259 The splash screen has a \fIHelp\fP button on it. When you press it, it will
260 display the web page indicated here in your web browser.
262 .B loadURL\fP (class \fBLoadURL\fP)
263 This is the shell command used to load a URL into your web browser.
264 The default setting will load it into Netscape if it is already running,
265 otherwise, will launch a new Netscape looking at the \fIhelpURL\fP.
267 .B nice\fP (class \fBNice\fP)
268 The sub-processes created by \fIxscreensaver\fP will be ``niced'' to this
269 level, so that they are given lower priority than other processes on the
270 system, and don't increase the load unnecessarily. The default is 10.
272 (Higher numbers mean lower priority; see
276 .B sgiSaverExtension\fP (class \fBBoolean\fP)
277 There are a number of different X server extensions which can make
278 xscreensaver's job easier. The next few resources specify whether these
279 extensions should be utilized if they are available.
281 This resource controls whether the SGI \fBSCREEN_SAVER\fP server extension
282 will be used to decide whether the user is idle. This is the default
283 if \fIxscreensaver\fP has been compiled with support for this
284 extension (which is the default on SGI systems.). If it is available,
285 the \fBSCREEN_SAVER\fP method is faster and more reliable than what will
286 be done otherwise, so use it if you can. (This extension is only available
287 on Silicon Graphics systems, unfortunately.)
289 .B mitSaverExtension\fP (class \fBBoolean\fP)
290 This resource controls whether the \fBMIT\-SCREEN\-SAVER\fP server extension
291 will be used to decide whether the user is idle. However, the default for
292 this resource is \fIfalse\fP, because even if this extension is available,
293 it is flaky (and it also makes the \fBfade\fP option not work properly.)
294 Use of this extension is not recommended.
296 .B xidleExtension\fP (class \fBBoolean\fP)
297 This resource controls whether the \fBXIDLE\fP server extension will be
298 used to decide whether the user is idle. This is the default
299 if \fIxscreensaver\fP has been compiled with support for this extension.
300 (This extension is only available for X11R4 and X11R5 systems, unfortunately.)
302 .B fade\fP (class \fBBoolean\fP)
303 If this is true, then when the screensaver activates, the current contents
304 of the screen will fade to black instead of simply winking out. This only
305 works on displays with writable colormaps, that is, if the screen's default
306 visual is a PseudoColor visual. A fade will also be done when
307 switching graphics hacks (when the \fIcycle\fP timer expires.)
310 .B unfade\fP (class \fBBoolean\fP)
311 If this is true, then when the screensaver deactivates, the original contents
312 of the screen will fade in from black instead of appearing immediately. This
313 only works on displays with writable colormaps, and if \fIfade\fP is true
314 as well. Default false.
316 .B fadeSeconds\fP (class \fBTime\fP)
317 If \fIfade\fP is true, this is how long the fade will be in
318 seconds (default 3 seconds.)
320 .B fadeTicks\fP (class \fBInteger\fP)
321 If \fIfade\fP is true, this is how many times a second the colormap will
322 be changed to effect a fade. Higher numbers yield smoother fades, but
323 may make the fades take longer than the specified \fIfadeSeconds\fP if
324 your server isn't fast enough to keep up. Default 20.
326 .B captureStderr\fP (class \fBBoolean\fP)
327 Whether \fIxscreensaver\fP should redirect its standard-error stream to the
328 window itself. Since its nature is to take over the screen, you would not
329 normally see error messages generated by xscreensaver or the sub-programs it
330 runs; this resource will cause the output of all relevant programs to be
331 drawn on the screensaver window itself, as well as being written to the
332 controlling terminal of the screensaver driver process. Default true.
334 .B captureStdout\fP (class \fBBoolean\fP)
335 Like \fBcaptureStderr\fP but for the standard-output stream. Default true.
337 .B font\fP (class \fBFont\fP)
338 The font used for the stdout/stderr text, if \fBcaptureStdout\fP or
339 \fBcaptureStderr\fP are true. Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP
340 (a 14 point fixed-width font.)
342 .B overlayTextForeground\fP (class \fBForeground\fP)
343 The foreground color used for the stdout/stderr text, if \fBcaptureStdout\fP
344 or \fBcaptureStderr\fP are true. Default: Yellow.
346 .B overlayTextBackground\fP (class \fBBackground\fP)
347 The background color used for the stdout/stderr text, if \fBcaptureStdout\fP
348 or \fBcaptureStderr\fP are true. Default: Black.
350 .B programs\fP (class \fBPrograms\fP)
351 The graphics hacks which \fIxscreensaver\fP runs when the user is idle.
352 The value of this resource is a string, one \fIsh\fP-syntax command per line.
353 Each line must contain exactly one command: no semicolons, no ampersands.
355 When the screensaver starts up, one of these is selected at random, and
356 run. After the \fIcycle\fP period expires, it is killed, and another
359 If the value of this resource is empty, then no programs will be run; the
360 screen will simply be made black.
362 If the display has multiple screens, then a different program will be run
363 for each screen. (All screens are blanked and unblanked simultaniously.)
365 Note that you must escape the newlines; here is an example of how you
366 might set this in your \fI~/.Xdefaults\fP file:
370 xscreensaver.programs: \\
372 ico -r -faces -sleep 1 -obj ico \\n\\
373 xdaliclock -builtin2 -root \\n\\
374 xv -root -rmode 5 image.gif -quit \\n
378 Make sure your \fB$PATH\fP environment variable is set up correctly
379 \fIbefore\fP xscreensaver is launched, or it won't be able to find the
380 programs listed in the \fIprograms\fP resource.
382 To use a program as a screensaver, two things are required: that that
383 program draw on the root window (or be able to be configured to draw on
384 the root window); and that that program understand ``virtual root''
385 windows, as used by virtual window managers such as \fItvtwm\fP. (Generally,
386 this is accomplished by just including the \fI"vroot.h"\fP header file in
387 the program's source.)
389 If there are some programs that you want to run only when using a color
390 display, and others that you want to run only when using a monochrome
391 display, you can specify that like this:
394 mono: mono-program -root \\n\\
395 color: color-program -root \\n\\
399 More generally, you can specify the kind of visual that should be used for
400 the window on which the program will be drawing. For example, if one
401 program works best if it has a colormap, but another works best if it has
402 a 24-bit visual, both can be accommodated:
405 PseudoColor: cmap-program -root \\n\\
406 TrueColor: 24bit-program -root \\n\\
410 (This sort of thing used to be accomplished with the \fIcolorPrograms\fP
411 and \fImonoPrograms\fP resources, but those resources have now been removed;
412 a warning will be issued if they are used.)
414 In addition to the symbolic visual names described above (in the discussion
415 of the \fIvisualID\fP resource) one other visual name is supported in
416 the \fIprograms\fP list:
420 This is like \fBdefault\fP, but also requests the use of the default colormap,
421 instead of a private colormap. (That is, it behaves as if
422 the \fI\-no\-install\fP command-line option was specified, but only for
423 this particular hack.) This is provided because some third-party programs
424 that draw on the root window (notably:
428 make assumptions about the visual and colormap of the root window:
429 assumptions which xscreensaver can violate.
432 If you specify a particular visual for a program, and that visual does not
433 exist on the screen, then that program will not be chosen to run. This
434 means that on displays with multiple screens of different depths, you can
435 arrange for appropriate hacks to be run on each. For example, if one screen
436 is color and the other is monochrome, hacks that look good in mono can be
437 run on one, and hacks that only look good in color will show up on the other.
441 Normally you won't need to change the following resources:
444 .B bourneShell\fP (class \fBBourneShell\fP)
445 The pathname of the shell that \fIxscreensaver\fP uses to start subprocesses.
446 This must be whatever your local variant of \fB/bin/sh\fP is: in particular,
447 it must not be \fBcsh\fP.
449 .B windowCreationTimeout\fP (class \fBTime\fP)
450 When server extensions are not in use, this controls the delay between when
451 windows are created and when \fIxscreensaver\fP selects events on them.
454 .B pointerPollTime\fP (class \fBTime\fP)
455 When server extensions are not in use, this controls how
456 frequently \fIxscreensaver\fP checks to see if the mouse position or buttons
457 have changed. Default 5 seconds.
459 .B initialDelay\fP (class \fBTime\fP)
460 When server extensions are not in use, \fIxscreensaver\fP will wait this many
461 seconds before selecting events on existing windows, under the assumption that
462 \fIxscreensaver\fP is started during your login procedure, and the window
463 state may be in flux. Default 0. (This used to default to 30, but that was
464 back in the days when slow machines and X terminals were more common...)
466 .B overlayStderr\fP (class \fBBoolean\fP)
467 If \fBcaptureStderr\fP or \fBcaptureStdout\fP are True, and your server
468 supports ``overlay'' visuals, then the text will be written into one of
469 the higher layers instead of into the same layer as the running screenhack.
470 Set this to False to disable that (though you shouldn't need to.)
471 .SH COMMAND-LINE OPTIONS
473 also accepts the following command line options. Except for
474 the \fI\-display\fP option, these command-line options are all
475 simply shorthand for the X resources described in
476 the \fIConfiguration\fP section, above.
478 .B \-display \fIhost:display.screen\fP
479 The X display to use. For displays with multiple screens, XScreenSaver
480 will manage all screens on the display simultaniously; the \fIscreen\fP
481 argument (the ``default'' screen) says which screen should be used for
482 dialog boxes (the password window, \fIDemo Mode\fP, etc.)
484 .B \-timeout \fIminutes\fP
485 Same as the \fItimeout\fP resource.
487 .B \-cycle \fIminutes\fP
488 Same as the \fIcycle\fP resource.
491 Same as setting the \fIlock\fP resource to \fItrue\fP.
494 Same as setting the \fIlock\fP resource to \fIfalse\fP.
496 .B \-lock\-timeout \fIminutes\fP
497 Same as the \fIlockTimeout\fP resource.
499 .B \-visual \fIvisual\fP
500 Same as the \fIvisualID\fP resource.
503 Same as setting the \fIinstallColormap\fP resource to \fItrue\fP.
506 Same as setting the \fIinstallColormap\fP resource to \fIfalse\fP.
509 Same as setting the \fIverbose\fP resource to \fItrue\fP.
512 Same as setting the \fIverbose\fP resource to \fIfalse\fP.
515 Same as setting the \fItimestamp\fP resource to \fItrue\fP.
518 Same as setting the \fIsplash\fP resource to \fItrue\fP.
521 Same as setting the \fIsplash\fP resource to \fIfalse\fP.
523 .B \-nice \fIinteger\fP
524 Same as the \fInice\fP resource.
527 Same as setting the \fIsgiSaverExtension\fP resource to \fItrue\fP.
529 .B \-no\-sgi\-extension
530 Same as setting the \fIsgiSaverExtension\fP resource to \fIfalse\fP.
533 Same as setting the \fImitSaverExtension\fP resource to \fItrue\fP.
535 .B \-no\-mit\-extension
536 Same as setting the \fImitSaverExtension\fP resource to \fIfalse\fP.
538 .B \-xidle\-extension
539 Same as setting the \fIxidleExtension\fP resource to \fItrue\fP.
541 .B \-no\-xidle\-extension
542 Same as setting the \fIxidleExtension\fP resource to \fIfalse\fP.
544 .B \-xrm \fIresource-specification\fP
545 As with all other Xt programs, you can specify X resources on the command-line
546 using the \fI\-xrm\fP argument. Most of the interesting resources have
547 command-line equivalents, however.
549 When it is time to activate the screensaver, a full-screen black window is
550 created on each screen of the display. The window or windows is given the
551 appropriate properties so that, to any subsequently-created programs, it
552 will appear to be a ``virtual root'' window. Because of this, any program
553 which draws on the root window (and which understands virtual roots) can be
554 used as a screensaver.
556 When the user becomes active again, the screensaver windows are unmapped and
557 the running subprocesses are killed by sending them \fBSIGTERM\fP. This is
558 also how the subprocesses are killed when the screensaver decides that it's
559 time to run a different demo: the old one is killed and a new one is launched.
561 Before launching a subprocess, \fIxscreensaver\fP stores an appropriate value
562 for \fB$DISPLAY\fP in the environment that the child will recieve. (This is
563 so that if you start \fIxscreensaver\fP with a \fI-display\fP argument, the
564 programs which \fIxscreensaver\fP launches will draw on the same display;
565 and so that the child will end up drawing on the appropriate screen of a
566 multi-headed display.)
568 When the screensaver turns off, or is killed, care is taken to restore
569 the ``real'' virtual root window if there is one. Because of this, it is
570 important that you not kill the screensaver process with \fIkill -9\fP if
571 you are running a virtual-root window manager. If you kill it with \-9,
572 you may need to restart your window manager to repair the damage. This
573 isn't an issue if you aren't running a virtual-root window manager.
575 For all the gory details, see the commentary at the top of xscreensaver.c.
577 You can control a running screensaver process by using the
578 .BR xscreensaver\-command (1)
581 Modern X servers contain support to power down the monitor after an idle
582 period. If the monitor has powered down, then \fIxscreensaver\fP will
583 notice this, and will not waste CPU by drawing graphics demos on a black
584 screen. An attempt will also be made to explicitly power the monitor
585 back up as soon as user activity is detected.
587 If your X server supports power management, then
589 will accept a \fBdpms\fP option. So, if you wanted \fIxscreensaver\fP
590 to activate after 5 minutes, but you wanted your monitor to power down
591 after one hour (3600 seconds) you would do this:
595 See the man page for the
597 program for details. (Note that power management requires both software
598 support in the X server, and hardware support in the monitor itself.)
600 You can run \fIxscreensaver\fP from your xdm session, so that the
601 screensaver will run even when nobody is logged in on the console.
602 Simply add \fB"xscreensaver &"\fP to your \fI/usr/lib/X11/xdm/Xsetup\fP
603 file. Because \fIxdm\fP grabs the keyboard, keypresses will not make
604 the screensaver deactivate, but any mouse activity will.
606 Make sure you have \fB$PATH\fP set up correctly in the Xsetup script, or
607 \fIxdm\fP won't be able to find \fIxscreensaver\fP, and/or \fIxscreensaver\fP
608 won't be able to find its graphics hacks.
610 (If your system does not seem to be executing the \fIXsetup\fP file, you
611 may need to configure it to do so: the traditional way to do this is
612 to make that file the value of the \fIDisplayManager*setup\fP resource
613 in the \fI/usr/lib/X11/xdm/xdm-config\fP file. See the man page for
617 Users may want to add \fB"xscreensaver-command -restart"\fP to their
618 startup scripts, so that the screensaver will be reinitialized with
619 their private resource settings when they log in. Users who don't do
620 this will get the system-wide defaults instead.
622 It is safe to run this program as root (as \fIxdm\fP is likely to do.) If
623 run as root, \fIxscreensaver\fP changes its effective user and group ids to
624 something safe (like \fI"nobody"\fP) before connecting to the X server
625 or launching user-specified programs.
627 Locking doesn't work if the screensaver is launched by \fIxdm\fP. To get
628 around this, you can run the screensaver from \fIxdm\fP without locking,
629 and kill and restart it from your personal X startup script to enable
630 locking; for example, by using this pair of commands:
633 xscreensaver-command -exit
636 If you get "connection refused" errors when running \fIxscreensaver\fP
637 from \fIxdm\fP, then this probably means that you have
639 or some other security mechanism turned on. One way around this is to
640 add \fB"xhost\ +localhost"\fP to \fIXsetup\fP, just before \fIxscreensaver\fP
643 Note that this will give access to the X server to anyone capable of logging
644 in to the local machine, so in some environments, this might not be
645 appropriate. If turning off file-system-based access control is not
646 acceptable, then running \fIxscreensaver\fP from \fIxdm\fP might not be
647 possible, and users will have to launch it themselves instead of having it
648 be launched by \fIxdm\fP before anyone logs in.
650 For more information on the X server's access control mechanisms, see the
657 .SH USING CDE (COMMON DESKTOP ENVIRONMENT)
658 The easiest way to use \fIxscreensaver\fP on a system with CDE is to simply
659 switch off the built-in CDE screensaver, and use \fIxscreensaver\fP instead;
660 and second, to tell the front panel to run
661 .BR xscreensaver\-command (1)
662 with the \fI\-lock\fP option when the \fILock\fP icon is clicked.
664 To accomplish this involves five steps:
667 \fB1: Switch off CDE's locker\fP
668 Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the
669 Screen section of the Style Manager.
671 \fB2: Edit sessionetc\fP
672 Edit the file \fI~/.dt/sessions/sessionetc\fP and add to it the line
677 This will cause \fIxscreensaver\fP to be launched when you log in.
678 (As always, make sure that xscreensaver and the graphics demos are on
679 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP
680 and/or \fI.dtprofile\fP, not \fI.login\fP.)
682 \fB3: Create XScreenSaver.dt\fP
683 Create a file called \fI~/.dt/types/XScreenSaver.dt\fP with the following
691 EXEC_STRING xscreensaver-command -lock
696 This defines a ``lock'' command for the CDE front panel, that knows how
697 to talk to \fIxscreensaver\fP.
699 \fB4: Create Lock.fp\fP
700 Create a file called \fI~/.dt/types/Lock.fp\fP with the following
707 CONTAINER_NAME Switch
708 CONTAINER_TYPE SWITCH
712 PUSH_ACTION XScreenSaver
713 HELP_TOPIC FPOnItemLock
717 This associates the CDE front panel ``Lock'' icon with the lock command
718 we just defined in step 3.
721 Select ``\fIRestart Workspace Manager\fP'' from the popup menu to make
722 your changes take effect. If things seem not to be working, check the
723 file \fI~/.dt/errorlog\fP for error messages.
725 .SH USING HP VUE (VISUAL USER ENVIRONMENT)
726 Since CDE is a descendant of VUE, the instructions for using xscreensaver
727 under VUE are similar to the above:
731 \fB1: Switch off VUE's locker\fP
732 Open the ``\fIStyle Manager\fP'' and select ``\fIScreen\fP.''
733 Turn off ``\fIScreen Saver and Screen Lock\fP'' option.
735 \fB2: Make sure you have a Session\fP
736 Next, go to the Style Manager's, ``\fIStartup\fP'' page.
737 Click on ``\fISet Home Session\fP'' to create a session, then
738 on ``\fIReturn to Home Session\fP'' to select this session each
741 \fB3: Edit vue.session\fP
742 Edit the file \fI~/.vue/sessions/home/vue.session\fP and add to it
745 vuesmcmd -screen 0 -cmd "xscreensaver"
747 This will cause \fIxscreensaver\fP to be launched when you log in.
748 (As always, make sure that xscreensaver and the graphics demos are on
749 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP
750 and/or \fI.profile\fP, not \fI.login\fP.)
752 \fB3: Edit vuewmrc\fP
753 Edit the file \fI~/.vue/vuewmrc\fP and add (or change) the Lock control:
759 PUSH_ACTION f.exec "xscreensaver-command -lock"
763 This associates the VUE front panel ``Lock'' icon with the xscreensaver
769 .BR xscreensaver-command (1)
770 program is a perfect candidate for something to add to your window manager's
771 popup menus. If you use
775 or (probably) any of \fItwm\fP's many descendants, you can do it like this:
778 \fB1. Create ~/.mwmrc (or ~/.twmrc or ...)\fP
779 If you don't have a \fI~/.mwmrc\fP file (or, on SGIs, a \fI~/.4Dwmrc\fP file;
780 or, with twm, a \fI~/.twmrc\fP file) then create one by making a copy of
781 the \fI/usr/lib/X11/system.mwmrc\fP
782 file (or \fI/usr/lib/X11/twm/system.twmrc\fP, and so on.)
784 \fB2. Add a menu definition.\fP
789 "Blank Screen Now" !"sleep 3; xscreensaver-command -activate"
790 "Lock Screen Now" !"sleep 3; xscreensaver-command -lock"
791 "Screen Saver Demo" !"xscreensaver-command -demo"
792 "Screen Saver Preferences" !"xscreensaver-command -prefs"
793 "Reinitialize Screen Saver" !"xscreensaver-command -restart"
794 "Kill Screen Saver" !"xscreensaver-command -exit"
795 "Launch Screen Saver" !"xscreensaver &"
799 \fB3. Add the menu\fP
804 find the section of the file that says \fIMenu DefaultRootMenu\fP.
807 it will probably be \fImenu "defops"\fP. If you add a line somewhere
808 in that menu definition that reads
810 "XScreenSaver" f.menu XScreenSaver
812 then this will add an XScreenSaver sub-menu to your default root-window
813 popup menu. Alternately, you could just put the \fIxscreensaver-command\fP
814 menu items directly into the root menu.
817 Other window managers might (and probably do) do things differently.
819 (This is not a bug, but) note that as of release 1.32, the \fBcolorPrograms\fP
820 and \fBmonoPrograms\fP resources are no longer used: they have been
821 supplanted by the extended syntax of the \fBprograms\fP resource (which is
822 described in the \fIConfiguration\fP section, above.)
825 If you are not making use of one of the server extensions (\fBXIDLE\fP,
826 \fBSGI SCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in
827 rare situations, for \fIxscreensaver\fP to interfere with event propagation
828 and make another X program malfunction. For this to occur, that other
829 application would need to \fInot\fP select \fBKeyPress\fP events on its
830 non-leaf windows within the first 30 seconds of their existence, but then
831 select for them later. In this case, that client \fImight\fP fail to receive
832 those events. This isn't very likely, since programs generally select a
833 constant set of events immediately after creating their windows and then
834 don't change them, but this is the reason that it's a good idea to install
835 and use one of the server extensions instead, to work around this shortcoming
839 Although this program ``nices'' the subprocesses that it starts,
840 graphics-intensive subprograms can still overload the machine by causing
841 the X server process itself (which is not ``niced'') to suck a lot of
842 cycles. Care should be taken to slow down programs intended for use as
843 screensavers by inserting strategic calls to
847 (or making liberal use of any \fI\-delay\fP options which the programs
850 Also, an active screensaver will cause your X server to be pretty much
851 permanently swapped in; but the same is true of any program that draws
857 .B Latency and Responsiveness
858 If the subprocess is drawing too quickly and the connection to the X
859 server is a slow one (such as an X terminal running over a phone line) then
860 the screensaver might not turn off right away when the user becomes active
863 demo has this problem if being run in full-speed mode). This can be
864 alleviated by inserting strategic calls to
866 in code intended for use as a screensaver. This prevents too much graphics
867 activity from being buffered up.
870 If xscreensaver has been launched from
872 you will need to cause the xscreensaver daemon to exit and restart in
873 order to lock the screen.
875 The reason for this is, if xscreensaver has been launched by
877 that means it was launched \fIbefore\fP you logged in: so it has no way of
878 knowing who the logged-in user is, and therefore, whose password it should
881 So if you want to use it as a locker, you must start it with your user id.
882 If it has already been started by \fIxdm\fP, you can kill it by sending
883 it the \fBexit\fP command, and then re-launching it as you, by putting
884 something like the following in your personal X startup script:
886 xscreensaver-command -exit
889 See the ``\fIUsing XDM(1)\fP'' section, above, for more details.
891 .B Locking and root logins
892 An implication of the above is that if you log in as \fIroot\fP on the
893 console, xscreensaver will refuse to lock the screen (because it can't tell
894 the difference between \fIroot\fP being logged in on the console, and a
895 normal user being logged in on the console but xscreensaver having been run
899 The solution to this is simple: you shouldn't be logging in on the console
900 as \fIroot\fP in the first place! (What, are you crazy or something?) You
901 should log in as you, and
903 to \fIroot\fP as necessary. People who spend their day logged in
904 as \fIroot\fP are just begging for disaster.
907 For xscreensaver to work when launched by
909 programs running on the local machine as user \fI"nobody"\fP must be
910 able to connect to the X server. This means that \fB"xhost +localhost"\fP
911 is required if xscreensaver is to be launched by
913 This is \fInot\fP required if \fIxscreensaver\fP is launched by the
914 individual users: it is only necessary when it is launched by
916 before any user has logged in. See the ``\fIUsing XDM(1)\fP'' section,
917 above, for more details.
919 If anyone has suggestions on how xscreensaver could be made to work with
921 without first turning off \fI.Xauthority\fP-based access control, please
925 If you get an error message like ``couldn't get password of \fIuser\fP''
926 then this probably means that you're on a system in which the
928 library routine can only be effectively used by root. If this is the case,
929 then \fIxscreensaver\fP must be installed as setuid to root. Care has
930 been taken to make this a safe thing to do.
932 It also may mean that your system uses shadow passwords instead of the
933 standard \fIgetpwent\fP interface; in that case, you may need to change
934 some options with \fIconfigure\fP and recompile.
936 If you change your password after xscreensaver has been launched, it will
937 continue using your old password to unlock the screen until xscreensaver
938 is restarted. So, after you change your password, you'll have to do
940 xscreensaver-command -restart
942 to make \fIxscreensaver\fP notice.
944 .B Colormap lossage: TWM
945 The \fBinstallColormap\fP option doesn't work very well with the
947 window manager and its descendants.
949 There is a race condition between the screensaver and this window manager,
950 which can result in the screensaver's colormap not getting installed
951 properly, meaning the graphics hacks will appear in essentially random
952 colors. (If the screen goes white instead of black, this is probably why.)
958 window managers don't seem to have this problem. The race condition exists
959 because X does not provide a way for an OverrideRedirect window to have its
960 own colormap, short of grabbing the server (which is neither a good idea, nor
961 really possible with the current design.) What happens is that, as soon as
962 the screensaver installs its colormap, \fBtwm\fP responds to
963 the \fBColormapNotify\fP event that is generated by re-instaling the default
964 colormap. Apparently, \fBtwm\fP doesn't \fIalways\fP do this; it seems to do
965 it regularly if the screensaver is activated from a menu item, but seems to
966 not do it if the screensaver comes on of its own volition, or is activated
967 from another console. Any thoughts on this problem are welcome...
969 .B Colormap lossage: XV, XAnim, XEarth
970 Some programs don't operate properly on visuals other than the default one,
971 or with colormaps other than the default one. See the discussion of the
972 magic "default-n" visual name in the description of the \fBprograms\fP
973 resource in the \fIConfiguration\fP section. When programs only work with
974 the default colormap, you need to use a syntax like this:
976 default-n: xv -root image-1.gif -quit \\n\\
977 default-n: xearth -nostars -wait 0 \\n\\
979 It would also work to turn off the \fBinstallColormap\fP option altogether,
980 but that would deny extra colors to those programs that \fIcan\fP take
984 Apparently there are some problems with XView programs getting confused
985 and thinking that the screensaver window is the real root window even when
986 the screensaver is not active: ClientMessages intended for the window manager
987 are sent to the screensaver window instead. This could be solved by making
988 xscreensaver forward all unrecognised ClientMessages to the real root window,
989 but there may be other problems as well. If anyone has any insight on the
990 cause of this problem, please let me know. (XView is an X11 toolkit that
991 implements the (quite abominable) Sun OpenLook look-and-feel.)
993 .B MIT Extension and Fading
994 When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with
995 the \fBfade\fP option, you may notice an unattractive flicker just before
996 the fade begins. This is because the server maps a black window just before
997 it tells the \fIxscreensaver\fP process to activate. The \fIxscreensaver\fP
998 process immediately unmaps that window, but this results in a flicker. I
999 haven't figured a way to get around this; it seems to be a fundamental
1000 property of the (mis-) design of this server extension.
1002 It sure would be nice if someone would implement the \fBSGI SCREEN_SAVER\fP
1003 extension in XFree86; it's dead simple, and works far better than the
1004 overengineered and broken \fBMIT-SCREEN-SAVER\fP extension.
1006 .B Lesstif (Motif clone)
1007 \fIDemo Mode\fP is buggy if XScreenSaver was compiled against really old
1008 versions Lesstif; if you use Lesstif, make sure you use version 0.82 or newer.
1011 If you compiled against the Athena widget toolkit, the dialog boxes are
1012 pretty ugly, especially the password dialog. Use Motif! If you don't
1013 have OSF Motif, use GNU Lesstif, it's free: http://www.lesstif.org/
1016 If you're running Irix 6.3, you might find that your monitor is powering down
1017 after an hour or two even if you've told it not to. This is fixed by SGI
1018 patches 2447 and 2537.
1020 .B OpenGL Programs and Visuals
1021 Some of the graphics demos included with xscreensaver make use of the
1022 OpenGL (or MesaGL) 3D library, if it is available. It is possible (even
1023 likely) that \fIxscreensaver\fP's notion of the ``\fIbest\fP'' visual is
1024 not quite right for these GL programs.
1026 The odd thing about GL programs is that, unlike normal X11 programs, they
1027 tend to work best on a visual \fIhalf\fP as deep as the depth of the screen,
1028 since that way, they can do double-buffering. Try it and see, but you will
1029 probably find that, for these particular programs, you should specify the
1030 deepest visual that is half as deep as the screen. (See the discussion
1031 of the \fBprograms\fP resource in the \fIConfiguration\fP section, above.)
1033 For example, on a screen that supports both 24-bit TrueColor and 12-bit
1034 PseudoColor visuals, the 12-bit visual will probably work best (this is true
1035 of base-model SGI Indys: the 0x29 visual is the one you want.) Oddly, on
1036 SGI O2s (machines that have serious hardware support for GL), the 12-bit
1037 PseudoColor visual looks awful (you get a black and white, flickery image.)
1038 On these machines, the visual you want turns out to be 0x31. However, 0x31
1039 is but \fIone\fP of the \fIeight\fP 15-bit TrueColor visuals (yes, 8, and
1040 yes, 15) that the O2 X server provides. This is the only visual that works
1043 is concerned, all of the 15-bit TrueColor visuals are identical, but some
1044 flicker like mad, and some have deeply weird artifacts (such as hidden
1045 surfaces that show through, as if depth worked backwards!)
1047 I suppose these other visuals must be tied to some arcane hardware feature...
1048 If anyone would care to explain it to me, that would be great.
1050 Your mileage, therefore, may vary dramatically.
1053 There need to be a lot more graphics hacks. In particular, there should be
1054 a simulation of a Lavalite (tm).
1059 to get the default host and display number, and to inform the sub-programs
1060 of the screen on which to draw.
1063 to find the sub-programs to run.
1066 to get the name of a resource file that overrides the global resources
1067 stored in the RESOURCE_MANAGER property.
1069 The latest version can always be found at
1070 http://www.jwz.org/xscreensaver/
1073 .BR xscreensaver\-command (1),
1090 .BR decayscreen (1),
1109 .BR interference (1),
1112 .BR kaleidescope (1),
1137 .BR slidescreen (1),
1145 .BR superquadrics (1),
1157 .BR xbouncebits (1),
1168 Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
1169 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell
1170 this software and its documentation for any purpose is hereby granted without
1171 fee, provided that the above copyright notice appear in all copies and that
1172 both that copyright notice and this permission notice appear in supporting
1173 documentation. No representations are made about the suitability of this
1174 software for any purpose. It is provided "as is" without express or implied
1177 Jamie Zawinski <jwz@jwz.org>. Written in late 1991; first posted
1178 to comp.sources.x on 13-Aug-1992.
1180 Please let me know if you find any bugs or make any improvements.
1181 .SH ACKNOWLEDGEMENTS
1182 Thanks to David Wojtowicz for implementing \fIlockTimeout\fP.
1184 Thanks to Martin Kraemer for adding support for shadow passwords and
1185 locking-disabled diagnostics.
1187 Thanks to the many people who have contributed graphics demos to the package.
1189 Thanks to Patrick Moreau for the VMS port.
1191 Thanks to Mark Bowyer for figuring out how to hook it up to CDE.
1193 And huge thanks to Jon A. Christopher for implementing the Athena dialog
1194 support, back in the days before Lesstif was a viable alternative to Motif.