Preventing screensaver when playing movie?

Kevin DeKorte kdekorte at gmail.com
Tue Feb 26 10:23:57 PST 2008


On Tue, 2008-02-26 at 19:02 +0100, Erik wrote:
> Suppose that we have the following situation. A user has told the system 
> to "turn off the display after N minutes of inactivity". Then he starts 
> the media player, opens a file and presses a button called play. The 
> media player interprets this as the user saying "play this movie, but do 
> not turn off the display while playing it, because i will watch it even 
> though I do not interact with the system".
> 
> So the media player has to do something like this. Each time the 
> application updates the display with a new animation frame, it marks 
> that update with a special flag, indicating that this is the kind of 
> thing that the user may be watching even though he has not interacted 
> with the system
> for a while. System then resets the screensaver countdown. However it 
> does not reset the session locking countdown, because only real input 
> may do that, for security reasons. So the user may have to give his 
> password when he wants to interact with the system after playing the movie.
> 
> How can the media player achieve this with xorg?

With gnome-mplayer, I use a dbus message to tell gnome-screensaver to be
inhibited while a video is being played.

CVS can be viewed here

http://dekorte.homeip.net/cgi-bin/cvsweb.cgi/gnome-mplayer/src/dbus-interface.c?rev=1.73

It is the last function on that page.

Kevin


-- 
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20080226/3cfbec6a/attachment.pgp>


More information about the xorg mailing list