#!/bin/bash dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" | ( while true do read X if echo $X | grep "boolean true" &> /dev/null then : elif echo $X | grep "boolean false" &> /dev/null then ps -C notify-osd &> /dev/null if [ $? -eq 0 ]; then killall -e notify-osd fi fi done ) &