The freedesktop screensaver D-Bus API method GetActive seems to return boolean to indicate whether the screensaver is active ("saving" the screen), not whether the screensaver program is enabled. Therefore, the attached patch changes the interpretation of the response to GetActive such that a successful response (either true or false) indicates the screensaver program is enabled (even if not active) and a successful response that does not specify true or false indicates that the screensaver program is disabled. --- xdg-screensaver | 8 4 + 4 - 0 ! 1 file changed, 4 insertions(+), 4 deletions(-) --- xdg-screensaver-cvs-1.48 2010-08-28 21:38:48.000000000 -0400 +++ xdg-screensaver 2010-08-28 21:39:14.000000000 -0400 @@ -618,13 +618,13 @@ org.freedesktop.ScreenSaver.GetActive \ | grep boolean | cut -d ' ' -f 5` result=$? - if [ x"$status" = "xtrue" ]; then + if [ x"$status" = "xtrue" -o x"$status" = "xfalse" ]; then echo "enabled" - elif [ x"$status" = "xfalse" ]; then - echo "disabled" - else + elif [ x"$result" != "x0" ]; then echo "ERROR: dbus org.freedesktop.ScreenSaver.GetActive returned '$status'" >&2 return 1 + else + echo "disabled" fi ;;