After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629740 - gnome-screensaver-command CLI changed in a backwards-incompatible way
gnome-screensaver-command CLI changed in a backwards-incompatible way
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: general
CVS HEAD
Other All
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-15 09:39 UTC by Guido Berhoerster
Modified: 2010-10-19 17:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guido Berhoerster 2010-09-15 09:39:02 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.
Comment 1 Ray Strode [halfline] 2010-09-16 17:08:43 UTC
Shouldn't be too hard to bail with exit 1 if NameHasOwner("org.gnome.Screensaver") fails.
Comment 2 Guido Berhoerster 2010-10-15 17:13:21 UTC
(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?
Comment 3 Ray Strode [halfline] 2010-10-19 17:57:16 UTC
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