1xscreensaver(1)               XScreenSaver manual              xscreensaver(1)
2
3
4

NAME

6       xscreensaver - extensible screen saver framework, plus locking
7

SYNOPSIS

9       xscreensaver   [-display   host:display.screen]   [-verbose]  [-no-cap‐
10       ture-stderr] [-no-splash]
11

DESCRIPTION

13       The xscreensaver program waits until the keyboard and mouse  have  been
14       idle  for a period, and then runs a graphics demo chosen at random.  It
15       turns off as soon as there is any mouse or keyboard activity.
16
17       This program can lock your terminal in order  to  prevent  others  from
18       using  it,  though  its  default mode of operation is merely to display
19       pretty pictures on your screen when it is not in use.
20
21       It also provides configuration and control of your monitor's power-sav‐
22       ing features.
23

GETTING STARTED

25       For the impatient, try this:
26       xscreensaver &
27       xscreensaver-demo
28       The  xscreensaver-demo(1)  program  pops  up a dialog box that lets you
29       configure the screen saver, and experiment  with  the  various  display
30       modes.
31
32       Note:  unlike  xlock(1),  xscreensaver  has  a client-server model: the
33       xscreensaver program is a daemon that runs in  the  background;  it  is
34       controlled by the foreground xscreensaver-demo(1) and xscreensaver-com‐
35       mand(1) programs.
36

CONFIGURATION

