LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How do I stop the screen from blanking when I watch 1 hour Youtube movies? (http://www.linuxquestions.org/questions/slackware-14/how-do-i-stop-the-screen-from-blanking-when-i-watch-1-hour-youtube-movies-4175478789/)

dugan 09-27-2013 04:18 PM

How do I stop the screen from blanking when I watch 1 hour Youtube movies?
 
How do I stop the screen from blanking when I watch 1-hour Youtube movies? Moving the mouse every few minutes works, but I shouldn't have to do that.

Firerat 09-27-2013 04:40 PM

kde settings --> power manager --> screen energy saver

smallpond 09-27-2013 04:44 PM

I have the same problem that I don't want to turn off the settings for when the system is really not in use, but it would be nice if it could recognize that a video player is running and disable the screen blanking. I'm thinking of buying one of those bobbing duck toys to hit the space bar periodically.

Firerat 09-27-2013 05:10 PM

problem is
it is the browser that is running the flash player

so what to do?

have the browser keep the display awake?
have flash keep the display awake?

MadMaverick9 09-27-2013 11:58 PM

Copy the youtube url into a media player like SMPlayer.

And then look up the "heartbeat-cmd" option for MPlayer.

And - luckily webbrowsers and adobe flash do not know about disabling the screen saver. Let's keep it that way!

ponce 09-28-2013 01:17 AM

I use
Code:

killall -9 xscreensaver
then I relaunch it after.

I use a shell wrapper (in ~/.bashrc) for mplayer (I took it from the gentoo wiki years ago)
Code:

#requires xset
function mplayerwrap {
        xscreensaver-command -exit
        xset -dpms
        mplayer "$@"
        xset +dpms
        xscreensaver &
}
#make wrapper execute by default
alias mplayer="mplayerwrap"


Firerat 09-28-2013 01:38 AM

SIGKILL seems a little overkill , please pardon the pun.

use SIGTERM ( -15 ), which gives things a chance to close gracefully

screensaver and screen poweroff/suspend are different things


I always forget about YouTube plugins for media players
I think smplayer has a 'browser' for it and lets you login.

speck 09-28-2013 01:58 AM

At times I've used a rather non-elegant solution with xautomation from the SlackBuilds repository. I put the following in a script and run it from an xterm whenever I don't want screen blanking/screen savers to initiate, then just ctrl-c to terminate the script when the video has finished.

Code:

while true
do
    xte 'mousermove 3 3'
    xte 'mousermove -3 -3'
    sleep 590
done


MadMaverick9 09-28-2013 03:04 AM

~/.mplayer/config:
Code:

heartbeat-cmd="/usr/bin/xscreensaver-command -deactivate > /dev/null 2>&1"
This tells xscreensaver to pretend that there has just been user activity.

ponce 09-28-2013 03:12 AM

thanks MadMaverick9, I missed that option in the newest mplayers.
I had a look at the man page and by that I found also -stop-xscreensaver

dugan 09-28-2013 01:44 PM

Thanks all.

I found the power management option in Xfce, and I can see that xset -dpms is the equivalent command-line option.

Lennie 09-28-2013 03:02 PM

I use lightsOn.sh

jtsn 09-28-2013 06:14 PM

Quote:

Originally Posted by MadMaverick9 (Post 5036228)
And - luckily webbrowsers and adobe flash do not know about disabling the screen saver. Let's keep it that way!

On other platforms a running plugin video disables the screen saver or screen lock, while a paused video doesn't do that. And that's exactly what the user expects. So let's fix that bug! Oh wait! the Linux plugin is closed source and in EoL maintenance mode. So the Linux desktop is screwed...

BTW: The same happens to game controllers. Although they're just /dev/input devices, like keyboard and mouse, they're not recognized by xscreensaver. So it blanks the screen while the user is using a controller exclusively without touching keyboard and mouse...

Geist 09-29-2013 08:44 PM

It's also possible to set this up (I think globally/DE/WM independent) in the xorg.conf ServerLayout section.
Here's mine:

Code:

Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option        "Xinerama" "0"
    Option        "BlankTime" "0"
    Option        "StandbyTime" "0"
    Option        "SuspendTime" "0"
    Option        "OffTime" "0"
EndSection

The last four entries are relevant ones, especially BlankTime, and OffTime. The latter turning the monitor off, the former blanking it.

michaelslack 09-29-2013 10:55 PM

What about MPlayer "Stop XScreenSaver" option?
 
Dear slackers,

Please excuse me for probably being a bit thick about this, but why is all this extra stuff necessary when there is a ``Stop XScreenSaver'' checkbox in the ``Misc'' tab of the Preferences one can access through the MPlayer gui? It has not worked for me in the past and I was too lazy to try to fix it (I used AlienBOB's VLC package instead, just for that reason). Is this an MPlayer bug?


Michael


All times are GMT -5. The time now is 02:29 AM.