Use the dbus interface instead of calling gnome-screensaver-command. https://bugzilla.gnome.org/show_bug.cgi?id=643357