38       The easiest way to configure xscreensaver is to simply run the xscreen‐
39       saver-demo(1)  program,  and  change the settings through the GUI.  The
40       rest of this manual page describes lower level ways  of  changing  set‐
41       tings.
42
43       I'll repeat that because it's important:
44
45           The  easy way to configure xscreensaver is to run the xscreensaver-
46           demo(1) program.  You shouldn't need  to  know  any  of  the  stuff
47           described  in  this  manual  unless  you are trying to do something
48           tricky, like customize xscreensaver for site-wide use or something.
49
50       Options to xscreensaver are stored in one of two places: in a .xscreen‐
51       saver  file  in your home directory; or in the X resource database.  If
52       the .xscreensaver  file  exists,  it  overrides  any  settings  in  the
53       resource database.
54
55       The  syntax  of  the .xscreensaver file is similar to that of the .Xde‐
56       faults file; for example, to set the timeout paramter in the  .xscreen‐
57       saver file, you would write the following:
58       timeout: 5
59       whereas, in the .Xdefaults file, you would write
60       xscreensaver.timeout: 5
61       If you change a setting in the .xscreensaver file while xscreensaver is
62       already running, it will notice this, and reload the file.   (The  file
63       will  be  reloaded  the  next  time the screen saver needs to take some
64       action, such as blanking or unblanking the screen,  or  picking  a  new
65       graphics mode.)
66
67       If  you  change  a  setting in your X resource database, or if you want
68       xscreensaver to notice your changes immediately  instead  of  the  next
69       time  it  wakes  up, then you will need to reload your .Xdefaults file,
70       and then tell the running xscreensaver process to restart itself,  like
71       so:
72       xrdb < ~/.Xdefaults
73       xscreensaver-command -restart
74       If  you  want  to set the system-wide defaults, then make your edits to
75       the xscreensaver app-defaults file, which should  have  been  installed
76       when  xscreensaver  itself  was  installed.  The app-defaults file will
77       usually be named /usr/lib/X11/app-defaults/XScreenSaver, but  different
78       systems  might  keep  it  in a different place (for example, /usr/open‐
79       win/lib/app-defaults/XScreenSaver on Solaris.)
80
81       When settings are changed in the Preferences dialog box (see above) the
82       current settings will be written to the .xscreensaver file.  (The .Xde‐
83       faults file and the app-defaults file will never be written by xscreen‐
84       saver itself.)
85
86       timeout (class Time)
87               The screensaver will activate (blank the screen) after the key‐
88               board and mouse have been idle for this many minutes.   Default
89               10 minutes.
90
91       cycle (class Time)
92               After  the  screensaver has been running for this many minutes,
93               the currently running graphics-hack sub-process will be  killed
94               (with  SIGTERM), and a new one started.  If this is 0, then the
95               graphics hack will never be changed: only  one  demo  will  run
96               until the screensaver is deactivated by user activity.  Default
97               10 minutes.
98
99       lock (class Boolean)
100               Enable locking: before the screensaver will turn off,  it  will
101               require you to type the password of the logged-in user (really,
102               the person who ran xscreensaver), or the root password.  (Note:
103               this  doesn't  work  if  the  screensaver is launched by xdm(1)
104               because it can't know the user-id of the logged-in  user.   See
105               the ``Using XDM(1)'' section, below.
106
107       lockTimeout (class Time)
108               If  locking is enabled, this controls the length of the ``grace
109               period'' between when the screensaver activates, and  when  the
110               screen becomes locked.  For example, if this is 5, and -timeout
111               is 10, then after 10 minutes, the screen would blank.  If there
112               was  user activity at 12 minutes, no password would be required
113               to un-blank the screen.  But, if there was user activity at  15
114               minutes  or later (that is, -lock-timeout minutes after activa‐
115               tion) then a password would be required.   The  default  is  0,
116               meaning  that  if  locking  is enabled, then a password will be
117               required as soon as the screen blanks.
118
119       passwdTimeout (class Time)
120               If the screen is locked, then this  is  how  many  seconds  the
121               password  dialog box should be left on the screen before giving
122               up (default 30 seconds.)  This should not be too large:  the  X
123               server is grabbed for the duration that the password dialog box
124               is up (for security purposes) and leaving  the  server  grabbed
125               for too long can cause problems.
126
127       dpmsEnabled (class Boolean)
128               Whether power management is enabled.
129
130       dpmsStandby (class Time)
131               If power management is enabled, how long until the monitor goes
132               solid black.
133
134       dpmsSuspend (class Time)
135               If power management is enabled, how long until the monitor goes
136               into power-saving mode.
137
138       dpmsOff (class Time)
139               If power management is enabled, how long until the monitor pow‐
140               ers down completely.  Note that these  settings  will  have  no
141               effect  unless  both the X server and the display hardware sup‐
142               port power management; not all do.  See  the  Power  Management
143               section, below, for more information.
144
145       visualID (class VisualID)
146               Specify which X visual to use by default.  (Note carefully that
147               this resource is called visualID, not merely visual; if you set
148               the visual resource instead, things will malfunction in obscure
149               ways for obscure reasons.)
150
151               Legal values for the VisualID resource are:
152
153               default Use the screen's default visual (the visual of the root
154                       window.)  This is the default.
155
156               best    Use  the  visual which supports the most colors.  Note,
157                       however, that the visual with the most colors might  be
158                       a  TrueColor  visual,  which  does not support colormap
159                       animation.  Some programs have more interesting  behav‐
160                       ior when run on PseudoColor visuals than on TrueColor.
161
162               mono    Use a monochrome visual, if there is one.
163
164               gray    Use  a  grayscale or staticgray visual, if there is one
165                       and it has more than one plane (that is, it's not mono‐
166                       chrome.)
167
168               color   Use the best of the color visuals, if there are any.
169
170               GL      Use  the  visual  that  is  best  for  OpenGL programs.
171                       (OpenGL programs have somewhat  different  requirements
172                       than other X programs.)
173
174               class   where  class  is  one of StaticGray, StaticColor, True‐
175                       Color, GrayScale, PseudoColor, or DirectColor.  Selects
176                       the deepest visual of the given class.
177
178               number  where  number (decimal or hex) is interpreted as a vis‐
179                       ual id number, as reported by the xdpyinfo(1)  program;
180                       in  this  way  you  can have finer control over exactly
181                       which visual gets used, for example, to select a  shal‐
182                       lower one than would otherwise have been chosen.
183
184               Note  that  this  option specifies only the default visual that
185               will be used: the visual used may be overridden on  a  program-
186               by-program   basis.    See  the  description  of  the  programs
187               resource, below.
188
189       installColormap (class Boolean)
190               On PseudoColor (8-bit) displays,  install  a  private  colormap
191               while the screensaver is active, so that the graphics hacks can
192               get as many colors as possible.  This is  the  default.   (This
193               only  applies  when  the screen's default visual is being used,
194               since non-default visuals get  their  own  colormaps  automati‐
195               cally.)   This  can also be overridden on a per-hack basis: see
196               the discussion of the default-n name in the section  about  the
197               programs resource.
198
199               This  does  nothing  if you have a TrueColor (16-bit or deeper)
200               display.
201
202       verbose (class Boolean)
203               Whether to print diagnostics.  Default false.
204
205       timestamp (class Boolean)
206               Whether to print the time of day along with any other  diagnos‐
207               tic messages.  Default true.
208
209       splash (class Boolean)
210               Whether to display a splash screen at startup.  Default true.
211
212       splashDuration (class Time)
213               How  long  the  splash  screen should remain visible; default 5
214               seconds.
215
216       quad (class Boolean)
217               If true, then four screensavers will be run  on  each  monitor.
218               Use at your own risk!
219
220       helpURL (class URL)
221               The  splash screen has a Help button on it.  When you press it,
222               it will display  the  web  page  indicated  here  in  your  web
223               browser.
224
225       loadURL (class LoadURL)
226               This  is  the  shell  command  used to load a URL into your web
227               browser.  The default setting will load  it  into  Mozilla/Net‐
228               scape  if  it  is already running, otherwise, will launch a new
229               browser looking at the helpURL.
230
231       demoCommand (class DemoCommand)
232               This is the shell command run  when  the  Demo  button  on  the
233               splash window is pressed.  It defaults to xscreensaver-demo(1).
234
235       prefsCommand (class PrefsCommand)
236               This  is  the  shell  command  run when the Prefs button on the
237               splash  window   is   pressed.    It   defaults   to   xscreen‐
238               saver-demo -prefs.
239
240       nice (class Nice)
241               The  sub-processes created by xscreensaver will be ``niced'' to
242               this level, so that they are given lower  priority  than  other
243               processes  on  the system, and don't increase the load unneces‐
244               sarily.  The default is 10.
245
246               (Higher numbers mean lower priority; see nice(1) for details.)
247
248       fade (class Boolean)
249               If this is true, then when the screensaver activates, the  cur‐
250               rent  contents of the screen will fade to black instead of sim‐
251               ply winking out.  This only works on certain systems.   A  fade
252               will also be done when switching graphics hacks (when the cycle
253               timer expires.)  Default: true.
254
255       unfade (class Boolean)
256               If this is true, then when  the  screensaver  deactivates,  the
257               original contents of the screen will fade in from black instead
258               of appearing immediately.  This only works on certain  systems,
259               and if fade is true as well.  Default false.
260
261       fadeSeconds (class Time)
262               If  fade  is true, this is how long the fade will be in seconds
263               (default 3 seconds.)
264
265       fadeTicks (class Integer)
266               If fade is true, this is how many times a second  the  colormap
267               will  be  changed  to  effect  a  fade.   Higher  numbers yield
268               smoother fades, but may make the fades  take  longer  than  the
269               specified  fadeSeconds if your server isn't fast enough to keep
270               up.  Default 20.
271
272       captureStderr (class Boolean)
273               Whether xscreensaver should  redirect  its  stdout  and  stderr
274               streams to the window itself.  Since its nature is to take over
275               the screen, you would not normally see error messages generated
276               by xscreensaver or the sub-programs it runs; this resource will
277               cause the output of all relevant programs to be  drawn  on  the
278               screensaver window itself, as well as being written to the con‐
279               trolling terminal of the screensaver driver  process.   Default
280               true.
281
282       ignoreUninstalledPrograms (class Boolean)
283               There may be programs in the list that are not installed on the
284               system, yet are marked as "enabled."   If  this  preference  is
285               true,  then  such  programs  will simply be ignored.  If false,
286               then a warning will be printed if an attempt is made to run the
287               nonexistent  program.   Also,  the xscreensaver-demo(1) program
288               will suppress the non-existent programs from the list  if  this
289               is true.  Default: false.
290
291       GetViewPortIsFullOfLies (class Boolean)
292               Set  this  to true if the xscreensaver window doesn't cover the
293               whole screen.  This works around  a  longstanding  XFree86  bug
294               #421.  See the xscreensaver FAQ for details.
295
296       font (class Font)
297               The  font  used for the stdout/stderr text, if captureStderr is
298               true.  Default *-medium-r-*-140-*-m-* (a 14  point  fixed-width
299               font.)
300
301       mode (class Mode)
302               Controls the behavior of xscreensaver.  Legal values are:
303
304               random  When  blanking the screen, select a random display mode
305                       from among those that are enabled and applicable.  This
306                       is the default.
307
308               random-same
309                       Like  random,  but  if there are multiple screens, each
310                       screen will run the same random display  mode,  instead
311                       of each screen running a different one.
312
313               one     When  blanking the screen, only ever use one particular
314                       display mode (the one indicated by  the  selected  set‐
315                       ting.)
316
317               blank   When  blanking the screen, just go black: don't run any
318                       graphics hacks.
319
320               off     Don't ever blank the screen, and don't ever  allow  the
321                       monitor to power down.
322
323
324       selected (class Integer)
325               When  mode  is  set  to  one, this is the one, indicated by its
326               index in the programs list.  You're crazy if you count them and
327               set  this  number  by  hand: let xscreensaver-demo(1) do it for
328               you!
329
330       programs (class Programs)
331               The graphics hacks which xscreensaver runs  when  the  user  is
332               idle.   The  value of this resource is a multi-line string, one
333               sh-syntax command per line.  Each line must contain exactly one
334               command: no semicolons, no ampersands.
335
336               When  the  screensaver  starts  up,  one  of  these is selected
337               (according to the mode setting),  and  run.   After  the  cycle
338               period expires, it is killed, and another is selected and run.
339
340               If  a  line begins with a dash (-) then that particular program
341               is disabled: it won't be selected at  random  (though  you  can
342               still  select it explicitly using the xscreensaver-demo(1) pro‐
343               gram.)
344
345               If all programs are disabled, then the screen will just be made
346               blank, as when mode is set to blank.
347
348               To  disable a program, you must mark it as disabled with a dash
349               instead of removing it from the list.  This is because the sys‐
350               tem-wide  (app-defaults)  and per-user (.xscreensaver) settings
351               are merged together, and if a user just deletes an  entry  from
352               their programs list, but that entry still exists in the system-
353               wide list, then it will come back.  However, if the  user  dis‐
354               ables it, then their setting takes precedence.
355
356               If  the  display has multiple screens, then a different program
357               will be run for each screen.   (All  screens  are  blanked  and
358               unblanked simultaneously.)
359
360               Note  that  you must escape the newlines; here is an example of
361               how you might set this in your ~/.xscreensaver file:
362
363               programs:  \
364                      qix -root                          \n\
365                      ico -r -faces -sleep 1 -obj ico    \n\
366                      xdaliclock -builtin2 -root         \n\
367                      xv -root -rmode 5 image.gif -quit  \n
368               Make sure your $PATH environment variable is set  up  correctly
369               before  xscreensaver  is  launched, or it won't be able to find
370               the programs listed in the programs resource.
371
372               To use a program as a screensaver,  two  things  are  required:
373               that  that  program  draw  on the root window (or be able to be
374               configured to draw on the root window); and that  that  program
375               understand  ``virtual root'' windows, as used by virtual window
376               managers such as tvtwm(1).  (Generally, this is accomplished by
377               just  including  the  "vroot.h"  header  file  in the program's
378               source.)
379
380               If there are some programs that you want to run only when using
381               a  color  display,  and  others  that you want to run only when
382               using a monochrome display, you can specify that like this:
383                      mono:   mono-program  -root        \n\
384                      color:  color-program -root        \n\
385               More generally, you can specify the kind of visual that  should
386               be  used  for  the window on which the program will be drawing.
387               For example, if one program works best if it  has  a  colormap,
388               but  another  works best if it has a 24-bit visual, both can be
389               accommodated:
390                      PseudoColor: cmap-program  -root   \n\
391                      TrueColor:   24bit-program -root   \n\
392               In addition to the symbolic visual names  described  above  (in
393               the  discussion of the visualID resource) one other visual name
394               is supported in the programs list:
395
396                default-n
397                    This is like default, but also requests  the  use  of  the
398                    default  colormap,  instead  of a private colormap.  (That
399                    is, it behaves as if the -no-install  command-line  option
400                    was  specified,  but only for this particular hack.)  This
401                    is provided because some third-party programs that draw on
402                    the  root  window  (notably:  xv(1),  and  xearth(1)) make
403                    assumptions about the visual and colormap of the root win‐
404                    dow: assumptions which xscreensaver can violate.
405
406               If you specify a particular visual for a program, and that vis‐
407               ual does not exist on the screen, then that program will not be
408               chosen  to  run.   This  means  that  on displays with multiple
409               screens of different depths, you can  arrange  for  appropriate
410               hacks  to  be run on each.  For example, if one screen is color
411               and the other is monochrome, hacks that look good in  mono  can
412               be run on one, and hacks that only look good in color will show
413               up on the other.
414
415       You shouldn't ever need to change the following resources:
416
417       pointerPollTime (class Time)
418               When server extensions are not in use, this controls  how  fre‐
419               quently  xscreensaver  checks  to  see if the mouse position or
420               buttons have changed.  Default 5 seconds.
421
422       pointerHysteresis (class Integer)
423               If the mouse moves less than  this-many  pixels  in  a  second,
424               ignore  it (do not consider that to be "activity.")  This is so
425               that the screen  doesn't  un-blank  (or  fail  to  blank)  just
426               because you bumped the desk.  Default: 10 pixels.
427
428       windowCreationTimeout (class Time)
429               When  server extensions are not in use, this controls the delay
430               between when windows are created and when xscreensaver  selects
431               events on them.  Default 30 seconds.
432
433       initialDelay (class Time)
434               When  server  extensions are not in use, xscreensaver will wait
435               this many seconds before selecting events on existing  windows,
436               under  the  assumption that xscreensaver is started during your
437               login procedure, and the window state may be in flux.   Default
438               0.   (This used to default to 30, but that was back in the days
439               when slow machines and X terminals were more common...)
440
441       There are a number of different X  server  extensions  which  can  make
442       xscreensaver's  job  easier.   The  next  few resources specify whether
443       these extensions should be utilized if they are available.
444
445       sgiSaverExtension (class Boolean)
446               This resource controls  whether  the  SGI  SCREEN_SAVER  server
447               extension  will  be  used  to  decide whether the user is idle.
448               This is the default if xscreensaver has been compiled with sup‐
449               port for this extension (which is the default on SGI systems.).
450               If it is available, the SCREEN_SAVER method is faster and  more
451               reliable  than  what  will  be done otherwise, so use it if you
452               can.  (This extension is only  available  on  Silicon  Graphics
453               systems, unfortunately.)
454
455       mitSaverExtension (class Boolean)
456               This  resource  controls  whether  the  MIT-SCREEN-SAVER server
457               extension will be used to decide  whether  the  user  is  idle.
458               However,  the  default for this resource is false, because even
459               if this extension is available, it is flaky (and it also  makes
460               the  fade  option not work properly.)  Use of this extension is
461               strongly discouraged.  Support for it will probably be  removed
462               eventually.
463
464       xidleExtension (class Boolean)
465               This  resource controls whether the XIDLE server extension will
466               be used to decide whether  the  user  is  idle.   This  is  the
467               default if xscreensaver has been compiled with support for this
468               extension.  (This extension is only  available  for  X11R4  and
469               X11R5 systems, unfortunately.)
470
471       procInterrupts (class Boolean)
472               This resource controls whether the /proc/interrupts file should
473               be consulted to decide whether the user is idle.  This  is  the
474               default  if  xscreensaver  has  been compiled on a system which
475               supports this mechanism (i.e., Linux systems.)
476
477               The benefit to doing this is that xscreensaver  can  note  that
478               the  user  is  active even when the X console is not the active
479               one: if the user is typing in another virtual console, xscreen‐
480               saver will notice that and will fail to activate.  For example,
481               if you're playing Quake in VGA-mode, xscreensaver won't wake up
482               in the middle of your game and start competing for CPU.
483
484               The  drawback  to doing this is that perhaps you really do want
485               idleness on the X console to cause the X display to lock,  even
486               if  there  is  activity on other virtual consoles.  If you want
487               that, then set this option to False.  (Or just lock the X  con‐
488               sole manually.)
489
490               The  default  value for this resource is True, on systems where
491               it works.
492
493       overlayStderr (class Boolean)
494               If captureStderr is True, and your server supports  ``overlay''
495               visuals,  then  the text will be written into one of the higher
496               layers instead of into the same layer as  the  running  screen‐
497               hack.   Set this to False to disable that (though you shouldn't
498               need to.)
499
500       overlayTextForeground (class Foreground)
501               The foreground color used for the stdout/stderr text,  if  cap‐
502               tureStderr is true.  Default: Yellow.
503
504       overlayTextBackground (class Background)
505               The  background  color used for the stdout/stderr text, if cap‐
506               tureStderr is true.  Default: Black.
507
508       bourneShell (class BourneShell)
509               The pathname of the shell that xscreensaver uses to start  sub‐
510               processes.  This must be whatever your local variant of /bin/sh
511               is: in particular, it must not be csh.
512

