Here is how it should be done - the right way *smile*

#!/bin/bash
# Toggle the gnome-screensaver on/off - Keld Norman, Aug 2012
ICON=/where/your/warning/icon/is/placed.png
SUSPENDED="`/usr/bin/pgrep -f 'xdg-screensaver suspend'|wc -l`"
if [ ${SUSPENDED:-0} -eq 0 ]; then
/usr/bin/xdg-screensaver suspend `/usr/bin/xwininfo -root -children|grep Gnome-screensaver|awk '{print $1}'`
/usr/bin/notify-send "Screen Saver" "Disabled"
/usr/bin/zenity --notification --window-icon=${ICON} --text="Your ScreenSaver is disabled" &
else
/usr/bin/xdg-screensaver resume `/usr/bin/xwininfo -root -children|grep Gnome-screensaver|awk '{print $1}'`
/usr/bin/pkill -f "Your ScreenSaver is disable[d]" # Kill the zenity taskbar info icon
/usr/bin/notify-send "Screen Saver" "Enabled" # Show a notice that the screensaver now is active
fi