Opened 13 years ago
Last modified 7 years ago
#1887 reopened defect
modify behavior to disable gnome-screensaver
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | core |
Version: | unspecified | Severity: | major |
Keywords: | Cc: | nalimilan@…, oliver.henshaw@… | |
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
Using the poke command to disable gnome-screensaver in one's ~/.mplayer/config does not work any more.
cat ~/mplayer/config | grep heart
heartbeat-cmd="gnome-screensaver-command -p > /dev/null" # for gnome-screensaver
See the following gnome bugreport wherein the gnome-screensaver devs recommend "Ask mplayer and co. people to fix their app to use the Inhibit interface on the SessionManager object. Poke was only supposed to be a temporary transition to using Inhibit and well we know how temporary goes sometimes. :)"
Change History (7)
comment:1 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
Ok, and to also be a bit helpful, by what I have found this wrapper script should work:
#!/bin/sh
gnome-screensaver-command -i -n MPlayer -r "Playing" &
cmdpid=$!
mplayer "$@"
kill -9 $cmdpid
comment:3 by , 11 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened, nalimilan@club.fr |
I'm reopening this bug because GNOME has just done the first part of the move by supporting the org.freedesktop.ScreenSaver.Inhibit() and .UnInhibit() D-Bus calls that are used by KDE for a long time[1]. Thus, there now exist one good cross-desktop solution to inhibit the screensaver.
This addition was done after a discussion with VLC developers[1], and they will likely use it in the future[2]. It would probably make sense for MPlayer too.
1: https://bugzilla.gnome.org/show_bug.cgi?id=689225
2: https://trac.videolan.org/vlc/ticket/4739
3: https://trac.videolan.org/vlc/ticket/7824
comment:4 by , 11 years ago
Well, that's still only gnome and KDE, and it requires a completely new dbus dependency for which we'd have no other use than disabling the screensaver.
In addition the only C binding (except for pulling in the whole glib) starts the documentation with this: "If you use this low-level API directly, you're signing up for some pain."
It is at least some progress though.
Even though an improved command-line tool like xdg-screensaver would have been less pain to support.
Don't expect me personally to work on it though.
comment:5 by , 11 years ago
Well, Linux desktop users all use D-Bus anyway, so that does not add any new dependency for them, and of course you would not enable D-Bus on other platforms. And this interface might become more than KDE+GNOME since a new specification proposal is being discussed on the XDG list[1].
Also, libdbus is not that fun to use, but for such simple calls as Inhibit() and UnInhibit(), that does not really matter. The command-line tool was discussed with VLC devs[2], and it has its own drawbacks too.
1: http://lists.freedesktop.org/archives/xdg/2012-November/012576.html
2: http://trac.videolan.org/vlc/ticket/4739#comment:20
comment:6 by , 11 years ago
Cc: | added |
---|
comment:7 by , 7 years ago
Analyzed by developer: | unset |
---|---|
Reproduced by developer: | unset |
Here's another wrapper in the spirit of reimar's, because gnome-screensaver-command isn't used by default in modern Gnome. It sets org.gnome.desktop.session.idle-delay to 0 until mplayer exits, which prevents screen locking.
#!/bin/sh delay=`gsettings get org.gnome.desktop.session idle-delay | cut -d ' ' -f 2` gsettings set org.gnome.desktop.session idle-delay '0' mplayer "$@" gsettings set org.gnome.desktop.session idle-delay "${delay}"
MPlayer will _not_ implement gnome-specific stuff. Unless the gnome developers get their act together and support at least one gnome-independent method gnome will not be supported. This is _final_.
It is ridiculous to expect every single application to support your special way that in addition is changed at least once a year, we will not play along with these incompetent games of "look, we came up with a new idiocy to waste your time with".