COMMAND-LINE OPTIONS

514       xscreensaver also accepts a few command-line options,  mostly  for  use
515       when  debugging:  for normal operation, you should configure things via
516       the ~/.xscreensaver file.
517
518       -display host:display.screen
519               The X display to use.   For  displays  with  multiple  screens,
520               XScreenSaver  will  manage all screens on the display simultan‐
521               iously.
522
523       -verbose
524               Same as setting the verbose resource to true: print diagnostics
525               on stderr and on the xscreensaver window.
526
527       -no-capture-stderr
528               Same as setting the captureStderr resource to false: do not re‐
529               direct the stdout and stderr streams to the xscreensaver window
530               itself.  If xscreensaver is crashing, you might need to do this
531               in order to see the error message.
532

HOW IT WORKS

534       When it is time to activate the screensaver, a full-screen black window
535       is  created  on  each screen of the display.  Each window is created in
536       such a way that, to any subsequently-created programs, it  will  appear
537       to  be  a  ``virtual root'' window.  Because of this, any program which
538       draws on the root window (and which understands virtual roots)  can  be
539       used as a screensaver.
540
541       When  the  user  becomes  active  again,  the  screensaver  windows are
542       unmapped, and the running  subprocesses  are  killed  by  sending  them
543       SIGTERM.  This is also how the subprocesses are killed when the screen‐
544       saver decides that it's time to run a different demo: the  old  one  is
545       killed and a new one is launched.
546
547       Before launching a subprocess, xscreensaver stores an appropriate value
548       for $DISPLAY in the environment that the child will receive.  (This  is
549       so  that  if  you start xscreensaver with a -display argument, the pro‐
550       grams which xscreensaver launches will draw on the same display; and so
551       that  the  child  will  end  up  drawing on the appropriate screen of a
552       multi-headed display.)
553
554       When the screensaver turns off, or is killed, care is taken to  restore
555       the  ``real'' virtual root window if there is one.  Because of this, it
556       is important that you not kill the screensaver process with kill -9  if
557       you are running a virtual-root window manager.  If you kill it with -9,
558       you may need to restart your window manager to repair the damage.  This
559       isn't an issue if you aren't running a virtual-root window manager.
560
561       For  all  the  gory  details, see the commentary at the top of xscreen‐
562       saver.c.
563
564       You can control a running screensaver process  by  using  the  xscreen‐
565       saver-command(1) program (which see.)
566

