You are not logged in.
I thought i should share this shell script i wrote to disable the screen saver when looking at longer flash videos:
#!/bin/sh
while true; do
PIDS=`pgrep -f libflashplayer`
for pid in $PIDS ;
do
cpu=`top -p $pid -n1 -b | grep -w $pid | awk '{print $9}'`
if [ -n $cpu -a $cpu -gt 5 ] ; then
xset s reset
fi
done
sleep 60;
done
It will reset the screen saver counter if a process containing libflashplayer on its command line uses more than 5% CPU (works with firefox at least).
I have the script started by xfce (Application Autostart).
Feedback is welcome.
Offline
How can you detect long running flash processes?
I notice that, even after all flash-using websites are closed, flash is still running, a child process of firefox. I don't know if chrome suffers from this, with it's independent process model, but it does seem weird.
Offline
Zenix, if flash still used over 5% of my CPU while idling, something isn't right
Last edited by serprex (2010-08-26 21:18:41)
Offline