You are not logged in.

#1 2009-11-21 00:30:50

shak
Member
Registered: 2009-03-16
Posts: 405

mplayer doesn't stop gnome screensaver

Hi !

I'm using the option stop-xscreensave="yes" in mplayer config but after about 5 minutes of playing the movie the screen fades away and i have to login in order to get to mplayer again

How can i stop this from happening ?

Thanks a lot !

Offline

#2 2009-11-21 00:34:02

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: mplayer doesn't stop gnome screensaver

a nice tip is here http://smplayer.berlios.de/forums/viewtopic.php?id=329

heartbeat−cmd="gnome−screensaver−command −p"

Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2009-11-21 01:09:44

shak
Member
Registered: 2009-03-16
Posts: 405

Re: mplayer doesn't stop gnome screensaver

Thanks for your reply but by adding the code to my config i get the message to put parameters for mplayer .

Last edited by shak (2009-11-21 03:45:31)

Offline

#4 2009-11-21 03:06:32

shak
Member
Registered: 2009-03-16
Posts: 405

Re: mplayer doesn't stop gnome screensaver

Is there any other way to stop the screensaver or should i just disable the power management and screensaver ?

Last edited by shak (2009-11-21 03:46:11)

Offline

#5 2009-11-21 18:42:18

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: mplayer doesn't stop gnome screensaver

wonder wrote:

a nice tip is here http://smplayer.berlios.de/forums/viewtopic.php?id=329

heartbeat−cmd="gnome−screensaver−command −p"

This will also disable the screensaver when playing music which may be a bad thing if you are working and have some music playing and then leave for some reason and expect the screen to lock after some time.

What I use is a script that I run myself when I want to stop the screensaver, I use xscreensaver but for the gnome screensaver the procedure is the same, just different command and options.

#!/bin/bash
watch -n 300 /usr/bin/xscreensaver-command -deactivate

300 is the number of seconds it will wait before sending the command again, here you need to give the full path or it will only work the first time.
Maybe you could also use the following (maybe it will work better)

#!/bin/bash
while true
do
    clear
    date
    xscreensaver-command -deactivate
    sleep 300
done

Just adapt this to gnome screensaver or anything else you use.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2009-11-21 19:08:22

llcawthorne
Member
From: Columbia, SC
Registered: 2009-10-16
Posts: 142

Re: mplayer doesn't stop gnome screensaver

Here's my tv watching script.. 

#!/bin/sh                                                                     
# inhibit the screensaver and output to the tv (display 0.2)
 
# gnome-screensaver-command -i -r "Watching Videos" &
xscreensaver-command -exit
DISPLAY=:0.2 mplayer -fs "$@"
# killall gnome-screensaver-command
xscreensaver -no-splash &

You'ld probably want something more like

#!/bin/sh                                                                     
# inhibit the screensaver and output to the tv
gnome-screensaver-command -i -r "Watching Videos" &
mplayer -fs "$@"
killall gnome-screensaver-command

Not sure if it is the most efficient way, but I believe it worked.

You would just copy that to a file named tv.sh (or tv or watch or foo), make the file executable (chmod 755 tv.sh), put it in your path somewhere (/usr/local/bin if that's in your path), and then type tv.sh filename  to start watching  (but I imagine you already knew all that).

If you use a graphical player.  I dunno.  The player might have an option?  Or else just run the `gnome-screensaver-command -i -r "Watching Videos"` part in a term and kill it when your done.  Or run it from an Alt-F2 dialog with & and kill it when your done might work.  Something to tinker with..


To understand recursion, you must understand recursion.

Offline

#7 2009-11-21 21:22:23

shak
Member
Registered: 2009-03-16
Posts: 405

Re: mplayer doesn't stop gnome screensaver

Thanks for your suggestions ! I will try them and see how it goes . THanks again

Offline

Board footer

Powered by FluxBB