GNOME Bugzilla – Bug 629740
gnome-screensaver-command CLI changed in a backwards-incompatible way
Last modified: 2010-10-19 17:57:16 UTC
With the addition of a DBus service file to autostart gnome-screensaver on demand (bug #616225) the gnome-screensaver-command cli semantics has changed in a backwards-incompatible potentially breaking scripts relying on the old behavior derived from xscreensaver-command. Before 2.30 gnome-screensaver-command commands used to returned an error message and exit code 1 when gnome screensaver was not currently running whereas now gnome-screensaver is started by the command. This breaks e.g. shell scripts using "gnome-screensaver-command --lock || xscreensaver-command -lock || xlock -mode blank" as now gnome-screensaver will be started even though the user might be running xscreensaver. Even in new shell scripts it now seems diffcult to determine whether gnome-screensaver is running as a dbus-querying tool might not necessarily be installed even when dbus and gnome-screensaver are. Since this is a backwards-incompatible change of the command line interface without notification in a minor release of GNOME I am asking for the previous behavior of gnome-screensaver-command to be restored, note that this does not necessitate reversing DBus auto-starting of gnome-screensaver.
Shouldn't be too hard to bail with exit 1 if NameHasOwner("org.gnome.Screensaver") fails.
(In reply to comment #1) > Shouldn't be too hard to bail with exit 1 if > NameHasOwner("org.gnome.Screensaver") fails. No, it shouldn't, in fact it did exactly that until somebody decided to remove this check. So would you please revert commit 7bd27979d3e364efcbd6392edea9d233c1f19cad?
commit a37f531e5ba968bea445e82dbc418d8b7ced219c Author: Ray Strode <rstrode@redhat.com> Date: Tue Oct 19 13:55:19 2010 -0400 gnome-screensaver-command: don't activate screensaver for --query Now that gnome-screensaver is auto activated, we need to take care not to activate it for --query (since --query is supposed to query if gnome-screensaver is running, not start it). https://bugzilla.gnome.org/show_bug.cgi?id=629740