xscreensaver-command -V (return code: 1)
xscreensaver-command: can't open display
xscreensaver-command --help (return code: 1)
usage: xscreensaver-command -<option>
This program provides external control of a running xscreensaver process.
Version 5.36, copyright (c) 1991-2016 Jamie Zawinski <jwz@jwz.org>.
The xscreensaver program is a daemon that runs in the background.
You control a running xscreensaver process by sending it messages
with this program, xscreensaver-command. See the man pages for
details. These are the arguments understood by xscreensaver-command:
-demo Ask the xscreensaver process to enter interactive demo mode.
-prefs Ask the xscreensaver process to bring up the preferences
panel.
-activate Turn on the screensaver (blank the screen), as if the user
had been idle for long enough.
-deactivate Turns off the screensaver (un-blank the screen), as if user
activity had been detected.
-cycle If the screensaver is active (the screen is blanked), then
stop the current graphics demo and run a new one (chosen
randomly.)
-next 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 Like -next, but goes in the other direction.
-select <N> 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 screensaver
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 does nothing if the display is currently locked.
(Note that one must *never* kill xscreensaver with -9!)
-restart Causes the screensaver process to exit and then restart with
the same command line arguments as last time. You shouldn't
really need to do this, since xscreensaver notices when the
.xscreensaver file has changed and re-reads it as needed.
-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. If the saver is
already active, this causes it to be locked as well.
-version 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.
-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.)
-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
by shell scripts that want to react to the screensaver in
some way.
See the man page for more details.
For updates, check https://www.jwz.org/xscreensaver/