POWER MANAGEMENT

568       Modern  X  servers  contain  support to power down the monitor after an
569       idle period.  If the monitor has powered down, then  xscreensaver  will
570       notice  this  (after  a few minutes), and will not waste CPU by drawing
571       graphics demos on a black screen.  An attempt  will  also  be  made  to
572       explicitly  power  the  monitor  back  up  as  soon as user activity is
573       detected.
574
575       As of version 3.28 (Feb 2001), the ~/.xscreensaver  file  controls  the
576       configuration  of your display's power management settings: if you have
577       used xset(1) to change your power management  settings,  then  xscreen‐
578       saver  will  override  those  changes  with  the  values  specified  in
579       ~/.xscreensaver  (or  with  its  built-in  defaults,  if  there  is  no
580       ~/.xscreensaver file yet.)
581
582       To  change your power management settings, run xscreensaver-demo(1) and
583       change the various timeouts through the user  interface.   Alternately,
584       you can edit the ~/.xscreensaver file directly.
585
586       If  the  power  management  section  is  grayed  out  in  the  xscreen‐
587       saver-demo(1) window,  then that means that your X server does not sup‐
588       port the XDPMS extension, and so control over the monitor's power state
589       is not available.
590
591       If you're using a laptop, don't be surprised if changing the DPMS  set‐
592       tings  has  no  effect: many laptops have monitor power-saving behavior
593       built in at a very low level that is invisible to Unix and X.  On  such
594       systems,  you  can  typically  adjust  the  power-saving delays only by
595       changing settings in the BIOS in some hardware-specific way.
596
597       If DPMS seems not to be working with  XFree86,  make  sure  the  "DPMS"
598       option  is set in your /etc/X11/XF86Config file.  See the XF86Config(5)
599       manual for details.
600

