http://ftp.x.org/contrib/applications/xscreensaver-2.34.tar.gz
[xscreensaver] / driver / xscreensaver-command.man
1 .de EX          \"Begin example
2 .ne 5
3 .if n .sp 1
4 .if t .sp .5
5 .nf
6 .in +.5i
7 ..
8 .de EE
9 .fi
10 .in -.5i
11 .if n .sp 1
12 .if t .sp .5
13 ..
14 .TH XScreenSaver 1 "08-Oct-98 (2.34)" "X Version 11"
15 .SH NAME
16 xscreensaver-command - control a running xscreensaver process
17 .SH SYNOPSIS
18 .B xscreensaver-command
19 [\-help] \
20 [\-demo] \
21 [\-prefs] \
22 [\-activate] \
23 [\-deactivate] \
24 [\-cycle] \
25 [\-next] \
26 [\-prev] \
27 [\-select \fIn\fP] \
28 [\-exit] \
29 [\-restart] \
30 [\-lock] \
31 [\-version] \
32 [\-time]
33 .SH DESCRIPTION
34 The \fIxscreensaver\-command\fP program controls a running \fIxscreensaver\fP
35 process by sending it client-messages.
36
37 .BR xscreensaver (1)
38 has a client-server model: the xscreensaver process is a
39 daemon that runs in the background; it is controlled by the 
40 foreground \fIxscreensaver-command\fP program.
41 .SH OPTIONS
42 .I xscreensaver-command
43 accepts the following command-line options:
44 .TP 8
45 .B \-help
46 Prints a brief summary of command-line options.
47 .TP 8
48 .B \-demo
49 Cause the screensaver to enter its interactive demo mode, in which one
50 can experiment with the various graphics hacks available.  See
51 .BR xscreensaver (1)
52 for details.
53 .TP 8
54 .B \-prefs
55 Cause the screensaver to enter its interactive demo mode, and bring up
56 the Preferences control panel, in which one can change most of the settings
57 that control the xscreensaver daemon's behavior.  See
58 .BR xscreensaver (1)
59 for details.
60 .TP 8
61 .B \-activate
62 Tell xscreensaver to turn on immediately (that is, blank the screen, as if
63 the user had been idle for long enough.)  The screensaver will deactivate as
64 soon as there is any user activity, as usual.
65
66 It is useful to run this from a menu; you may wish to run it as
67 .EX
68 sleep 5 ; xscreensaver-command -activate
69 .EE
70 to be sure that you have time to remove your hand from the mouse before
71 the screensaver comes on.  (Because if you jiggle the mouse, xscreensaver
72 will notice, and deactivate.)
73 .TP 8
74 .B \-deactivate
75 If the screensaver is active (the screen is blanked), this command will
76 deactivate it just as if there had been keyboard or mouse activity.  
77 If locking is enabled, then the screensaver will prompt for a password
78 as usual.
79 .TP 8
80 .B \-cycle
81 If the screensaver is active (the screen is blanked), then stop the current
82 graphics demo and run a new one (chosen randomly.)
83 .TP 8
84 .B \-next
85 This is like either \fI\-activate\fP or \fI\-cycle\fP, depending on which is
86 more appropriate, except that the graphics hack that will be run is the next
87 one in the list, instead of a randomly-chosen one.  In other words, 
88 repeatedly executing -next will cause the xscreensaver process to invoke each
89 graphics demo sequentially.  (Though using the \fI\-demo\fP option is probably
90 an easier way to accomplish that.)
91 .TP 8
92 .B \-prev
93 This is like \fI\-next\fP, but cycles in the other direction.
94 .TP 8
95 .B \-select \fInumber\fP
96 Like \fI\-activate\fP, but runs the \fIN\fPth element in the list of hacks.
97 By knowing what is in the \fIprograms\fP list, and in what order, you can use
98 this to activate the screensaver with a particular graphics demo.  (The first
99 element in the list is numbered 1, not 0.)
100 .TP 8
101 .B \-exit
102 Causes the xscreensaver process to exit gracefully.  This is roughly the same
103 as killing the process with
104 .BR kill (1),
105 but it is easier, since you don't need to first figure out the pid.  
106
107 .B Warning:
108 never use \fIkill -9\fP with \fIxscreensaver\fP while the screensaver is
109 active.  If you are using a virtual root window manager, that can leave
110 things in an inconsistent state, and you may need to restart your window
111 manager to repair the damage.
112 .TP 8
113 .B \-restart
114 Causes the screensaver process to exit and then restart with the same command
115 line arguments as last time.  Do this after you've changed the resource
116 database, to cause xscreensaver to notice the changes.
117
118 If the screensaver is run from \fIxdm(1)\fP (that is, it is already running
119 before you log in) then you may want to issue the \fI\-restart\fP command from
120 one of your startup scripts, so that the screensaver gets your resource
121 settings instead of the default ones.
122 .TP 8
123 .B \-lock
124 Tells the running xscreensaver process to lock the screen immediately.  
125 This is like \fI\-activate\fP, but forces locking as well, even if locking
126 is not the default (that is, even if xscreensaver's \fIlock\fP resource is
127 false, and even if the \fIlockTimeout\fP resource is non-zero.)
128 .TP 8
129 .B \-version
130 Prints the version of xscreensaver that is currently running on the display:
131 that is, the actual version number of the running xscreensaver background 
132 process, rather than the version number of xscreensaver-command.  (To see
133 the version number of \fIxscreensaver-command\fP itself, use 
134 the \fI\-help\fP option.)
135 .TP 8
136 .B \-time
137 Prints the time at which the screensaver last activated or 
138 deactivated (roughly, how long the user has been idle or non-idle: but 
139 not quite, since it only tells you when the screen became blanked or
140 un-blanked.)
141 .SH DIAGNOSTICS
142 If an error occurs while communicating with the \fIxscreensaver\fP daemon, or
143 if the daemon reports an error, a diagnostic message will be printed to
144 stderr, and \fIxscreensaver-command\fP will exit with a non-zero value.  If
145 the command is accepted, an indication of this will be printed to stdout, and
146 the exit value will be zero.
147 .SH ENVIRONMENT
148 .PP
149 .TP 8
150 .B DISPLAY
151 to get the host and display number of the screen whose saver is
152 to be manipulated.
153 .TP 8
154 .B PATH
155 to find the executable to restart (for the \fI\-restart\fP command).  
156 Note that this variable is consulted in the environment of 
157 the \fIxscreensaver\fP process, not the \fIxscreensaver-command\fP process.
158 .SH UPGRADES
159 The latest version of
160 .BR xscreensaver (1)
161 and \fIxscreensaver\-command\fP can always be found at 
162 http://www.jwz.org/xscreensaver/
163 .SH "SEE ALSO"
164 .BR X (1),
165 .BR xscreensaver (1)
166 .SH COPYRIGHT
167 Copyright \(co 1992, 1993, 1997, 1998
168 by Jamie Zawinski.  Permission to use, copy, modify, distribute, and sell
169 this software and its documentation for any purpose is hereby granted without
170 fee, provided that the above copyright notice appear in all copies and that
171 both that copyright notice and this permission notice appear in supporting
172 documentation.  No representations are made about the suitability of this
173 software for any purpose.  It is provided "as is" without express or implied
174 warranty.
175 .SH AUTHOR
176 Jamie Zawinski <jwz@jwz.org>, 13-aug-92.
177
178 Please let me know if you find any bugs or make any improvements.