*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
\n\
The xscreensaver program is a daemon that runs in the background.\n\
You control a running xscreensaver process by sending it messages\n\
\n\
The xscreensaver program is a daemon that runs in the background.\n\
You control a running xscreensaver process by sending it messages\n\
(Note that one must *never* kill xscreensaver with -9!)\n\
\n\
-restart Causes the screensaver process to exit and then restart with\n\
(Note that one must *never* kill xscreensaver with -9!)\n\
\n\
-restart Causes the screensaver process to exit and then restart with\n\
- the same command line arguments as last time. Do this after\n\
- you've changed your X resource settings, to cause\n\
- xscreensaver to notice the changes.\n\
+ the same command line arguments as last time. You shouldn't\n\
+ really need to do this, since xscreensaver notices when the\n\
+ .xscreensaver file has changed and re-reads it as needed.\n\
\n\
-lock Tells the running xscreensaver process to lock the screen\n\
immediately. This is like -activate, but forces locking as\n\
\n\
-lock Tells the running xscreensaver process to lock the screen\n\
immediately. This is like -activate, but forces locking as\n\
-watch Prints a line each time the screensaver changes state: when\n\
the screen blanks, locks, unblanks, or when the running hack\n\
is changed. This option never returns; it is intended for\n\
-watch Prints a line each time the screensaver changes state: when\n\
the screen blanks, locks, unblanks, or when the running hack\n\
is changed. This option never returns; it is intended for\n\
- fprintf (stderr, usage, progname, screensaver_version); exit (1); \
+ fprintf (stderr, usage, progname, screensaver_version, year); exit (1); \
memcpy (screensaver_version, screensaver_id + 17, 4);
screensaver_version [4] = 0;
memcpy (screensaver_version, screensaver_id + 17, 4);
screensaver_version [4] = 0;
if (*cmd == XA_ACTIVATE || *cmd == XA_LOCK ||
*cmd == XA_NEXT || *cmd == XA_PREV || *cmd == XA_SELECT)
/* People never guess that KeyRelease deactivates the screen saver too,
if (*cmd == XA_ACTIVATE || *cmd == XA_LOCK ||
*cmd == XA_NEXT || *cmd == XA_PREV || *cmd == XA_SELECT)
/* People never guess that KeyRelease deactivates the screen saver too,
- so if we're issuing an activation command, wait a second. */
- sleep (1);
+ so if we're issuing an activation command, wait a second.
+ No need to do this if stdin is not a tty, meaning we're not being
+ run from the command line.
+ */
+ if (isatty(0))
+ sleep (1);
i = xscreensaver_command (dpy, *cmd, arg, True, NULL);
if (i < 0) exit (i);
i = xscreensaver_command (dpy, *cmd, arg, True, NULL);
if (i < 0) exit (i);