USING XDM(1)

602       You can run xscreensaver from your xdm(1) session, so that the  screen‐
603       saver will run even when nobody is logged in on the console.
604
605       The  trick to using xscreensaver with xdm is this: keep in mind the two
606       very different states in which xscreensaver will be running:
607
608           1: Nobody logged in.
609
610              If you're thinking of running xscreensaver from XDM at all, then
611              it's  probably  because you want graphics demos to be running on
612              the console when nobody is  logged  in  there.   In  this  case,
613              xscreensaver  will function only as a screen saver, not a screen
614              locker: it doesn't make  sense  for  xscreensaver  to  lock  the
615              screen,  since  nobody  is logged in yet!  The only thing on the
616              screen is the XDM login prompt.
617
618           2: Somebody logged in.
619
620              Once someone has logged in through the  XDM  login  window,  the
621              situation is very different.  For example: now it makes sense to
622              lock the screen (and prompt for the logged in user's  password);
623              and  now xscreensaver should consult that user's ~/.xscreensaver
624              file; and so on.
625
626       The difference between these two states comes down to  a  question  of,
627       which  user  is  the  xscreensaver  process  running as?  For the first
628       state, it doesn't matter.  If you start xscreensaver in the  usual  XDM
629       way,  then  xscreensaver will probably end up running as root, which is
630       fine for the first case (the ``nobody logged in'' case.)
631
632       However, once someone is logged in, running as root is no longer  fine:
633       because  xscreensaver  will  be  consulting  root's  .xscreensaver file
634       instead of that of the logged in user, and won't be prompting  for  the
635       logged in user's password, and so on.  (This is not a security problem,
636       it's just not what you want.)
637
638       So, once someone has logged in, you want xscreensaver to be running  as
639       that  user.  The way to accomplish this is to kill the old xscreensaver
640       process and start a new one (as the new user.)
641
642       The simplest way to accomplish all of this is as follows:
643
644           1: Launch xscreensaver before anyone logs in.
645
646              To the file /usr/lib/X11/xdm/Xsetup, add the lines
647              xhost +localhost
648              xscreensaver-command -exit
649              xscreensaver &
650              This will run xscreensaver as root, over the XDM  login  window.
651              Moving  the  mouse  will cause the screen to un-blank, and allow
652              the user to type their password at XDM to log in.
653
654           2: Restart xscreensaver when someone logs in.
655
656              Near the top of the file  /usr/lib/X11/xdm/Xsession,  add  those
657              same lines:
658              xscreensaver-command -exit
659              xscreensaver &
660              When  someone  logs  in,  this will kill off the existing (root)
661              xscreensaver process, and start a new one, running as  the  user
662              who  has  just  logged  in.   If  the  user's .xscreensaver file
663              requests locking, they'll get it.  They will also get their  own
664              choice of timeouts, and graphics demos, and so on.
665
666              Alternately,  each user could just put those lines in their per‐
667              sonal ~/.xsession files.
668
669       Make sure you have $PATH set up correctly in the  Xsetup  and  Xsession
670       scripts, or xdm won't be able to find xscreensaver, and/or xscreensaver
671       won't be able to find its graphics demos.
672
673       (If your system does not seem to be executing the Xsetup file, you  may
674       need  to  configure  it  to do so: the traditional way to do this is to
675       make that file the value of the DisplayManager*setup  resource  in  the
676       /usr/lib/X11/xdm/xdm-config file.  See the man page for xdm(1) for more
677       details.)
678
679       It is safe to run xscreensaver as root (as xdm is likely  to  do.)   If
680       run  as  root, xscreensaver changes its effective user and group ids to
681       something safe (like "nobody") before connecting to  the  X  server  or
682       launching user-specified programs.
683
684       An  unfortunate  side effect of this (important) security precaution is
685       that it may conflict with cookie-based authentication.
686
687       If you get "connection refused" errors when running  xscreensaver  from
688       xdm,  then  this  probably  means  that you have xauth(1) or some other
689       security  mechanism  turned  on.   One  way  around  this  is  to   add
690       "xhost +localhost" to Xsetup, just before xscreensaver is launched.
691
692       Note  that  this  will give access to the X server to anyone capable of
693       logging in to the local machine, so in some  environments,  this  might
694       not be appropriate.  If turning off file-system-based access control is
695       not acceptable, then running xscreensaver from the  Xsetup  file  might
696       not be possible, and xscreensaver will only work when running as a nor‐
697       mal, unprivileged user.
698
699       For more information on the X server's access control  mechanisms,  see
700       the man pages for X(1), Xsecurity(1), xauth(1), and xhost(1).
701

USING GDM(1)

703       Using xscreensaver with gdm(1) is easy, because gdm has a configuration
704       tool.  Just fire up gdmconfig(1)  and  on  the  Background  page,  type
705       "xscreensaver  -nosplash" into the Background Program field.  That will
706       cause gdm to run xscreensaver while nobody is logged in, and kill it as
707       soon  as  someone  does log in.  (The user will then be responsible for
708       starting xscreensaver on their own, if they want.)
709
710       Another  way  to  accomplish  the  same  thing  is  to  edit  the  file
711       /etc/X11/gdm/gdm.conf to include:
712       BackgroundProgram=xscreensaver -nosplash
713       RunBackgroundProgramAlways=true
714       In this situation, the xscreensaver process will probably be running as
715       user gdm instead of root.  You can  configure  the  settings  for  this
716       nobody-logged-in   state   (timeouts,   DPMS,   etc.)  by  editing  the
717       ~gdm/.xscreensaver file.
718
719       To get gdm to run the BackgroundProgram, you may need to switch it from
720       the "Graphical Greeter" to the "Standard Greeter".
721

USING KDE (K DESKTOP ENVIRONMENT)

723       I  understand  that  KDE has invented their own wrapper around xscreen‐
724       saver, that is inferior to xscreensaver-demo(1) in any number of  ways.
725       I've never actually seen it, but I'm told that this is the way you dis‐
726       able it:
727
728           1: Switch off KDE's screen saver.
729              Open the ``Control Center'' and select the ``Appearance & Themes
730              ->  Screensaver''  page.   Turn  off the ``Start Automatically''
731              checkbox.
732
733           2: Find your Autostart directory.
734              Open the ``System Administration -> Paths'' page, and  see  what
735              your   ``Autostart  path''  is  set  to:  it  will  probably  be
736              ~/.kde/Autostart/ or something similar.
737
738           3: Make xscreensaver be an Autostart program.
739              Create a  .desktop  file  in  your  autostart  directory  called
740              xscreensaver.desktop that contains the following five lines:
741              [Desktop Entry]
742              Exec=xscreensaver
743              Name=XScreensaver
744              Type=Application
745              X-KDE-StartupNotify=false
746
747           4: Make the various "lock session" buttons call xscreensaver.
748              Replace    the    file   /usr/bin/kdesktop_lock   (or   possibly
749              /usr/kde/3.5/bin/kdesktop_lock) with these two lines:
750              #!/bin/sh
751              xscreensaver-command -lock
752              Make sure the file is executable (chmod a+x).
753
754       Now use xscreensaver normally, controlling it via  the  usual  xscreen‐
755       saver-demo(1) and xscreensaver-command(1) mechanisms.
756

USING CDE (COMMON DESKTOP ENVIRONMENT)

758       The  easiest  way to use xscreensaver on a system with CDE is to simply
759       switch off the built-in CDE screensaver, and use xscreensaver  instead;
760       and second, to tell the front panel to run xscreensaver-command(1) with
761       the -lock option when the Lock icon is clicked.
762
763       To accomplish this involves five steps:
764
765           1: Switch off CDE's locker
766              Do this by turning off ``Screen Saver and Screen Lock''  in  the
767              Screen section of the Style Manager.
768
769           2: Edit sessionetc
770              Edit the file ~/.dt/sessions/sessionetc and add to it the line
771              xscreensaver &
772              And  make  sure  the  sessionetc  file is executable.  This will
773              cause xscreensaver to be launched when you log in.  (As  always,
774              make  sure  that xscreensaver and the graphics demos are on your
775              $PATH; the path needs to be set in .cshrc and/or .dtprofile, not
776              .login.)
777
778           3: Create XScreenSaver.dt
779              Create  a  file called ~/.dt/types/XScreenSaver.dt with the fol‐
780              lowing contents:
781              ACTION XScreenSaver
782              {
783                LABEL         XScreenSaver
784                TYPE          COMMAND
785                EXEC_STRING   xscreensaver-command -lock
786                ICON          Dtkey
787                WINDOW_TYPE   NO_STDIO
788              }
789              This defines a ``lock'' command for the CDE  front  panel,  that
790              knows how to talk to xscreensaver.
791
792           4: Create Lock.fp
793              Create a file called ~/.dt/types/Lock.fp with the following con‐
794              tents:
795              CONTROL Lock
796              {
797                TYPE             icon
798                CONTAINER_NAME   Switch
799                CONTAINER_TYPE   SWITCH
800                POSITION_HINTS   1
801                ICON             Fplock
802                LABEL            Lock
803                PUSH_ACTION      XScreenSaver
804                HELP_TOPIC       FPOnItemLock
805                HELP_VOLUME      FPanel
806              }
807              This associates the CDE front panel ``Lock'' icon with the  lock
808              command we just defined in step 3.
809
810           5: Restart
811              Select ``Restart Workspace Manager'' from the popup menu to make
812              your changes take effect.  If things seem  not  to  be  working,
813              check the file ~/.dt/errorlog for error messages.
814

USING HP VUE (VISUAL USER ENVIRONMENT)

816       Since  CDE  is a descendant of VUE, the instructions for using xscreen‐
817       saver under VUE are similar to the above:
818
819           1: Switch off VUE's locker
820              Open the ``Style Manager''  and  select  ``Screen.''   Turn  off
821              ``Screen Saver and Screen Lock'' option.
822
823           2: Make sure you have a Session
824              Next,  go  to  the  Style Manager's, ``Startup'' page.  Click on
825              ``Set Home Session'' to create a session, then  on  ``Return  to
826              Home Session'' to select this session each time you log in.
827
828           3: Edit vue.session
829              Edit the file ~/.vue/sessions/home/vue.session and add to it the
830              line
831              vuesmcmd -screen 0 -cmd "xscreensaver"
832              This will cause xscreensaver to be launched  when  you  log  in.
833              (As  always,  make sure that xscreensaver and the graphics demos
834              are on your $PATH; the path needs to be  set  in  .cshrc  and/or
835              .profile, not .login.)
836
837           3: Edit vuewmrc
838              Edit  the  file ~/.vue/vuewmrc and add (or change) the Lock con‐
839              trol:
840              CONTROL Lock
841              {
842                TYPE         button
843                IMAGE        lock
844                PUSH_ACTION  f.exec "xscreensaver-command -lock"
845                HELP_TOPIC   FPLock
846              }
847              This associates the VUE  front  panel  ``Lock''  icon  with  the
848              xscreensaver lock command.
849

BUGS

851       Bugs?   There  are  no bugs.  Ok, well, maybe.  If you find one, please
852       let me know.  http://www.jwz.org/xscreensaver/bugs.html explains how to
853       construct the most useful bug reports.
854
855       Locking and XDM
856               If xscreensaver has been launched from xdm(1) before anyone has
857               logged in, you will need to kill and then restart the  xscreen‐
858               saver  daemon after you have logged in, or you will be confused
859               by the results.  (For example, locking  won't  work,  and  your
860               ~/.xscreensaver file will be ignored.)
861
862               When  you are logged in, you want the xscreensaver daemon to be
863               running under your user id, not as root or some other user.
864
865               If it has already been started by xdm, you can kill it by send‐
866               ing  it  the  exit command, and then re-launching it as you, by
867               putting something like the following in your personal X startup
868               script:
869               xscreensaver-command -exit
870               xscreensaver &
871               The ``Using XDM(1)'' section, above, goes into more detail, and
872               explains how to configure the system to do this for  all  users
873               automatically.
874
875       Locking and root logins
876               In  order  for it to be safe for xscreensaver to be launched by
877               xdm, certain precautions had  to  be  taken,  among  them  that
878               xscreensaver  never  runs  as  root.   In  particular, if it is
879               launched as root (as xdm is likely to  do),  xscreensaver  will
880               disavow  its  privileges,  and  switch itself to a safe user id
881               (such as nobody.)
882
883               An implication of this is that if you log in  as  root  on  the
884               console,  xscreensaver  will refuse to lock the screen (because
885               it can't tell the difference between root being  logged  in  on
886               the  console,  and a normal user being logged in on the console
887               but xscreensaver having been  launched  by  the  xdm(1)  Xsetup
888               file.)
889
890               The  solution to this is simple: you shouldn't be logging in on
891               the console as root in the first place!  (What, are  you  crazy
892               or something?)
893
894               Proper  Unix  hygiene  dictates that you should log in as your‐
895               self, and su(1) to root as necessary.  People who  spend  their
896               day logged in as root are just begging for disaster.
897
898       XAUTH and XDM
899               For xscreensaver to work when launched by xdm(1), programs run‐
900               ning on the local machine as user "nobody" must be able to con‐
901               nect  to  the  X  server.   This  means that if you want to run
902               xscreensaver on the console while nobody is logged in, you  may
903               need  to  disable  cookie-based  access  control (and allow all
904               users who can log in to the local machine  to  connect  to  the
905               display.)
906
907               You  should  be  sure that this is an acceptable thing to do in
908               your environment before doing it.   See  the  ``Using  XDM(1)''
909               section, above, for more details.
910
911       Passwords
912               If  you  get  an  error  message at startup like ``couldn't get
913               password of user'' then this probably means that  you're  on  a
914               system  in  which  the  getpwent(3) library routine can only be
915               effectively used by root.  If this is the case,  then  xscreen‐
916               saver  must be installed as setuid to root in order for locking
917               to work.  Care has been taken to make this a safe thing to do.
918
919               It also may mean that your system uses shadow passwords instead
920               of  the  standard  getpwent(3) interface; in that case, you may
921               need to change some options with configure and recompile.
922
923               If  you  change  your  password  after  xscreensaver  has  been
924               launched,  it  will  continue using your old password to unlock
925               the screen until xscreensaver is restarted.  On  some  systems,
926               it  may  accept both your old and new passwords.  So, after you
927               change your password, you'll have to do
928               xscreensaver-command -restart
929               to make xscreensaver notice.
930
931       PAM Passwords
932               If your system uses  PAM  (Pluggable  Authentication  Modules),
933               then in order for xscreensaver to use PAM properly, PAM must be
934               told about xscreensaver.  The xscreensaver installation process
935               should  update  the  PAM  data  (on Linux, by creating the file
936               /etc/pam.d/xscreensaver for you, and on Solaris, by telling you
937               what lines to add to the /etc/pam.conf file.)
938
939               If  the PAM configuration files do not know about xscreensaver,
940               then you might be in a situation where xscreensaver will refuse
941               to ever unlock the screen.
942
943               This  is  a design flaw in PAM (there is no way for a client to
944               tell the difference between PAM responding ``I have never heard
945               of  your  module,'' and responding, ``you typed the wrong pass‐
946               word.'')  As far as I can tell, there is no  way  for  xscreen‐
947               saver  to automatically work around this, or detect the problem
948               in advance, so if you have PAM, make sure it is configured cor‐
949               rectly!
950
951       Colormap lossage: TWM
952               The  installColormap  option  doesn't  work  very well with the
953               twm(1) window manager and its descendants, on 8-bit screens.
954
955               There is a race condition between the screensaver and this win‐
956               dow manager, which can result in the screensaver's colormap not
957               getting installed properly, meaning  the  graphics  hacks  will
958               appear in essentially random colors.  (If the screen goes white
959               instead of black, this is probably why.)
960
961               The mwm(1) and olwm(1) window managers don't have this problem.
962               The  race  condition  exists because X (really, ICCCM) does not
963               provide a way for an OverrideRedirect window to  have  its  own
964               colormap, short of grabbing the server (which is neither a good
965               idea, nor really possible with the current design.)  What  hap‐
966               pens  is  that,  as soon as xscreensaver installs its colormap,
967               twm responds to  the  resultant  ColormapNotify  event  by  re-
968               installing  the  default  colormap.   Apparently,  twm  doesn't
969               always do this; it seems to do it regularly if the  screensaver
970               is  activated  from  a menu item, but seems to not do it if the
971               screensaver comes on of its own volition, or is activated  from
972               another console.
973
974               Attention, window manager authors!
975                   You  should  only  call  XInstallColormap(3) in response to
976                   user events.  That is, it is appropriate to install a  col‐
977                   ormap  in  response  to FocusIn, FocusOut, EnterNotify, and
978                   LeaveNotify events; but it is not appropriate to call it in
979                   response  to  ColormapNotify  events.   If you install col‐
980                   ormaps in response to application actions  as  well  as  in
981                   response  to  user  actions,  then you create the situation
982                   where it is impossible for  override-redirect  applications
983                   (such  as  xscreensaver)  to  display  their windows in the
984                   proper colors.
985
986       Colormap lossage: XV, XAnim, XEarth
987               Some programs don't operate properly on visuals other than  the
988               default one, or with colormaps other than the default one.  See
989               the discussion of the magic  "default-n"  visual  name  in  the
990               description  of the programs resource in the Configuration sec‐
991               tion.  When programs only work with the default  colormap,  you
992               need to use a syntax like this:
993                  default-n: xv -root image-1.gif -quit  \n\
994                  default-n: xearth -nostars -wait 0     \n\
995               It would also work to turn off the installColormap option alto‐
996               gether, but that would deny extra colors to those programs that
997               can take advantage of them.
998
999       Machine Load
1000               Although  this  program  ``nices''  the  subprocesses  that  it
1001               starts, graphics-intensive subprograms can still  overload  the
1002               machine  by  causing  the X server process itself (which is not
1003               ``niced'') to consume many cycles.  Care has been taken in  all
1004               the  modules  shipped  with xscreensaver to sleep periodically,
1005               and not run full tilt, so as not to cause appreciable load.
1006
1007               However, if you are running the OpenGL-based screen savers on a
1008               machine  that  does not have a video card with 3D acceleration,
1009               they will make your machine slow, despite nice(1).
1010
1011               Your options are: don't use the OpenGL display modes; or,  col‐
1012               lect  the spare change hidden under the cushions of your couch,
1013               and use it to buy a video card manufactured  after  1998.   (It
1014               doesn't  even  need to be fast 3D hardware: the problem will be
1015               fixed if there is any 3D hardware at all.)
1016
1017       XFree86's Magic Keystrokes
1018               The XFree86 X server  traps  certain  magic  keystrokes  before
1019               client  programs  ever  see  them.   Two  that  are of note are
1020               Ctrl+Alt+Backspace, which causes the  X  server  to  exit;  and
1021               Ctrl+Alt+Fn,  which  switches  virtual  consoles.  The X server
1022               will respond to these keystrokes even if xscreensaver  has  the
1023               screen  locked.   Depending  on  your setup, you might consider
1024               this a problem.
1025
1026               Unfortunately, there is no way for xscreensaver itself to over‐
1027               ride  the interpretation of these keys.  If you want to disable
1028               Ctrl+Alt+Backspace globally, you need to set the  DontZap  flag
1029               in  your  /etc/X11/XF86Config  file.   To  globally  disable VT
1030               switching, you can set the DontVTSwitch flag.  See the XF86Con‐
1031               fig(5) manual for details.
1032
1033       MIT Extension and Fading
1034               The MIT-SCREEN-SAVER extension is junk.  Don't use it.
1035
1036               When  using  the MIT-SCREEN-SAVER extension in conjunction with
1037               the fade option, you'll notice  an  unattractive  flicker  just
1038               before  the  fade  begins.   This  is because the server maps a
1039               black window just before it tells the xscreensaver  process  to
1040               activate.   The  xscreensaver  process  immediately unmaps that
1041               window, but this results in a flicker.  I haven't figured a way
1042               to  get  around  this; it seems to be a fundamental property of
1043               the (mis-) design of this server extension.
1044
1045               It sure would be  nice  if  someone  would  implement  the  SGI
1046               SCREEN_SAVER  extension in XFree86; it's dead simple, and works
1047               far better than the over-engineered and broken MIT-SCREEN-SAVER
1048               extension.
1049
1050       Keyboard LEDs
1051               If procInterrupts is on (which is the default on Linux systems)
1052               and you're using some program that toggles the  state  of  your
1053               keyboard  LEDs,  xscreensaver  won't  work right: turning those
1054               LEDs on or off causes a keyboard interrupt, which  xscreensaver
1055               will  interpret  as  user  activity.  So if you're using such a
1056               program, set the procInterrupts resource to False.
1057
1058       Extensions
1059               If you are not making use  of  one  of  the  server  extensions
1060               (XIDLE, SGI SCREEN_SAVER, or MIT-SCREEN-SAVER), then it is pos‐
1061               sible, in rare situations, for xscreensaver to  interfere  with
1062               event  propagation and make another X program malfunction.  For
1063               this to occur, that other application would need to not  select
1064               KeyPress  events  on  its  non-leaf windows within the first 30
1065               seconds of their existence, but then select for them later.  In
1066               this  case,  that  client  might  fail to receive those events.
1067               This isn't very likely, since programs generally select a  con‐
1068               stant  set  of  events immediately after creating their windows
1069               and then don't change them, but this is the reason that it's  a
1070               good  idea  to  install  and  use  one of the server extensions
1071               instead, to work around this shortcoming in the X protocol.
1072
1073               In all these years, I've not heard of even  a  single  case  of
1074               this  happening,  but it is theoretically possible, so I'm men‐
1075               tioning it for completeness...
1076

ENVIRONMENT

1078       DISPLAY to get the default host and display number, and to  inform  the
1079               sub-programs of the screen on which to draw.
1080
1081       PATH    to find the sub-programs to run.
1082
1083       HOME    for the directory in which to read the .xscreensaver file.
1084
1085       XENVIRONMENT
1086               to  get  the  name of a resource file that overrides the global
1087               resources stored in the RESOURCE_MANAGER property.
1088

UPGRADES

1090       The latest version of xscreensaver, an online version of  this  manual,
1091       and a FAQ can always be found at http://www.jwz.org/xscreensaver/
1092

SEE ALSO

1094       X(1),   Xsecurity(1),  xauth(1),  xdm(1),  gdm(1),  xhost(1),  xscreen‐
1095       saver-demo(1),   xscreensaver-command(1),    xscreensaver-gl-helper(1),
1096       xscreensaver-getimage(1), xscreensaver-text(1).
1097
1099       Copyright © 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
1100       2001, 2002, 2003, 2004, 2005 by Jamie  Zawinski.   Permission  to  use,
1101       copy,  modify, distribute, and sell this software and its documentation
1102       for any purpose is hereby granted without fee, provided that the  above
1103       copyright  notice  appear  in  all  copies and that both that copyright
1104       notice and this permission notice appear in  supporting  documentation.
1105       No  representations are made about the suitability of this software for
1106       any purpose.  It is provided "as is" without express  or  implied  war‐
1107       ranty.
1108

AUTHOR

1110       Jamie Zawinski <jwz@jwz.org>.  Written in late 1991; version 1.0 posted
1111       to comp.sources.x on 17-Aug-1992.
1112
1113       Please let me know if you find any bugs or make any improvements.
1114

ACKNOWLEDGEMENTS

1116       Thanks to Angela Goodman for the XScreenSaver logo.
1117
1118       Thanks to the many people who have contributed graphics  demos  to  the
1119       package.
1120
1121       Thanks to David Wojtowicz for implementing lockTimeout.
1122
1123       Thanks  to  Martin  Kraemer for adding support for shadow passwords and
1124       locking-disabled diagnostics.
1125
1126       Thanks to Patrick Moreau for the VMS port.
1127
1128       Thanks to Nat Lanza for the Kerberos support.
1129
1130       Thanks to Bill Nottingham for the initial PAM support.
1131
1132       And thanks to Jon A. Christopher for  implementing  the  Athena  dialog
1133       support,  back  in  the days before Lesstif or Gtk were viable alterna‐
1134       tives to Motif.
1135
1136
1137
1138X Version 11                 5.05-3 (06-Apr-2008)              xscreensaver(1)
Impressum