mario0alberto1 / gnome-mplayer

Automatically exported from code.google.com/p/gnome-mplayer
0 stars 0 forks source link

Fallback to xdg-screesaver when gnome-screensaver is not available #480

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start a movie on a system which use xscreensaver
2. Wait
3. See that the screensaver pop up when the movie is playing, if you didn't 
check the option using X Screen Saver.

What version of the product are you using? On what operating system?
gnome-mplayer 0.9.9.2
Lubuntu 10.10

Please provide any additional information below.
Actually, only gnome-scrensaver inhibition is working by default. If you use 
xscreensaver, you need to check the appropriate option. People who don't look 
into options will thought it's a bug.
1 possible way to do it by default, is to fallback to xdg-screensaver, an 
utility in xdg-utils which disable the screensaver. This way works for 
xscreensaver. "Fortunatly", the support for gnome-screensaver doesn't work, so 
using xdg-screensaver doesn't conflict with gnome-screensaver.

I quickly done a patch which work on my system. It probably need more work, but 
maybe it could help you to enable this feature ? Please consider this as a 
feature request, not a bug :)

Thanks in advance.

Original issue reported on code.google.com by julien.l...@gmail.com on 28 Jan 2011 at 11:27

Attachments:

GoogleCodeExporter commented 8 years ago
Personally, I don't like patches like this, ones that spawn external 
applications. I only use this route when a functional library is not available.

If you are using gnome, and have gnome-screensaver disabled, there is really 
not a good way to auto detect this. So using the check box is probably the only 
solution. 

I'm still not entirely sure what you are trying to accomplish with this patch. 
If you want to improve this feature look at dbus_interface.c and examine the 
dbus_enable/disable_screensaver functions. Perhaps there is another approach 
that could be taken. 

Original comment by kdeko...@gmail.com on 28 Jan 2011 at 11:38

GoogleCodeExporter commented 8 years ago
This modification is only useful when you don't use GNOME and gnome-screensaver 
:)
The idea of this report :
- try to disable gnome-screensaver (the current code)
- try to disable other screensavers by using xdg-screensaver, which should 
covered the others screensavers.
The goal is to use xdg-screensaver wrapper to auto-detect the good screensaver, 
you don't need to do this job.

Another approach is to implement the same inhibition API that the gnome-session 
one, but for xfce and lxde session manager. But it probably needs some work in 
both session managers.

Or, another idea, if you don't detect gnome-screensaver on d-bus, try 
XScreenSaverSuspend, so you don't have to check the setting box if you don't 
use gnome-screensaver.

I'm using gnome-mplayer on LXDE for several months, and I only realize the 
check box option for XScreenSaverSuspend when writing the patch :) So I think 
it could be useful for users to add something automatic :)

I hope the explanation is clear enough, let me know if you need more detailed 
description :)

Original comment by julien.l...@gmail.com on 30 Jan 2011 at 4:31

GoogleCodeExporter commented 8 years ago
I think SVN r1843 should do what you want..

Original comment by kdeko...@gmail.com on 31 Jan 2011 at 6:26

GoogleCodeExporter commented 8 years ago
Thanks :) Yes, the option is now used on my system automatically.
Unfortunately, I can't really test it, since XScreenSaverSuspend doesn't do 
anything on my system (probably something broken on my system). But it's 
another problem :)

Original comment by julien.l...@gmail.com on 11 Feb 2011 at 6:03

GoogleCodeExporter commented 8 years ago

Original comment by kdeko...@gmail.com on 11 Feb 2011 at 6:05