Hi Stray Wolf, No is the answer to your question. The screensaver will turn off when a fullscreen window is in focus and turn back on when there is not a fullscreen window in focus.
Hi Stray Wolf, No is the answer to your question. The screensaver will turn off when a fullscreen window is in focus and turn back on when there is not a fullscreen window in focus.
I think this might be a problem for the developers to figure out because using kde in lucid i have disabled the screensaver and disabled dimming in the power management performance scheme and still my screen blanks.. is anybody out there able to completely stop the screen from blanking? and if so how?
~
Desktop:ASRock P4i65GV/P4 2.8ghz 2gbram
Laptop:Toshiba L350-PSLD8C Centrino64 dualcore 2ghz 4gbram
Very useful! This will keep my screen from turning off when Im watching videos. Thanks!
A young man once challenged me to hack his computer, i told him to stand by and promptly returned with an axe.
Here is the solution.
This tiny script checks every ... seconds if the screen has changed enough to be a movie or something similar...
Have fun it works great.
Please excuse my bad speaking english, but i'm very tired (6:31 am in germany ...)
Code:#!/bin/bash # # #Installation on Ubuntu (testet with 11.04) # sudo apt-get install imagemagick # chmod 755 <name and location of this script> # sh <name and location of this script> #or insert this line to "System -> Einstellungen -> Startprogramme" (autostart) #time between checks in seconds SLEEPTIME=10 #percentage of screen that have to be changed to poke the screensaver #note that the clock and instant messengers notes could change often, so at least 5% should be used PERCENTAGETOPOKE=25 #take first screenshot import -window root stopscreensaver1.jpg # infinite loop while [ 1 -eq 1 ] do #count of pixels WIDTH=$(identify -format "%w" stopscreensaver1.jpg) HEIGHT=$(identify -format "%h" stopscreensaver1.jpg) let PIXEL=$WIDTH*$HEIGHT #check every ... seconds sleep $SLEEPTIME #take compare-image import -window root stopscreensaver2.jpg #count of different pixels and the percentage DIFFERENCE=$(compare -dissimilarity-threshold 1 -metric AE stopscreensaver1.jpg stopscreensaver2.jpg stopscreensaverdifference.jpg 2>&1) let PERCENTAGE=$DIFFERENCE*100/$PIXEL #check if enough screen-area has changed if [ $PERCENTAGE -ge $PERCENTAGETOPOKE ]; then gnome-screensaver-command --poke echo "Scrennsaver poked at $PERCENTAGE of $PERCENTAGETOPOKE" else echo "Screensaver not poked at $PERCENTAGE of $PERCENTAGETOPOKE" fi #new compare image rm -f stopscreensaver1.jpg mv -f stopscreensaver2.jpg stopscreensaver1.jpg done
Last edited by QIII; August 14th, 2018 at 06:37 PM.
I inserted a parameter to your nice little script so that one can change the application it is looking for. That's useful for me, because I'm using prism instead of firefox for watching TV.
Code:#!/bin/bash # Cleanup any bad state we left behind if the user exited while flash was # running gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type bool true we_turned_it_off=0 while true; do sleep 60 flash_on=0 # CHANGED THIS LINE: for pid in `pgrep $1` ; do if grep libflashplayer /proc/$pid/maps > /dev/null ; then flash_on=1 fi ss_on=`gconftool-2 -g /apps/gnome-screensaver/idle_activation_enabled` if [ "$flash_on" = "1" ] && [ "$ss_on" = "true" ]; then gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled \ --type bool false we_turned_it_off=1 elif [ "$flash_on" = "0" ] && [ "$ss_on" = "false" ] \ && [ "$we_turned_it_off" = "1" ]; then gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled \ --type bool true we_turned_it_off=0 fi done done
This wasn't even an issue in Ubuntu 10.10 and previous. Now it needs caffeine (which is not optimal as it is not an automated solution) or scripts like this. Maybe there should be a bug filed about this?
Bookmarks