Since whenever my laptop screen resumes sleeping (i.e. wakes up from screensaving) some settings are reset, such as keyboard backlight, I'd like to run some scripts each time this happens. I'm using gnome 3 with fedora 17 by the way.
When researching this issue I came across pm-utils which allows one to hook anything to events handled by pm-utils but it seems to me monitor sleeping (i.e. screensaving) is not one of them. Looks like pm-utils only handles suspend and hybernate.
For the keyboard backlight I tried to chmod 444 the file /sys/devices/platform/samsung/leds/samsung::kbd_backlight/brightness so that it can not be written to (I have a samsung laptop) but that didn't help either. After the screen wakes up from being blank the new settings appear in it again.
Is there a way to hook up custom programs to screensaver?