14 .TH XScreenSaver 1 "16-Dec-2004 (4.19)" "X Version 11"
16 xscreensaver - extensible screen saver framework, plus locking
19 [\-display \fIhost:display.screen\fP] \
21 [\-no\-capture\-stderr] \
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.
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.
32 It also provides configuration and control of your monitor's power-saving
35 For the impatient, try this:
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.
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)
52 .BR xscreensaver-command (1)
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.
60 I'll repeat that because it's important:
63 The easy way to configure xscreensaver is to run the
64 .BR xscreensaver-demo (1)
65 program. You shouldn't need to know any of the stuff described
66 in \fIthis\fP manual unless you are trying to do something tricky,
67 like customize xscreensaver for site-wide use or something.
70 Options to \fIxscreensaver\fP are stored in one of two places: in
71 a \fI.xscreensaver\fP file in your home directory; or in the X resource
72 database. If the \fI.xscreensaver\fP file exists, it overrides any settings
73 in the resource database.
75 The syntax of the \fI.xscreensaver\fP file is similar to that of
76 the \fI.Xdefaults\fP file; for example, to set the \fItimeout\fP paramter
77 in the \fI.xscreensaver\fP file, you would write the following:
81 whereas, in the \fI.Xdefaults\fP file, you would write
83 xscreensaver.timeout: 5
85 If you change a setting in the \fI.xscreensaver\fP file while xscreensaver
86 is already running, it will notice this, and reload the file. (The file will
87 be reloaded the next time the screen saver needs to take some action, such as
88 blanking or unblanking the screen, or picking a new graphics mode.)
90 If you change a setting in your X resource database, or if you want
91 xscreensaver to notice your changes immediately instead of the next time
92 it wakes up, then you will need to reload your \fI.Xdefaults\fP file,
93 and then tell the running xscreensaver process to restart itself, like so:
96 xscreensaver-command -restart
98 If you want to set the system-wide defaults, then make your edits to
99 the xscreensaver app-defaults file, which should have been installed
100 when xscreensaver itself was installed. The app-defaults file will
101 usually be named /usr/lib/X11/app-defaults/XScreenSaver, but different
102 systems might keep it in a different place (for example,
103 /usr/openwin/lib/app-defaults/XScreenSaver on Solaris.)
105 When settings are changed in the Preferences dialog box (see above)
106 the current settings will be written to the \fI.xscreensaver\fP file.
107 (The \fI.Xdefaults\fP file and the app-defaults file will never be
108 written by xscreensaver itself.)
111 .B timeout\fP (class \fBTime\fP)
112 The screensaver will activate (blank the screen) after the keyboard and
113 mouse have been idle for this many minutes. Default 10 minutes.
115 .B cycle\fP (class \fBTime\fP)
116 After the screensaver has been running for this many minutes, the currently
117 running graphics-hack sub-process will be killed (with \fBSIGTERM\fP), and a
118 new one started. If this is 0, then the graphics hack will never be changed:
119 only one demo will run until the screensaver is deactivated by user activity.
122 .B lock\fP (class \fBBoolean\fP)
123 Enable locking: before the screensaver will turn off, it will require you
124 to type the password of the logged-in user (really, the person who ran
125 xscreensaver), or the root password. (\fBNote:\fP this doesn't work if the
126 screensaver is launched by
128 because it can't know the user-id of the logged-in user. See
129 the ``\fIUsing XDM(1)\fP'' section, below.
131 .B lockTimeout\fP (class \fBTime\fP)
132 If locking is enabled, this controls the length of the ``grace period''
133 between when the screensaver activates, and when the screen becomes locked.
134 For example, if this is 5, and \fI\-timeout\fP is 10, then after 10 minutes,
135 the screen would blank. If there was user activity at 12 minutes, no password
136 would be required to un-blank the screen. But, if there was user activity
137 at 15 minutes or later (that is, \fI\-lock\-timeout\fP minutes after
138 activation) then a password would be required. The default is 0, meaning
139 that if locking is enabled, then a password will be required as soon as the
142 .B passwdTimeout\fP (class \fBTime\fP)
143 If the screen is locked, then this is how many seconds the password dialog box
144 should be left on the screen before giving up (default 30 seconds.) This
145 should not be too large: the X server is grabbed for the duration that the
146 password dialog box is up (for security purposes) and leaving the server
147 grabbed for too long can cause problems.
149 .B dpmsEnabled\fP (class \fBBoolean\fP)
150 Whether power management is enabled.
152 .B dpmsStandby\fP (class \fBTime\fP)
153 If power management is enabled, how long until the monitor goes solid black.
155 .B dpmsSuspend\fP (class \fBTime\fP)
156 If power management is enabled, how long until the monitor goes into
159 .B dpmsOff\fP (class \fBTime\fP)
160 If power management is enabled, how long until the monitor powers down
161 completely. Note that these settings will have no effect unless both
162 the X server and the display hardware support power management; not
163 all do. See the \fIPower Management\fP section, below, for more
166 .B visualID\fP (class \fBVisualID\fP)
167 Specify which X visual to use by default. (Note carefully that this resource
168 is called \fBvisualID\fP, not merely \fBvisual\fP; if you set the \fBvisual\fP
169 resource instead, things will malfunction in obscure ways for obscure reasons.)
171 Legal values for the \fBVisualID\fP resource are:
175 Use the screen's default visual (the visual of the root window.)
179 Use the visual which supports the most colors. Note, however, that the
180 visual with the most colors might be a TrueColor visual, which does not
181 support colormap animation. Some programs have more interesting behavior
182 when run on PseudoColor visuals than on TrueColor.
185 Use a monochrome visual, if there is one.
188 Use a grayscale or staticgray visual, if there is one and it has more than
189 one plane (that is, it's not monochrome.)
192 Use the best of the color visuals, if there are any.
195 Use the visual that is best for OpenGL programs. (OpenGL programs have
196 somewhat different requirements than other X programs.)
199 where \fIclass\fP is one of \fBStaticGray\fP, \fBStaticColor\fP,
200 \fBTrueColor\fP, \fBGrayScale\fP, \fBPseudoColor\fP, or \fBDirectColor\fP.
201 Selects the deepest visual of the given class.
204 where \fInumber\fP (decimal or hex) is interpreted as a visual id number,
207 program; in this way you can have finer control over exactly which visual
208 gets used, for example, to select a shallower one than would otherwise
213 Note that this option specifies only the \fIdefault\fP visual that will
214 be used: the visual used may be overridden on a program-by-program basis.
215 See the description of the \fBprograms\fP resource, below.
218 .B installColormap\fP (class \fBBoolean\fP)
219 On PseudoColor (8-bit) displays, install a private colormap while the
220 screensaver is active, so that the graphics hacks can get as many
221 colors as possible. This is the default. (This only applies when the
222 screen's default visual is being used, since non-default visuals get
223 their own colormaps automatically.) This can also be overridden on a
224 per-hack basis: see the discussion of the \fBdefault\-n\fP name in the
225 section about the \fBprograms\fP resource.
227 This does nothing if you have a TrueColor (16-bit or deeper) display.
229 .B verbose\fP (class \fBBoolean\fP)
230 Whether to print diagnostics. Default false.
232 .B timestamp\fP (class \fBBoolean\fP)
233 Whether to print the time of day along with any other diagnostic messages.
236 .B splash\fP (class \fBBoolean\fP)
237 Whether to display a splash screen at startup. Default true.
239 .B splashDuration\fP (class \fBTime\fP)
240 How long the splash screen should remain visible; default 5 seconds.
242 .B quad\fP (class \fBBoolean\fP)
243 If true, then \fIfour\fP screensavers will be run on each monitor.
244 Use at your own risk!
246 .B helpURL\fP (class \fBURL\fP)
247 The splash screen has a \fIHelp\fP button on it. When you press it, it will
248 display the web page indicated here in your web browser.
250 .B loadURL\fP (class \fBLoadURL\fP)
251 This is the shell command used to load a URL into your web browser.
252 The default setting will load it into Mozilla/Netscape if it is already
253 running, otherwise, will launch a new browser looking at the \fIhelpURL\fP.
255 .B demoCommand\fP (class \fBDemoCommand\fP)
256 This is the shell command run when the \fIDemo\fP button on the splash window
257 is pressed. It defaults to
258 .BR xscreensaver\-demo (1).
260 .B prefsCommand\fP (class \fBPrefsCommand\fP)
261 This is the shell command run when the \fIPrefs\fP button on the splash window
262 is pressed. It defaults to \fIxscreensaver\-demo\ \-prefs\fP.
264 .B nice\fP (class \fBNice\fP)
265 The sub-processes created by \fIxscreensaver\fP will be ``niced'' to this
266 level, so that they are given lower priority than other processes on the
267 system, and don't increase the load unnecessarily. The default is 10.
269 (Higher numbers mean lower priority; see
273 .B fade\fP (class \fBBoolean\fP)
274 If this is true, then when the screensaver activates, the current contents
275 of the screen will fade to black instead of simply winking out. This only
276 works on certain systems. A fade will also be done when switching graphics
277 hacks (when the \fIcycle\fP timer expires.) Default: true.
279 .B unfade\fP (class \fBBoolean\fP)
280 If this is true, then when the screensaver deactivates, the original contents
281 of the screen will fade in from black instead of appearing immediately. This
282 only works on certain systems, and if \fIfade\fP is true as well.
285 .B fadeSeconds\fP (class \fBTime\fP)
286 If \fIfade\fP is true, this is how long the fade will be in
287 seconds (default 3 seconds.)
289 .B fadeTicks\fP (class \fBInteger\fP)
290 If \fIfade\fP is true, this is how many times a second the colormap will
291 be changed to effect a fade. Higher numbers yield smoother fades, but
292 may make the fades take longer than the specified \fIfadeSeconds\fP if
293 your server isn't fast enough to keep up. Default 20.
295 .B captureStderr\fP (class \fBBoolean\fP)
296 Whether \fIxscreensaver\fP should redirect its stdout and stderr streams to
297 the window itself. Since its nature is to take over the screen, you would not
298 normally see error messages generated by xscreensaver or the sub-programs it
299 runs; this resource will cause the output of all relevant programs to be
300 drawn on the screensaver window itself, as well as being written to the
301 controlling terminal of the screensaver driver process. Default true.
303 .B ignoreUninstalledPrograms\fP (class \fBBoolean\fP)
304 There may be programs in the list that are not installed on the system,
305 yet are marked as "enabled." If this preference is true, then such
306 programs will simply be ignored. If false, then a warning will be printed
307 if an attempt is made to run the nonexistent program. Also, the
308 .BR xscreensaver-demo (1)
309 program will suppress the non-existent programs from the list if this
310 is true. Default: false.
312 .B font\fP (class \fBFont\fP)
313 The font used for the stdout/stderr text, if \fBcaptureStderr\fP is true.
314 Default \fB*\-medium\-r\-*\-140\-*\-m\-*\fP (a 14 point fixed-width font.)
316 .B mode\fP (class \fBMode\fP)
317 Controls the behavior of xscreensaver. Legal values are:
321 When blanking the screen, select a random display mode from among those
322 that are enabled and applicable. This is the default.
325 When blanking the screen, only ever use one particular display mode (the
326 one indicated by the \fIselected\fP setting.)
329 When blanking the screen, just go black: don't run any graphics hacks.
332 Don't ever blank the screen, and don't ever allow the monitor to power down.
336 .B selected\fP (class \fBInteger\fP)
337 When \fImode\fP is set to \fIone\fP, this is the one, indicated by its
338 index in the \fIprograms\fP list. You're crazy if you count them and
339 set this number by hand: let
340 .BR xscreensaver\-demo (1)
343 .B programs\fP (class \fBPrograms\fP)
344 The graphics hacks which \fIxscreensaver\fP runs when the user is idle.
345 The value of this resource is a multi-line string, one \fIsh\fP-syntax
346 command per line. Each line must contain exactly one command: no
347 semicolons, no ampersands.
349 When the screensaver starts up, one of these is selected (according to
350 the \fBmode\fP setting), and run. After the \fIcycle\fP period
351 expires, it is killed, and another is selected and run.
353 If a line begins with a dash (-) then that particular program is
354 disabled: it won't be selected at random (though you can still select
355 it explicitly using the
356 .BR xscreensaver\-demo (1)
359 If all programs are disabled, then the screen will just be made blank,
360 as when \fImode\fP is set to \fIblank\fP.
362 To disable a program, you must mark it as disabled with a dash instead
363 of removing it from the list. This is because the system-wide (app-defaults)
364 and per-user (.xscreensaver) settings are merged together, and if a user
365 just \fIdeletes\fP an entry from their programs list, but that entry still
366 exists in the system-wide list, then it will come back. However, if the
367 user \fIdisables\fP it, then their setting takes precedence.
369 If the display has multiple screens, then a different program will be run
370 for each screen. (All screens are blanked and unblanked simultaniously.)
372 Note that you must escape the newlines; here is an example of how you
373 might set this in your \fI~/.xscreensaver\fP file:
379 ico -r -faces -sleep 1 -obj ico \\n\\
380 xdaliclock -builtin2 -root \\n\\
381 xv -root -rmode 5 image.gif -quit \\n
385 Make sure your \fB$PATH\fP environment variable is set up correctly
386 \fIbefore\fP xscreensaver is launched, or it won't be able to find the
387 programs listed in the \fIprograms\fP resource.
389 To use a program as a screensaver, two things are required: that that
390 program draw on the root window (or be able to be configured to draw on
391 the root window); and that that program understand ``virtual root''
392 windows, as used by virtual window managers such as
394 (Generally, this is accomplished by just including the \fI"vroot.h"\fP
395 header file in the program's source.)
397 If there are some programs that you want to run only when using a color
398 display, and others that you want to run only when using a monochrome
399 display, you can specify that like this:
401 mono: mono-program -root \\n\\
402 color: color-program -root \\n\\
406 More generally, you can specify the kind of visual that should be used for
407 the window on which the program will be drawing. For example, if one
408 program works best if it has a colormap, but another works best if it has
409 a 24-bit visual, both can be accommodated:
411 PseudoColor: cmap-program -root \\n\\
412 TrueColor: 24bit-program -root \\n\\
416 In addition to the symbolic visual names described above (in the discussion
417 of the \fIvisualID\fP resource) one other visual name is supported in
418 the \fIprograms\fP list:
422 This is like \fBdefault\fP, but also requests the use of the default colormap,
423 instead of a private colormap. (That is, it behaves as if
424 the \fI\-no\-install\fP command-line option was specified, but only for
425 this particular hack.) This is provided because some third-party programs
426 that draw on the root window (notably:
430 make assumptions about the visual and colormap of the root window:
431 assumptions which xscreensaver can violate.
434 If you specify a particular visual for a program, and that visual does not
435 exist on the screen, then that program will not be chosen to run. This
436 means that on displays with multiple screens of different depths, you can
437 arrange for appropriate hacks to be run on each. For example, if one screen
438 is color and the other is monochrome, hacks that look good in mono can be
439 run on one, and hacks that only look good in color will show up on the other.
443 You shouldn't ever need to change the following resources:
446 .B pointerPollTime\fP (class \fBTime\fP)
447 When server extensions are not in use, this controls how
448 frequently \fIxscreensaver\fP checks to see if the mouse position or buttons
449 have changed. Default 5 seconds.
451 .B windowCreationTimeout\fP (class \fBTime\fP)
452 When server extensions are not in use, this controls the delay between when
453 windows are created and when \fIxscreensaver\fP selects events on them.
456 .B initialDelay\fP (class \fBTime\fP)
457 When server extensions are not in use, \fIxscreensaver\fP will wait this many
458 seconds before selecting events on existing windows, under the assumption that
459 \fIxscreensaver\fP is started during your login procedure, and the window
460 state may be in flux. Default 0. (This used to default to 30, but that was
461 back in the days when slow machines and X terminals were more common...)
464 There are a number of different X server extensions which can make
465 xscreensaver's job easier. The next few resources specify whether these
466 extensions should be utilized if they are available.
468 .B sgiSaverExtension\fP (class \fBBoolean\fP)
469 This resource controls whether the SGI \fBSCREEN_SAVER\fP server extension
470 will be used to decide whether the user is idle. This is the default
471 if \fIxscreensaver\fP has been compiled with support for this
472 extension (which is the default on SGI systems.). If it is available,
473 the \fBSCREEN_SAVER\fP method is faster and more reliable than what will
474 be done otherwise, so use it if you can. (This extension is only available
475 on Silicon Graphics systems, unfortunately.)
477 .B mitSaverExtension\fP (class \fBBoolean\fP)
478 This resource controls whether the \fBMIT\-SCREEN\-SAVER\fP server extension
479 will be used to decide whether the user is idle. However, the default for
480 this resource is \fIfalse\fP, because even if this extension is available,
481 it is flaky (and it also makes the \fBfade\fP option not work properly.)
482 Use of this extension is not recommended.
484 .B xidleExtension\fP (class \fBBoolean\fP)
485 This resource controls whether the \fBXIDLE\fP server extension will be
486 used to decide whether the user is idle. This is the default
487 if \fIxscreensaver\fP has been compiled with support for this extension.
488 (This extension is only available for X11R4 and X11R5 systems, unfortunately.)
490 .B procInterrupts\fP (class \fBBoolean\fP)
491 This resource controls whether the \fB/proc/interrupts\fP file should be
492 consulted to decide whether the user is idle. This is the default
493 if \fIxscreensaver\fP has been compiled on a system which supports this
494 mechanism (i.e., Linux systems.)
496 The benefit to doing this is that \fIxscreensaver\fP can note that the user
497 is active even when the X console is not the active one: if the user is
498 typing in another virtual console, xscreensaver will notice that and will
499 fail to activate. For example, if you're playing Quake in VGA-mode,
500 xscreensaver won't wake up in the middle of your game and start competing
503 The drawback to doing this is that perhaps you \fIreally do\fP want idleness
504 on the X console to cause the X display to lock, even if there is activity
505 on other virtual consoles. If you want that, then set this option to False.
506 (Or just lock the X console manually.)
508 The default value for this resource is True, on systems where it works.
510 .B overlayStderr\fP (class \fBBoolean\fP)
511 If \fBcaptureStderr\fP is True, and your server supports ``overlay'' visuals,
512 then the text will be written into one of the higher layers instead of into
513 the same layer as the running screenhack. Set this to False to disable
514 that (though you shouldn't need to.)
516 .B overlayTextForeground\fP (class \fBForeground\fP)
517 The foreground color used for the stdout/stderr text, if \fBcaptureStderr\fP
518 is true. Default: Yellow.
520 .B overlayTextBackground\fP (class \fBBackground\fP)
521 The background color used for the stdout/stderr text, if \fBcaptureStderr\fP
522 is true. Default: Black.
524 .B bourneShell\fP (class \fBBourneShell\fP)
525 The pathname of the shell that \fIxscreensaver\fP uses to start subprocesses.
526 This must be whatever your local variant of \fB/bin/sh\fP is: in particular,
527 it must not be \fBcsh\fP.
528 .SH COMMAND-LINE OPTIONS
530 also accepts a few command-line options, mostly for use when debugging:
531 for normal operation, you should configure things via the \fI~/.xscreensaver\fP
534 .B \-display \fIhost:display.screen\fP
535 The X display to use. For displays with multiple screens, XScreenSaver
536 will manage all screens on the display simultaniously.
539 Same as setting the \fIverbose\fP resource to \fItrue\fP: print diagnostics
540 on stderr and on the xscreensaver window.
542 .B \-no-capture-stderr
543 Same as setting the \fIcaptureStderr\fP resource to \fIfalse\fP: do not
544 redirect the stdout and stderr streams to the xscreensaver window itself.
545 If xscreensaver is crashing, you might need to do this in order to see
548 When it is time to activate the screensaver, a full-screen black window is
549 created on each screen of the display. Each window is created in such a way
550 that, to any subsequently-created programs, it will appear to be a ``virtual
551 root'' window. Because of this, any program which draws on the root
552 window (and which understands virtual roots) can be used as a screensaver.
554 When the user becomes active again, the screensaver windows are unmapped, and
555 the running subprocesses are killed by sending them \fBSIGTERM\fP. This is
556 also how the subprocesses are killed when the screensaver decides that it's
557 time to run a different demo: the old one is killed and a new one is launched.
559 Before launching a subprocess, \fIxscreensaver\fP stores an appropriate value
560 for \fB$DISPLAY\fP in the environment that the child will receive. (This is
561 so that if you start \fIxscreensaver\fP with a \fI-display\fP argument, the
562 programs which \fIxscreensaver\fP launches will draw on the same display;
563 and so that the child will end up drawing on the appropriate screen of a
564 multi-headed display.)
566 When the screensaver turns off, or is killed, care is taken to restore
567 the ``real'' virtual root window if there is one. Because of this, it is
568 important that you not kill the screensaver process with \fIkill -9\fP if
569 you are running a virtual-root window manager. If you kill it with \-9,
570 you may need to restart your window manager to repair the damage. This
571 isn't an issue if you aren't running a virtual-root window manager.
573 For all the gory details, see the commentary at the top of xscreensaver.c.
575 You can control a running screensaver process by using the
576 .BR xscreensaver\-command (1)
579 Modern X servers contain support to power down the monitor after an idle
580 period. If the monitor has powered down, then \fIxscreensaver\fP will
581 notice this (after a few minutes), and will not waste CPU by drawing
582 graphics demos on a black screen. An attempt will also be made to
583 explicitly power the monitor back up as soon as user activity is detected.
585 As of version 3.28 (Feb 2001), the \fI~/.xscreensaver\fP file controls the
586 configuration of your display's power management settings: if you have
589 to change your power management settings, then xscreensaver will
590 override those changes with the values specified
591 in \fI~/.xscreensaver\fP (or with its built-in defaults, if there
592 is no \fI~/.xscreensaver\fP file yet.)
594 To change your power management settings, run
595 .BR xscreensaver\-demo (1)
596 and change the various timeouts through the user interface.
597 Alternately, you can edit the \fI~/.xscreensaver\fP file directly.
599 If the power management section is grayed out in the
600 .BR xscreensaver\-demo (1)
601 window, then that means that your X server does not support
602 the XDPMS extension, and so control over the monitor's power state
605 If you're using a laptop, don't be surprised if changing the DPMS
606 settings has no effect: many laptops have monitor power-saving behavior
607 built in at a very low level that is invisible to Unix and X. On such
608 systems, you can typically adjust the power-saving delays only by
609 changing settings in the BIOS in some hardware-specific way.
611 If DPMS seems not to be working with XFree86, make sure the "DPMS"
612 option is set in your \fI/etc/X11/XF86Config\fP file. See the
616 You can run \fIxscreensaver\fP from your
618 session, so that the screensaver will run even when nobody is logged
621 The trick to using xscreensaver with \fIxdm\fP is this: keep in mind the
622 two very different states in which xscreensaver will be running:
625 .B 1: Nobody logged in.
627 If you're thinking of running xscreensaver from XDM at all, then it's
628 probably because you want graphics demos to be running on the console
629 when nobody is logged in there. In this case, xscreensaver will function
630 only as a screen saver, not a screen locker: it doesn't make sense
631 for xscreensaver to lock the screen, since nobody is logged in yet!
632 The only thing on the screen is the XDM login prompt.
634 .B 2: Somebody logged in.
636 Once someone has logged in through the XDM login window, the situation is
637 very different. For example: now it makes sense to lock the screen (and
638 prompt for the logged in user's password); and now xscreensaver should
639 consult that user's \fI~/.xscreensaver\fP file; and so on.
642 The difference between these two states comes down to a question of,
643 which user is the \fIxscreensaver\fP process running as? For the first
644 state, it doesn't matter. If you start \fIxscreensaver\fP in the usual
645 XDM way, then xscreensaver will probably end up running as root, which
646 is fine for the first case (the ``nobody logged in'' case.)
648 However, once someone is logged in, running as root is no longer fine:
649 because xscreensaver will be consulting root's \fI.xscreensaver\fP file
650 instead of that of the logged in user, and won't be prompting for the
651 logged in user's password, and so on. (This is not a security problem,
652 it's just not what you want.)
654 So, once someone has logged in, you want xscreensaver to be running as that
655 user. The way to accomplish this is to kill the old xscreensaver process
656 and start a new one (as the new user.)
658 The simplest way to accomplish all of this is as follows:
661 .B 1: Launch xscreensaver before anyone logs in.
663 To the file \fI/usr/lib/X11/xdm/Xsetup\fP, add the lines
666 xscreensaver-command -exit
669 This will run xscreensaver as root, over the XDM login window.
670 Moving the mouse will cause the screen to un-blank, and allow the user
671 to type their password at XDM to log in.
673 .B 2: Restart xscreensaver when someone logs in.
675 Near the top of the file \fI/usr/lib/X11/xdm/Xsession\fP, add those same lines:
677 xscreensaver-command -exit
680 When someone logs in, this will kill off the existing (root) xscreensaver
681 process, and start a new one, running as the user who has just logged in.
682 If the user's .xscreensaver file requests locking, they'll get it. They
683 will also get their own choice of timeouts, and graphics demos, and so on.
685 Alternately, each user could just put those lines in their
686 personal \fI~/.xsession\fP files.
689 Make sure you have \fB$PATH\fP set up correctly in the \fIXsetup\fP
690 and \fIXsession\fP scripts, or \fIxdm\fP won't be able to
691 find \fIxscreensaver\fP, and/or \fIxscreensaver\fP won't be able to
692 find its graphics demos.
694 (If your system does not seem to be executing the \fIXsetup\fP file, you
695 may need to configure it to do so: the traditional way to do this is
696 to make that file the value of the \fIDisplayManager*setup\fP resource
697 in the \fI/usr/lib/X11/xdm/xdm-config\fP file. See the man page for
701 It is safe to run \fIxscreensaver\fP as root (as \fIxdm\fP is likely to do.)
702 If run as root, \fIxscreensaver\fP changes its effective user and group ids
703 to something safe (like \fI"nobody"\fP) before connecting to the X server
704 or launching user-specified programs.
706 An unfortunate side effect of this (important) security precaution is that
707 it may conflict with cookie-based authentication.
709 If you get "connection refused" errors when running \fIxscreensaver\fP
710 from \fIxdm\fP, then this probably means that you have
712 or some other security mechanism turned on. One way around this is to
713 add \fB"xhost\ +localhost"\fP to \fIXsetup\fP, just before \fIxscreensaver\fP
716 Note that this will give access to the X server to anyone capable of logging
717 in to the local machine, so in some environments, this might not be
718 appropriate. If turning off file-system-based access control is not
719 acceptable, then running \fIxscreensaver\fP from the \fIXsetup\fP file
720 might not be possible, and xscreensaver will only work when running as
721 a normal, unprivileged user.
723 For more information on the X server's access control mechanisms, see the
731 Using xscreensaver with
733 is easy, because gdm has a configuration tool. Just fire up
735 and on the \fIBackground\fP page, type \fB"xscreensaver -nosplash"\fP into
736 the \fIBackground Program\fP field. That will cause gdm to run xscreensaver
737 while nobody is logged in, and kill it as soon as someone does log in.
738 (The user will then be responsible for starting xscreensaver on their
741 Another way to accomplish the same thing is to edit the
742 file \fI/etc/X11/gdm/gdm.conf\fP to include:
744 BackgroundProgram=xscreensaver -nosplash
745 RunBackgroundProgramAlways=true
747 In this situation, the \fIxscreensaver\fP process will probably be running
748 as user \fIgdm\fP instead of \fIroot\fP. You can configure the settings
749 for this nobody-logged-in state (timeouts, DPMS, etc.) by editing
750 the \fI~gdm/.xscreensaver\fP file.
752 To get gdm to run the BackgroundProgram, you may need to switch it from
753 the "Graphical Greeter" to the "Standard Greeter".
754 .SH USING KDE (K DESKTOP ENVIRONMENT)
755 I understand that KDE has invented their own wrapper around xscreensaver,
757 .BR xscreensaver-demo (1)
758 in any number of ways. I've never actually seen it, but I'm told that
759 this is the way you disable it:
762 \fB1: Switch off KDE's screen saver.\fP
763 Open the ``\fIControl Center\fP'' and
764 select the ``\fILook and Feel / Screensaver\fP'' page.
765 Turn off the ``\fIEnable Screensaver\fP'' checkbox.
767 \fB2: Find your Autostart directory.\fP
768 Open the ``\fILook and Feel / Desktop / Paths\fP'' page,
769 and see what your ``Autostart'' directory is set to: it will
770 probably be \fI~/.kde3/Autostart/\fP or something similar.
772 \fB3: Make xscreensaver be an Autostart program.\fP
773 Create a file in your autostart directory
774 called \fIxscreensaver.desktop\fP that contains the following five lines:
780 X-KDE-StartupNotify=false
784 Now use xscreensaver normally, controlling it via the usual
785 .BR xscreensaver-demo (1)
787 .BR xscreensaver-command (1)
789 .SH USING CDE (COMMON DESKTOP ENVIRONMENT)
790 The easiest way to use \fIxscreensaver\fP on a system with CDE is to simply
791 switch off the built-in CDE screensaver, and use \fIxscreensaver\fP instead;
792 and second, to tell the front panel to run
793 .BR xscreensaver\-command (1)
794 with the \fI\-lock\fP option when the \fILock\fP icon is clicked.
796 To accomplish this involves five steps:
799 \fB1: Switch off CDE's locker\fP
800 Do this by turning off ``\fIScreen Saver and Screen Lock\fP'' in the
801 Screen section of the Style Manager.
803 \fB2: Edit sessionetc\fP
804 Edit the file \fI~/.dt/sessions/sessionetc\fP and add to it the line
808 And make sure the sessionetc file is executable.
809 This will cause \fIxscreensaver\fP to be launched when you log in.
810 (As always, make sure that xscreensaver and the graphics demos are on
811 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP
812 and/or \fI.dtprofile\fP, not \fI.login\fP.)
814 \fB3: Create XScreenSaver.dt\fP
815 Create a file called \fI~/.dt/types/XScreenSaver.dt\fP with the following
822 EXEC_STRING xscreensaver-command -lock
827 This defines a ``lock'' command for the CDE front panel, that knows how
828 to talk to \fIxscreensaver\fP.
830 \fB4: Create Lock.fp\fP
831 Create a file called \fI~/.dt/types/Lock.fp\fP with the following
837 CONTAINER_NAME Switch
838 CONTAINER_TYPE SWITCH
842 PUSH_ACTION XScreenSaver
843 HELP_TOPIC FPOnItemLock
847 This associates the CDE front panel ``Lock'' icon with the lock command
848 we just defined in step 3.
851 Select ``\fIRestart Workspace Manager\fP'' from the popup menu to make
852 your changes take effect. If things seem not to be working, check the
853 file \fI~/.dt/errorlog\fP for error messages.
855 .SH USING HP VUE (VISUAL USER ENVIRONMENT)
856 Since CDE is a descendant of VUE, the instructions for using xscreensaver
857 under VUE are similar to the above:
860 \fB1: Switch off VUE's locker\fP
861 Open the ``\fIStyle Manager\fP'' and select ``\fIScreen\fP.''
862 Turn off ``\fIScreen Saver and Screen Lock\fP'' option.
864 \fB2: Make sure you have a Session\fP
865 Next, go to the Style Manager's, ``\fIStartup\fP'' page.
866 Click on ``\fISet Home Session\fP'' to create a session, then
867 on ``\fIReturn to Home Session\fP'' to select this session each
870 \fB3: Edit vue.session\fP
871 Edit the file \fI~/.vue/sessions/home/vue.session\fP and add to it
874 vuesmcmd -screen 0 -cmd "xscreensaver"
876 This will cause \fIxscreensaver\fP to be launched when you log in.
877 (As always, make sure that xscreensaver and the graphics demos are on
878 your \fB$PATH\fP; the path needs to be set in \fI.cshrc\fP
879 and/or \fI.profile\fP, not \fI.login\fP.)
881 \fB3: Edit vuewmrc\fP
882 Edit the file \fI~/.vue/vuewmrc\fP and add (or change) the Lock control:
888 PUSH_ACTION f.exec "xscreensaver-command -lock"
892 This associates the VUE front panel ``Lock'' icon with the xscreensaver
897 Bugs? There are no bugs. Ok, well, maybe. If you find one, please let
898 me know. http://www.jwz.org/xscreensaver/bugs.html explains how to
899 construct the most useful bug reports.
902 If xscreensaver has been launched from
904 before anyone has logged in, you will need to kill and then restart the
905 xscreensaver daemon after you have logged in, or you will be confused by
906 the results. (For example, locking won't work, and your \fI~/.xscreensaver\fP
907 file will be ignored.)
909 When you are logged in, you want the \fIxscreensaver\fP daemon to be
910 running under \fIyour\fP user id, not as root or some other user.
912 If it has already been started by \fIxdm\fP, you can kill it by sending
913 it the \fBexit\fP command, and then re-launching it as you, by putting
914 something like the following in your personal X startup script:
916 xscreensaver-command -exit
919 The ``\fIUsing XDM(1)\fP'' section, above, goes into more detail, and explains
920 how to configure the system to do this for all users automatically.
922 .B Locking and root logins
923 In order for it to be safe for xscreensaver to be launched by \fIxdm\fP,
924 certain precautions had to be taken, among them that xscreensaver never
925 runs as \fIroot\fP. In particular, if it is launched as root (as \fIxdm\fP
926 is likely to do), xscreensaver will disavow its privileges, and switch
927 itself to a safe user id (such as \fInobody\fP.)
929 An implication of this is that if you log in as \fIroot\fP on the console,
930 xscreensaver will refuse to lock the screen (because it can't tell
931 the difference between \fIroot\fP being logged in on the console, and a
932 normal user being logged in on the console but xscreensaver having been
938 The solution to this is simple: you shouldn't be logging in on the console
939 as \fIroot\fP in the first place! (What, are you crazy or something?)
941 Proper Unix hygiene dictates that you should log in as yourself, and
943 to \fIroot\fP as necessary. People who spend their day logged in
944 as \fIroot\fP are just begging for disaster.
947 For xscreensaver to work when launched by
949 programs running on the local machine as user \fI"nobody"\fP must be
950 able to connect to the X server. This means that if you want to run
951 xscreensaver on the console while nobody is logged in, you may need
952 to disable cookie-based access control (and allow all users who can log
953 in to the local machine to connect to the display.)
955 You should be sure that this is an acceptable thing to do in your
956 environment before doing it. See the ``\fIUsing XDM(1)\fP'' section,
957 above, for more details.
960 If you get an error message at startup like ``couldn't get password
961 of \fIuser\fP'' then this probably means that you're on a system in which
964 library routine can only be effectively used by root. If this is the case,
965 then \fIxscreensaver\fP must be installed as setuid to root in order for
966 locking to work. Care has been taken to make this a safe thing to do.
968 It also may mean that your system uses shadow passwords instead of the standard
970 interface; in that case, you may need to change some options
971 with \fIconfigure\fP and recompile.
973 If you change your password after xscreensaver has been launched, it will
974 continue using your old password to unlock the screen until xscreensaver
975 is restarted. On some systems, it may accept \fIboth\fP your old and new
976 passwords. So, after you change your password, you'll have to do
978 xscreensaver-command -restart
980 to make \fIxscreensaver\fP notice.
983 If your system uses PAM (Pluggable Authentication Modules), then in order
984 for xscreensaver to use PAM properly, PAM must be told about xscreensaver.
985 The xscreensaver installation process should update the PAM data (on Linux,
986 by creating the file \fI/etc/pam.d/xscreensaver\fP for you, and on Solaris,
987 by telling you what lines to add to the \fI/etc/pam.conf\fP file.)
989 If the PAM configuration files do not know about xscreensaver, then
990 you \fImight\fP be in a situation where xscreensaver will refuse to ever
993 This is a design flaw in PAM (there is no way for a client to tell the
994 difference between PAM responding ``I have never heard of your module,''
995 and responding, ``you typed the wrong password.'') As far as I can tell,
996 there is no way for xscreensaver to automatically work around this, or
997 detect the problem in advance, so if you have PAM, make sure it is
998 configured correctly!
1000 .B Colormap lossage: TWM
1001 The \fBinstallColormap\fP option doesn't work very well with the
1003 window manager and its descendants, on 8-bit screens.
1005 There is a race condition between the screensaver and this window manager,
1006 which can result in the screensaver's colormap not getting installed
1007 properly, meaning the graphics hacks will appear in essentially random
1008 colors. (If the screen goes white instead of black, this is probably why.)
1014 window managers don't have this problem. The race condition exists
1015 because X (really, ICCCM) does not provide a way for an OverrideRedirect
1016 window to have its own colormap, short of grabbing the server (which is
1017 neither a good idea, nor really possible with the current design.) What
1018 happens is that, as soon as xscreensaver installs its colormap, \fBtwm\fP
1019 responds to the resultant \fBColormapNotify\fP event by re-instaling the
1020 default colormap. Apparently, \fBtwm\fP doesn't \fIalways\fP do this; it
1021 seems to do it regularly if the screensaver is activated from a menu item,
1022 but seems to not do it if the screensaver comes on of its own volition, or
1023 is activated from another console.
1026 .B Attention, window manager authors!
1027 You should only call
1028 .BR XInstallColormap (3)
1029 in response to user events. That is, it is appropriate to install a colormap
1030 in response to \fBFocusIn\fP, \fBFocusOut\fP, \fBEnterNotify\fP,
1031 and \fBLeaveNotify\fP events; but it is not appropriate to call it in
1032 response to \fBColormapNotify\fP events. If you install colormaps in
1033 response to \fIapplication\fP actions as well as in response to \fIuser\fP
1034 actions, then you create the situation where it is impossible for
1035 override-redirect applications (such as xscreensaver) to display their
1036 windows in the proper colors.
1039 .B Colormap lossage: XV, XAnim, XEarth
1040 Some programs don't operate properly on visuals other than the default one,
1041 or with colormaps other than the default one. See the discussion of the
1042 magic "default-n" visual name in the description of the \fBprograms\fP
1043 resource in the \fIConfiguration\fP section. When programs only work with
1044 the default colormap, you need to use a syntax like this:
1046 default-n: xv -root image-1.gif -quit \\n\\
1047 default-n: xearth -nostars -wait 0 \\n\\
1049 It would also work to turn off the \fBinstallColormap\fP option altogether,
1050 but that would deny extra colors to those programs that \fIcan\fP take
1054 Although this program ``nices'' the subprocesses that it starts,
1055 graphics-intensive subprograms can still overload the machine by causing
1056 the X server process itself (which is not ``niced'') to consume many
1057 cycles. Care has been taken in all the modules shipped with xscreensaver
1058 to sleep periodically, and not run full tilt, so as not to cause
1061 However, if you are running the OpenGL-based screen savers on a machine
1062 that does not have a video card with 3D acceleration, they \fIwill\fP
1063 make your machine slow, despite
1066 Your options are: don't use the OpenGL display modes; or, collect the
1067 spare change hidden under the cushions of your couch, and use it to
1068 buy a video card manufactured after 1998. (It doesn't even need to be
1069 \fIfast\fP 3D hardware: the problem will be fixed if there is any
1070 3D hardware \fIat all.\fP)
1072 .B XFree86's Magic Keystrokes
1073 The XFree86 X server traps certain magic keystrokes before client programs ever
1074 see them. Two that are of note are Ctrl+Alt+Backspace, which causes
1075 the X server to exit; and Ctrl+Alt+F\fIn\fP, which switches virtual consoles.
1076 The X server will respond to these keystrokes even if xscreensaver has the
1077 screen locked. Depending on your setup, you might consider this a problem.
1079 Unfortunately, there is no way for xscreensaver itself to override the
1080 interpretation of these keys. If you want to disable Ctrl+Alt+Backspace
1081 globally, you need to set the \fIDontZap\fP flag in
1082 your \fI/etc/X11/XF86Config\fP file. To globally disable VT switching,
1083 you can set the \fIDontVTSwitch\fP flag. See the
1087 .B MIT Extension and Fading
1088 The \fBMIT-SCREEN-SAVER\fP extension is junk. Don't use it.
1090 When using the \fBMIT-SCREEN-SAVER\fP extension in conjunction with
1091 the \fBfade\fP option, you'll notice an unattractive flicker just before
1092 the fade begins. This is because the server maps a black window just before
1093 it tells the \fIxscreensaver\fP process to activate. The \fIxscreensaver\fP
1094 process immediately unmaps that window, but this results in a flicker. I
1095 haven't figured a way to get around this; it seems to be a fundamental
1096 property of the (mis-) design of this server extension.
1098 It sure would be nice if someone would implement the \fBSGI SCREEN_SAVER\fP
1099 extension in XFree86; it's dead simple, and works far better than the
1100 overengineered and broken \fBMIT-SCREEN-SAVER\fP extension.
1103 If \fIprocInterrupts\fP is on (which is the default on Linux systems) and
1104 you're using some program that toggles the state of your keyboard LEDs,
1105 xscreensaver won't work right: turning those LEDs on or off causes a
1106 keyboard interrupt, which xscreensaver will interpret as user activity.
1107 So if you're using such a program, set the \fIprocInterrupts\fP resource
1111 If you are not making use of one of the server extensions (\fBXIDLE\fP,
1112 \fBSGI SCREEN_SAVER\fP, or \fBMIT-SCREEN-SAVER\fP), then it is possible, in
1113 rare situations, for \fIxscreensaver\fP to interfere with event propagation
1114 and make another X program malfunction. For this to occur, that other
1115 application would need to \fInot\fP select \fBKeyPress\fP events on its
1116 non-leaf windows within the first 30 seconds of their existence, but then
1117 select for them later. In this case, that client \fImight\fP fail to receive
1118 those events. This isn't very likely, since programs generally select a
1119 constant set of events immediately after creating their windows and then
1120 don't change them, but this is the reason that it's a good idea to install
1121 and use one of the server extensions instead, to work around this shortcoming
1124 In all these years, I've not heard of even a single case of this happening,
1125 but it is theoretically possible, so I'm mentioning it for completeness...
1130 to get the default host and display number, and to inform the sub-programs
1131 of the screen on which to draw.
1134 to find the sub-programs to run.
1137 for the directory in which to read the \fI.xscreensaver\fP file.
1140 to get the name of a resource file that overrides the global resources
1141 stored in the RESOURCE_MANAGER property.
1143 The latest version of xscreensaver, an online version of this manual,
1144 and a FAQ can always be found at http://www.jwz.org/xscreensaver/
1149 .BR xscreensaver\-demo (1),
1150 .BR xscreensaver\-command (1),
1151 .BR xscreensaver\-gl\-helper (1),
1152 .BR xscreensaver\-getimage (1),
1183 .BR decayscreen (1),
1190 .BR electricsheep (1),
1200 .BR flipscreen3d (1),
1209 .BR glforestfire (1),
1225 .BR interference (1),
1229 .BR kaleidescope (1),
1257 .BR polyominoes (1),
1273 .BR sierpinski3d (1),
1274 .BR slidescreen (1),
1279 .BR sphereEversion (1),
1280 .BR spheremonics (1),
1291 .BR superquadrics (1),
1298 .BR vermiculate (1),
1303 .BR whirlwindwarp (1),
1317 .BR xspirograph (1),
1321 Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1322 2000, 2001, 2002, 2003, 2004 by Jamie Zawinski. Permission to use, copy,
1323 modify, distribute, and sell this software and its documentation for
1324 any purpose is hereby granted without fee, provided that the above
1325 copyright notice appear in all copies and that both that copyright
1326 notice and this permission notice appear in supporting documentation.
1327 No representations are made about the suitability of this software for
1328 any purpose. It is provided "as is" without express or implied
1331 Jamie Zawinski <jwz@jwz.org>. Written in late 1991; version 1.0 posted
1332 to comp.sources.x on 17-Aug-1992.
1334 Please let me know if you find any bugs or make any improvements.
1335 .SH ACKNOWLEDGEMENTS
1336 Thanks to Angela Goodman for the XScreenSaver logo.
1338 Thanks to the many people who have contributed graphics demos to the package.
1340 Thanks to David Wojtowicz for implementing \fIlockTimeout\fP.
1342 Thanks to Martin Kraemer for adding support for shadow passwords and
1343 locking-disabled diagnostics.
1345 Thanks to Patrick Moreau for the VMS port.
1347 Thanks to Nat Lanza for the Kerberos support.
1349 Thanks to Bill Nottingham for the initial PAM support.
1351 And thanks to Jon A. Christopher for implementing the Athena dialog
1352 support, back in the days before Lesstif or Gtk were viable alternatives