Home Man
Today's Posts

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:
Select Section of Man Page:
Select Man Page Repository:

RedHat 9 (Linux i386) - man page for xscreensaver-command (redhat section 1)

XScreenSaver(1) 								  XScreenSaver(1)

       xscreensaver-command - control a running xscreensaver process

       xscreensaver-command  [-display	host:display.screen] [-help] [-demo] [-prefs] [-activate]
       [-deactivate] [-cycle] [-next] [-prev] [-select n] [-exit] [-restart] [-lock]  [-throttle]
       [-unthrottle] [-version] [-time] [-watch]

       The  xscreensaver-command  program  controls  a running xscreensaver process by sending it

       xscreensaver(1) has a client-server model: the xscreensaver process is a daemon that  runs
       in the background; it is controlled by other foreground programs such as xscreensaver-com-
       mand and xscreensaver-demo(1).

       This  program,  xscreensaver-command,  is  a  command-line-oriented  tool;  the	 xscreen-
       saver-demo(1).  program is a graphical tool.

       xscreensaver-command accepts the following command-line options:

       -help   Prints a brief summary of command-line options.

       -demo   This  just  launches the xscreensaver-demo(1) program, in which one can experiment
	       with the various graphics hacks available, and edit parameters.

       -demo number
	       When the -demo option is followed by an integer,  it  instructs	the  xscreensaver
	       daemon  to  run that hack, and wait for the user to click the mouse before deacti-
	       vating (i.e., mouse motion does not deactivate.)  This is the mechanism	by  which
	       xscreensaver-demo(1)  communicates  with  the  xscreensaver(1) daemon.  (The first
	       hack in the list is numbered 1, not 0.)

       -prefs  Like the no-argument form of -demo, but brings up that program's Preferences panel
	       by default.

	       Tell  xscreensaver  to  turn  on immediately (that is, blank the screen, as if the
	       user had been idle for long enough.)  The screensaver will deactivate as  soon  as
	       there is any user activity, as usual.

	       It is useful to run this from a menu; you may wish to run it as
	       sleep 5 ; xscreensaver-command -activate
	       to  be  sure that you have time to take your hand off the mouse before the screen-
	       saver comes on.	(Because if you jiggle the mouse, xscreensaver will  notice,  and

	       This  tells  xscreensaver to pretend that there has just been user activity.  This
	       means that if the screensaver is active (the screen is blanked), then this command
	       will cause the screen to un-blank as if there had been keyboard or mouse activity.
	       If the screen is locked, then the password dialog will pop up first, as usual.  If
	       the  screen  is	not  blanked, then this simulated user activity will re-start the
	       countdown (so, issuing the -deactivate command periodically is one way to  prevent
	       the screen from blanking.)

       -cycle  If the screensaver is active (the screen is blanked), then stop the current graph-
	       ics demo and run a new one (chosen randomly.)

       -next   This is like either -activate or -cycle, depending on which is  more  appropriate,
	       except  that  the  graphics  hack  that	will  be run is the next one in the list,
	       instead of a randomly-chosen one.  In other words, repeatedly executing -next will
	       cause the xscreensaver process to invoke each graphics demo sequentially.  (Though
	       using the -demo option is probably an easier way to accomplish that.)

       -prev   This is like -next, but cycles in the other direction.

       -select number
	       Like -activate, but runs the Nth element in the list of hacks.  By knowing what is
	       in  the programs list, and in what order, you can use this to activate the screen-
	       saver with a particular graphics demo.  (The first element in the list is numbered
	       1, not 0.)

       -exit   Causes  the  xscreensaver process to exit gracefully.  This is roughly the same as
	       killing the process with kill(1), but it is easier, since you don't need to  first
	       figure out the pid.

	       Warning:  never use kill -9 with xscreensaver while the screensaver is active.  If
	       you are using a virtual root window manager, that can leave things in an inconsis-
	       tent state, and you may need to restart your window manager to repair the damage.

       -lock   Tells  the  running  xscreensaver process to lock the screen immediately.  This is
	       like -activate, but forces locking as well, even if locking  is	not  the  default
	       (that is, even if xscreensaver's lock resource is false, and even if the lockTime-
	       out resource is non-zero.)

	       Note that locking doesn't work unless the xscreensaver process is running as  you.
	       See xscreensaver(1) for details.

	       Temporarily  switch  to	``blank screen'' mode, and don't run any display modes at
	       all, until the screensaver is next de-activated.  This is useful if you're using a
	       machine remotely, and you find that some display modes are using too much CPU.

	       (If  you  want  to do this permanently, that is, you want the screen saver to only
	       blank the screen and not run demos at all, then set the programs  resource  to  an
	       empty list:  See xscreensaver(1) for details.)

	       Turn `-throttle' mode off and resume normal behavior.

	       Prints  the version of xscreensaver that is currently running on the display: that
	       is, the actual version number of  the  running  xscreensaver  background  process,
	       rather  than the version number of xscreensaver-command.  (To see the version num-
	       ber of xscreensaver-command itself, use the -help option.)

       -time   Prints the time at which the screensaver last activated or  deactivated	(roughly,
	       how  long  the  user has been idle or non-idle: but not quite, since it only tells
	       you when the screen became blanked or un-blanked.)

	       Causes the screensaver process to exit and then restart with the same command line
	       arguments  as  last  time.  Do this after you've changed the resource database, to
	       cause xscreensaver to notice the changes.

	       Warning: if you have a .xscreensaver file, this might  not  do  what  you  expect.
	       You're  probably  better  off  killing  the  existing  xscreensaver (with xscreen-
	       saver-command -exit) and then launching it again.

	       The important point is, you need to make sure that  the	xscreensaver  process  is
	       running as you.	If it's not, it won't be reading the right .xscreensaver file.

       -watch  Prints  a  line	each  time the screensaver changes state: when the screen blanks,
	       locks, unblanks, or when the running hack is changed.  This option never  returns;
	       it  is  intended for use by shell scripts that want to react to the screensaver in
	       some way.  An example of its output would be:
	       BLANK Fri Nov  5 01:57:22 1999
	       RUN 34
	       RUN 79
	       RUN 16
	       LOCK Fri Nov  5 01:57:22 1999
	       RUN 76
	       RUN 12
	       UNBLANK Fri Nov	5 02:05:59 1999
	       The above shows the screensaver activating, running three  different  hacks,  then
	       locking	(perhaps  because the lock-timeout went off) then unblanking (because the
	       user became active, and typed the correct password.)  The hack numbers  are  their
	       index in the `programs' list (starting with 1, not 0, as for the -select command.)

	       For  example, suppose you want to run a program that turns down the volume on your
	       machine when the screen blanks, and turns it back up when  the  screen  un-blanks.
	       You  could do that by running a Perl program like the following in the background.
	       The following program tracks the output of the -watch command and  reacts  accord-

	       my $blanked = 0;
	       open (IN, "xscreensaver-command -watch |");
	       while (<IN>) {
		   if (m/^(BLANK|LOCK)/) {
		       if (!$blanked) {
			   system "sound-off";
			   $blanked = 1;
		   } elsif (m/^UNBLANK/) {
		       system "sound-on";
		       $blanked = 0;
	       Note  that LOCK might come either with or without a preceeding BLANK (depending on
	       whether the lock-timeout is non-zero), so the above program keeps track of both of

       If  an  error  occurs  while  communicating with the xscreensaver daemon, or if the daemon
       reports an error, a diagnostic message will be printed to stderr, and xscreensaver-command
       will  exit  with a non-zero value.  If the command is accepted, an indication of this will
       be printed to stdout, and the exit value will be zero.

       DISPLAY to get the host and display number of the screen whose saver is to be manipulated.

       PATH    to find the executable to restart (for the  -restart  command).	 Note  that  this
	       variable  is  consulted	in  the  environment of the xscreensaver process, not the
	       xscreensaver-command process.

       The  latest  version  of  xscreensaver(1)  and  related	tools  can  always  be	found  at

       X(1), xscreensaver(1) xscreensaver-demo(1)

       Copyright  (C)  1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002 by Jamie Zawinski.  Permis-
       sion to use, copy, modify, distribute, and sell this software and  its  documentation  for
       any purpose is hereby granted without fee, provided that the above copyright notice appear
       in all copies and that both that copyright notice and this  permission  notice  appear  in
       supporting documentation.  No representations are made about the suitability of this soft-
       ware for any purpose.  It is provided "as is" without express or implied warranty.

       Jamie Zawinski <jwz@jwz.org>, 13-aug-92.

       Please let me know if you find any bugs or make any improvements.

X Version 11				03-Feb-2003 (4.07)			  XScreenSaver(1)

All times are GMT -4. The time now is 12:49 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password

Not a Forum Member?
Forgot Password?