incorrectly disables gnome-screensaver

Bug #53947 reported by William Jon McCann
18
Affects Status Importance Assigned to Milestone
mplayer (Ubuntu)
Fix Released
Medium
Nafallo Bjälevik

Bug Description

I just noticed that you patch mplayer to disable gnome-screensaver by changing the value of the gconf key:
/apps/gnome-screensaver/idle_activation_enabled

This is not the right way to do it. There are many reasons:
* mplayer may exit, for whatever reason, before it can reenable the screensaver
* more than once instance of mplayer will cause race and contention issues accessing the gconf key
* the gconf key may not be writable if a mandatory policy is in effect

The way it is done now in the patch is potentially a security problem.

You should use either (best to worst):
1. The org.gnome.ScreenSaver.Inhibit() DBUS API
2. (g-s 2.15) The "gnome-screensaver-command --inhibit" command
3. The "gnome-screensaver --poke" command

Related branches

Revision history for this message
William Jon McCann (mccann) wrote :

Oh, another reason why this is bad is that even if the screensaver doesn't activate while the movie is playing it will mark the session as idle and gnome-power-manager may power down the screen or computer.

Revision history for this message
Ori Avtalion (salty-horse) wrote :

Confirmed.
Mplayer disables gnome-screensaver when launched, but does not re-enable it when it quits (by pressing the 'q' key, for example).

William Grant (wgrant)
Changed in mplayer:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in mplayer:
importance: Low → Medium
Changed in mplayer:
assignee: nobody → nafallo
status: Confirmed → Fix Committed
Revision history for this message
Nafallo Bjälevik (nafallo) wrote :

 mplayer (2:1.0~rc1-0ubuntu7) feisty; urgency=low
 .
   [ Christian Bjaelevik ]
   * debian/rules:
     - Add --disable-mp3lib to actually disable the damn thing.
   * DOCS/man/en/mplayer.1:
     - Remove documentation about -vo aa:help (LP: #43301).
   * Various files (see bzr diff for info):
     - Apply patch taken from Mandriva CVS (LP: #53947)
       to use dbus for disabling gnome-screensaver.
 .
   [ William Grant ]
   * Enable LADSPA (LP: #67400)
     - Add ladspa-sdk to Build-Depends.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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