2010.10.3更新
#!/bin/sh while true; do if test -n "`file /tmp/Flash*|grep \"Macromedia Flash Video\\|MPEG v4\"`";then gnome-screensaver-command -p fi sleep 30 done
————————————-
非原创,改进版本,原文在这里
#!/bin/sh while true; do if test -n "`file /tmp/Flash*|grep \"Macromedia Flash Video\"`";then gnome-screensaver-command -p fi sleep 30 done
原理是flash加载资源时会在/tmp目录产生缓存,这里每隔30秒检查一下是否有视频缓存,如果有,就用gnome-screensaver-command命令模拟活动一下,屏保就不会激活了~
———–
post by gmail~