Mplayer -stop-xscreensaver doesn't work with gnome-screensaver

Bug #6620 reported by Lionel Dricot
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mplayer (Ubuntu)
Fix Released
Medium
MOTU Media Team
Dapper
Invalid
Medium
MOTU Media Team

Bug Description

Hello,

I've found that when running gnome-screensaver, "mplayer -stop-xscreensaver
movie.avi" is becoming useless. (screensaver will appears anyway)

That's quite annoying.

I tought first to report it as a gnome-screensaver bug :
http://bugzilla.gnome.org/show_bug.cgi?id=326145
but is was refused.

It means that mplayer should be patched, either upstream or ubuntu specific.

Revision history for this message
Danilo Piazzalunga (danilopiazza) wrote : Stop gnome-screensaver -- try 1

This patch adds ad-hoc support for gnome-screensaver in libvo/x11_common.c, similar to the already existing support for kscreensaver.

This is still completely untested.

Changed in mplayer:
status: Unconfirmed → In Progress
Revision history for this message
Reinhard Tartler (siretart) wrote :

I'm currently on xscreensaver, where mplayer works charmingly. gnome-screensaver makes some problem for me, I'll see when I will switch. then I can test this patch.

Changed in mplayer:
assignee: nobody → motumedia
status: Unconfirmed → Rejected
Revision history for this message
Danilo Piazzalunga (danilopiazza) wrote : Stop gnome-screensaver using brute force

This one works both when gnome-screensaver is running and when it isn't. It simply stops it by killing the process and then restarts it if it was running.

Changed in mplayer:
status: In Progress → Confirmed
Changed in mplayer:
assignee: nobody → motumedia
status: Rejected → Confirmed
status: Confirmed → Rejected
Revision history for this message
Reinhard Tartler (siretart) wrote :

mmh, with brute force you mean using sytem("shellcommand").

This is a quite naive approach, but might work. I want to think about it a little if there are some negative consequences before uploading this.

Revision history for this message
Danilo Piazzalunga (danilopiazza) wrote :

Not really, because system() is the already used approach.

By brute force, I mean that I kill gnome-screensaver instead of using the "inhibit activation" request (which I couldn't get to work). And yes, it is rather naive indeed.

Revision history for this message
Reinhard Tartler (siretart) wrote : Re: [Bug 6620] Mplayer -stop-xscreensaver doesn't work with gnome-screensaver

> By brute force, I mean that I kill gnome-screensaver instead of using
> the "inhibit activation" request (which I couldn't get to work). And
> yes, it is rather naive indeed.

I see. I will have a look how other applications are solving this.

Revision history for this message
Reinhard Tartler (siretart) wrote :

mplayer (2:0.99+1.0pre7try2+cvs20060117-0ubuntu4) dapper; urgency=low

  * added 05_gnome-screensaver-handling.dpatch to add support for
    gnome-screensaver to the -stop-xscreensaver option

 -- Oliver Grawert <email address hidden> Sat, 25 Feb 2006 20:52:36 +0100

Changed in mplayer:
status: Confirmed → Fix Released
Revision history for this message
Piotr Morgwai Kotarbiński (morgwai) wrote :

unfortunately it has reoccurred for me in karmic again :(

Changed in mplayer (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Piotr Morgwai Kotarbiński (morgwai) wrote : apport-collect data

Architecture: amd64
DistroRelease: Ubuntu 9.10
Package: mplayer 2:1.0~rc3+svn20090426-1ubuntu10
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
RelatedPackageVersions:
 libavcodec52 4:0.5+svn20090706-2ubuntu2
 libavcodec-extra-52 N/A
Uname: Linux 2.6.31-14-generic x86_64
UserConf: # Write your default config options here!
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
system: distro = Ubuntu, architecture = x86_64, kernel = 2.6.31-14-generic

Revision history for this message
Piotr Morgwai Kotarbiński (morgwai) wrote : Dependencies.txt
Revision history for this message
Piotr Morgwai Kotarbiński (morgwai) wrote : SystemConf.txt
Revision history for this message
Piotr Morgwai Kotarbiński (morgwai) wrote : XsessionErrors.txt
tags: added: apport-collected
Revision history for this message
imlegend (czchenzheng) wrote :

this problem comes again in UB 9.10.......................

Revision history for this message
fhloston (fhloston) wrote :

Same here. Mplayer playing media stream (radio) stops when screensaver kicks in. It starts as soon as I touch the mouse to activate screen again.
Fully updated 9.10 (upgraded from 9.04) on AMD64...

Revision history for this message
fhloston (fhloston) wrote :

Also works to trigger the behavior when doing a preview of the screensaver :-)

Revision history for this message
Desh Danz (nicoluno) wrote :

I've the same issue, but I add: not only Mplayer fails to stop XScreensaver, VLC too is unable to stop it.
Isn't it a Gnome related bug?

Revision history for this message
Stefan Ratschan (stefan-ratschan) wrote :

Same problem for me-tv.

Revision history for this message
QkiZ (qkiz) wrote :

There is an option in what is called heartbeat-cmd in MPlayer, which calls the command every half minute. I wrote a script that appears to be pressing the shift key, using the command xdotool. I called it "shiftpress". Script:

nice -n 1 xdotool key shift

Then I set the option heartbeat-cmd in file ~ /.mplayer /config:

heartbeat-cmd="shiftpress"

During movie playback MPlayer will run the script "shiftpress". Command xdotool emulates shift press and the screensaver is deferred.

Revision history for this message
Danilo Piazzalunga (danilopiazza) wrote :

The problem is that gnome-screensaver's DBus API has changed. The current DBus API is here:

http://git.gnome.org/cgit/gnome-screensaver/tree/doc/dbus-interface.xml

MPlayer should be updated to use the new API.

Revision history for this message
Danilo Piazzalunga (danilopiazza) wrote :

For Karmic, this is being addressed in bug #428884.

Changed in mplayer (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.