Debian Bug report logs - #610155
xdg-utils: fails to disable gnome-screensaver

version graph

Package: xdg-utils; Maintainer for xdg-utils is Per Olofsson <pelle@debian.org>; Source for xdg-utils is src:xdg-utils.

Reported by: Frederik Himpe <fhimpe@telenet.be>

Date: Sat, 15 Jan 2011 18:03:02 UTC

Severity: normal

Found in version xdg-utils/1.1.0~rc1-1

Fixed in version xdg-utils/1.1.0~rc1-3

Done: Per Olofsson <pelle@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sat, 15 Jan 2011 18:03:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Frederik Himpe <fhimpe@telenet.be>:
New Bug report received and forwarded. Copy sent to Per Olofsson <pelle@debian.org>. (Sat, 15 Jan 2011 18:03:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Frederik Himpe <fhimpe@telenet.be>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xdg-utils: fails to disable gnome-screensaver
Date: Sat, 15 Jan 2011 19:01:10 +0100
Package: xdg-utils
Version: 1.1.0~rc1-1
Severity: normal

With both the version of xdg-utils in Squeeze as the on in Sid, xine fails to
disable gnome-screensaver.

It looks like xine calls xdg-screensaver suspend 69213788. I ran this through
bash -x to get an idea about what's happening:

$ bash -x xdg-screensaver suspend 69213788
+ check_common_commands suspend 69213788
+ '[' 2 -gt 0 ']'
+ parm=suspend
+ shift
+ case "$parm" in
+ '[' 1 -gt 0 ']'
+ parm=69213788
+ shift
+ case "$parm" in
+ '[' 0 -gt 0 ']'
+ '[' -z 100 ']'
+ '[' 100 -lt 1 ']'
+ xdg_redirect_output=' >&2'
+ mv -T ... ...
+ grep '\.\.\.'
+ DEBUG 1 'mv -T available'
+ '[' -z 100 ']'
+ '[' 100 -lt 1 ']'
+ shift
+ echo 'mv -T available'
mv -T available
+ MV='mv -T'
++ echo :0.0
++ sed s/:/-/g
+ screensaver_file=/tmp/xdg-screensaver-frederik--0.0
++ which lockfile
+ lockfile_command=/usr/bin/lockfile
++ which xprop
+ XPROP=/usr/bin/xprop
+ '[' xsuspend '!=' x ']'
+ action=
+ window_id=
+ case $1 in
+ action=suspend
+ shift
+ '[' -z 69213788 ']'
+ window_id=69213788
+ check_window_id
+ '[' -z /usr/bin/xprop ']'
+ DEBUG 2 'Running /usr/bin/xprop -id 69213788'
+ '[' -z 100 ']'
+ '[' 100 -lt 2 ']'
+ shift
+ echo 'Running /usr/bin/xprop -id 69213788'
Running /usr/bin/xprop -id 69213788
+ /usr/bin/xprop -id 69213788
+ DEBUG 3 Window 69213788 exists
+ '[' -z 100 ']'
+ '[' 100 -lt 3 ']'
+ shift
+ echo Window 69213788 exists
Window 69213788 exists
+ detectDE
+ '[' x = xtrue ']'
+ '[' xthis-is-deprecated '!=' x ']'
+ DE=gnome
+ xscreensaver-command -version
+ grep XScreenSaver
+ gnome-screensaver-command -q
+ DE=gnome_screensaver
+ '[' suspend = resume ']'
+ perform_action suspend
+ result=1
+ '[' suspend = resume ']'
+ '[' suspend = reset ']'
+ case "$DE" in
+ screensaver_gnome_screensaver suspend
+ case "$1" in
+ screensaver_suspend_loop gnome-screensaver-command --poke
+ lockfile
+ '[' -n /usr/bin/lockfile ']'
+ /usr/bin/lockfile -1 -l 10 -s 3 /tmp/xdg-screensaver-frederik--0.0.lock
+ test '' = set
+ TMPDIR=/tmp
++ mktemp /tmp/tmp.XXXXXXXXXX
+ tmpfile=/tmp/tmp.zkQjQG8c0z
+ cat /tmp/xdg-screensaver-frederik--0.0
+ IFS_save='
'
+ IFS=:
+ read wid pid
+ IFS='
'
+ '[' -s /tmp/tmp.zkQjQG8c0z ']'
+ mv -T /tmp/tmp.zkQjQG8c0z /tmp/xdg-screensaver-frederik--0.0
+ unlockfile
+ rm -f /tmp/xdg-screensaver-frederik--0.0.lock
+ result=0
+ '[' suspend = suspend ']'
+ xset -q
+ grep 'DPMS is Enabled'
+ test set = set
++ mktemp /tmp/tmp.XXXXXXXXXX
+ tmpfile=/tmp/tmp.r6l98kMffM
+ mv -T /tmp/tmp.r6l98kMffM /tmp/xdg-screensaver-frederik--0.0.dpms
+ xset -dpms
+ '[' suspend = suspend ']'
+ '[' 0 -eq 0 ']'
+ exit_success
+ '[' 0 -gt 0 ']'
+ exit 0

The command returns immediately,
$ xprop -id 69213788
_NET_WM_ICON_GEOMETRY(CARDINAL) = 196, 876, 157, 24
_COMPIZ_WINDOW_DECOR(INTEGER) = 20080529, 16781535, 1, 1, 27, 11, 0, 0, 27, 6,
111, 0, 589925, -9, -35, -91, 0, 940, 32767, 0, 0, 524389, 931, -35, -91, 0,
32767, 32767, 940, 0, 590182, -91, -35, 11, 0, 102, 32767, 1043, 0, 395413, -9,
0, 0, -287, 32767, 288, 1, 37, 264341, -9, 288, 0, -287, 32767, 32767, 289, 37,
395929, -9, -287, 0, 0, 32767, 287, 577, 37, 395430, 0, 0, 11, -287, 32767,
288, 1, 48, 264358, 0, 288, 11, -287, 32767, 32767, 289, 48, 395946, 0, -287,
11, 0, 32767, 287, 577, 48, 589993, -9, 0, -511, 21, 520, 32767, 0, 61, 524457,
511, 0, -511, 21, 32767, 32767, 520, 61, 590250, -511, 0, 11, 21, 522, 32767,
1043, 61
XKLAVIER_STATE(INTEGER) = 0, 0
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_XITK_EVENT(ATOM) = undefined atom # 0x30312e30
XdndTypeList(ATOM) = text/uri-list
XdndAware(ATOM) = ARC
_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_STATE(ATOM) =
_NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 27, 11
_NET_FRAME_WINDOW(WINDOW): window id # 0x180f843
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE,
_NET_WM_ACTION_STICK, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ,
_NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CLOSE,
_NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_ABOVE,
_NET_WM_ACTION_BELOW
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
_NET_WM_WINDOW_OPACITY_LOCKED(CARDINAL) = 16123056
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
                bitmap id # to use for icon: 0x4200002
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: 0, 0
                program specified size: 1023 by 576
WM_LOCALE_NAME(STRING) = "en_GB.utf8"
WM_CLIENT_MACHINE(STRING) = "defected"
WM_ICON_NAME(STRING) = "xine: <THE_KILLING_II_DVD_1>"
WM_NAME(STRING) = "xine: <THE_KILLING_II_DVD_1>"
WM_CLASS(STRING) = "xine Video Window", "xine"




-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (300, 'testing'), (200, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

xdg-utils depends on no packages.

Versions of packages xdg-utils recommends:
ii  libfile-mimeinfo-perl         0.15-1     Perl module to determine file type
ii  x11-utils                     7.5+4      X11 utilities
ii  x11-xserver-utils             7.5+2      X server utilities

Versions of packages xdg-utils suggests:
ii  gvfs-bin                      1.6.4-3    userspace virtual filesystem - bin

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sat, 15 Jan 2011 20:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Per Olofsson <pelle@dsv.su.se>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sat, 15 Jan 2011 20:24:03 GMT) Full text and rfc822 format available.

Message #10 received at 610155@bugs.debian.org (full text, mbox):

From: Per Olofsson <pelle@dsv.su.se>
To: Frederik Himpe <fhimpe@telenet.be>, 610155@bugs.debian.org
Subject: Re: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Sat, 15 Jan 2011 21:13:41 +0100
Hi Frederik,

2011-01-15 19:01, Frederik Himpe skrev:
> Package: xdg-utils
> Version: 1.1.0~rc1-1
> Severity: normal
> 
> With both the version of xdg-utils in Squeeze as the on in Sid, xine fails to
> disable gnome-screensaver.
> 
> It looks like xine calls xdg-screensaver suspend 69213788. I ran this through
> bash -x to get an idea about what's happening:
...

xdg-screensaver is supposed to start a process in the background which
runs "gnome-screensaver-command --poke" every 50 seconds. Is that
process started and does it keep running?

-- 
Pelle




Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sat, 15 Jan 2011 22:00:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Frederik Himpe <fhimpe@telenet.be>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sat, 15 Jan 2011 22:00:06 GMT) Full text and rfc822 format available.

Message #15 received at 610155@bugs.debian.org (full text, mbox):

From: Frederik Himpe <fhimpe@telenet.be>
To: 610155@bugs.debian.org
Subject: Re: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Sat, 15 Jan 2011 21:47:14 +0100
On Sat, 2011-01-15 at 21:13 +0100, Per Olofsson wrote:
> Hi Frederik,
> 
> 2011-01-15 19:01, Frederik Himpe skrev:
> > Package: xdg-utils
> > Version: 1.1.0~rc1-1
> > Severity: normal
> > 
> > With both the version of xdg-utils in Squeeze as the on in Sid, xine fails to
> > disable gnome-screensaver.
> > 
> > It looks like xine calls xdg-screensaver suspend 69213788. I ran this through
> > bash -x to get an idea about what's happening:
> ...
> 
> xdg-screensaver is supposed to start a process in the background which
> runs "gnome-screensaver-command --poke" every 50 seconds. Is that
> process started and does it keep running?

I cannot find anything like that using ps.

I see the files /tmp/xdg-screensaver-frederik--0.0
and /tmp/xdg-screensaver-frederik--0.0.dpms, so from what I understand,
as long as these exists, xdg-screensaver is supposed to call the poke
command every 50 seconds, but instead xdg-screensaver exits immediately.

-- 
Frederik Himpe <fhimpe@telenet.be>
Linux





Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Tue, 22 Feb 2011 21:33:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jochem Kossen <jochem@jkossen.nl>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Tue, 22 Feb 2011 21:33:12 GMT) Full text and rfc822 format available.

Message #20 received at 610155@bugs.debian.org (full text, mbox):

From: Jochem Kossen <jochem@jkossen.nl>
To: 610155@bugs.debian.org
Subject: Re: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Tue, 22 Feb 2011 22:21:38 +0100
I have the same issue but with vlc and on Squeeze (xdg-utils
1.0.2+cvs20100307-2) which has the same version of the xdg-screensaver
script.

Strange thing is, after running 'gnome-screensaver --poke' once in the
terminal while vlc is playing the movie seems to cause xdg-screensaver
to work (meaning after a one-time gnome-screensaver --poke the
screensaver doesn't kick in anymore).

While running VLC, these *two* processes are running in the background:

jochem@rock:~$ ps uaxw|grep xdg-screen
jochem    3505  0.0  0.0   4000   336 ?        S    22:00   0:00 /bin/sh /usr/bin/xdg-screensaver suspend 0x0120131c
jochem    3514  0.0  0.0   4000   392 ?        S    22:00   0:00 /bin/sh /usr/bin/xdg-screensaver suspend 0x0120131c






Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Fri, 25 Feb 2011 19:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hadrien DUSSUEL <hadrien.dussuel@gmail.com>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a $gBug is determined using this field. Please remember to include a Subject field in your messages in future.

(Fri, 25 Feb 2011 19:57:03 GMT) Full text and rfc822 format available.


Message #25 received at 610155@bugs.debian.org (full text, mbox):

From: Hadrien DUSSUEL <hadrien.dussuel@gmail.com>
To: 610155@bugs.debian.org
Date: Fri, 25 Feb 2011 20:53:07 +0100
I have written a report on the VLC package, but it seem to be caused by 
xdg-utils. Here's a link to the "VLC supposed bug", which in fact isn't 
a vlc bug.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=436339

I can see the problem occuring with fullscreen videos on VLC and 
flashplayer.




Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Fri, 30 Sep 2011 22:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry K <darkduck@darkduck.com>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Fri, 30 Sep 2011 22:09:03 GMT) Full text and rfc822 format available.

Message #30 received at 610155@bugs.debian.org (full text, mbox):

From: Dmitry K <darkduck@darkduck.com>
To: 610155@bugs.debian.org
Subject: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Fri, 30 Sep 2011 23:05:54 +0100
[Message part 1 (text/plain, inline)]
Debian Squeeze

command gnome-screensaver --poke proposed by Joshem Kossem return that
--poke is unknown parameter.
I still experience same issue with VLC playing videos on full or part
screen. Screensaver is automatically called up.

Same video in Totem movie player works fine without screensaver being
called.

*Dmitry*
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sat, 01 Oct 2011 07:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Per Olofsson <pelle@dsv.su.se>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sat, 01 Oct 2011 07:21:03 GMT) Full text and rfc822 format available.

Message #35 received at 610155@bugs.debian.org (full text, mbox):

From: Per Olofsson <pelle@dsv.su.se>
To: Dmitry K <darkduck@darkduck.com>, 610155@bugs.debian.org
Subject: Re: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Sat, 01 Oct 2011 09:09:52 +0200
Hi,

2011-10-01 00:05, Dmitry K skrev:
> Debian Squeeze
> 
> command gnome-screensaver --poke proposed by Joshem Kossem return that
> --poke is unknown parameter.

What about:

gnome-screensaver-command --poke

> I still experience same issue with VLC playing videos on full or part
> screen. Screensaver is automatically called up.

But does VLC really use xdg-screensaver?

-- 
Pelle




Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sat, 01 Oct 2011 23:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry K <darkduck@darkduck.com>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sat, 01 Oct 2011 23:00:03 GMT) Full text and rfc822 format available.

Message #40 received at 610155@bugs.debian.org (full text, mbox):

From: Dmitry K <darkduck@darkduck.com>
To: Per Olofsson <pelle@dsv.su.se>
Cc: 610155@bugs.debian.org
Subject: Re: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Sat, 1 Oct 2011 23:55:44 +0100
[Message part 1 (text/plain, inline)]
Pelle,

I tried

gnome-screensaver-command --poke

during playback. It does not help.

I am not 100% sure about xdg-screensaver and VLC. But I tried to discuss it
at VLC forum http://forum.videolan.org/viewtopic.php?f=13&t=94579 .
I have Mageia installed on same laptop. VLC works fine there in same
configuration.
The differences between Mageia and Debian installations are:
-VLC is 1.1.11 in Mageia and 1.1.3 in Debian. Not a big difference I think.
-Command

xdg-screensaver status

returns "enabled" in Debian vs "disabled" in Mageia in freshly booted
system.

You see, there is high probability that xdg-screensaver is actually used by
VLC and it is xdg-screensaver to cause the issue.
Now the question: why is it enabled in Debian and disabled in Mageia? I have
not found a way to disable it in Debian for a more equal test.


Best regards,
*Dmitry*



On 1 October 2011 08:09, Per Olofsson <pelle@dsv.su.se> wrote:

> Hi,
>
> 2011-10-01 00:05, Dmitry K skrev:
> > Debian Squeeze
> >
> > command gnome-screensaver --poke proposed by Joshem Kossem return that
> > --poke is unknown parameter.
>
> What about:
>
> gnome-screensaver-command --poke
>
> > I still experience same issue with VLC playing videos on full or part
> > screen. Screensaver is automatically called up.
>
> But does VLC really use xdg-screensaver?
>
> --
> Pelle
>
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sun, 16 Oct 2011 16:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Per Olofsson <pelle@dsv.su.se>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sun, 16 Oct 2011 16:27:04 GMT) Full text and rfc822 format available.

Message #45 received at 610155@bugs.debian.org (full text, mbox):

From: Per Olofsson <pelle@dsv.su.se>
To: Dmitry K <darkduck@darkduck.com>
Cc: 610155@bugs.debian.org
Subject: Re: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Sun, 16 Oct 2011 18:24:00 +0200
Hi Dmitry,

Sorry for now answering earlier, I have been swamped with work.

2011-10-02 00:55, Dmitry K skrev:
> 
> I am not 100% sure about xdg-screensaver and VLC. But I tried to discuss
> it at VLC forum http://forum.videolan.org/viewtopic.php?f=13&t=94579
> <http://forum.videolan.org/viewtopic.php?f=13&t=94579> .

You are right, VLC uses xdg-screensaver.

> I have Mageia installed on same laptop. VLC works fine there in same
> configuration.
> The differences between Mageia and Debian installations are:
> -VLC is 1.1.11 in Mageia and 1.1.3 in Debian. Not a big difference I think.
> -Command 
> 
> xdg-screensaver status
> 
> returns "enabled" in Debian vs "disabled" in Mageia in freshly booted
> system.

So then either Mageia doesn't have a screensaver by default,
or something else is wrong.

> Now the question: why is it enabled in Debian and disabled in Mageia? I
> have not found a way to disable it in Debian for a more equal test.

The command to disable it is

xdg-screensaver suspend <window-id>

where <window-id> is an X11 window id for a window to track.
This is what VLC is supposed to do.

Could you please try running

sh -x /usr/bin/xdg-screensaver suspend $(xwininfo -root|grep "Window id:"| cut -d' ' -f4)

and send me the output?

Also check if it stops the screensaver from running.

You can enable the screensaver again with

xdg-screensaver resume $(xwininfo -root|grep "Window id:"| cut -d' ' -f4)

-- 
Pelle




Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Mon, 17 Oct 2011 21:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry K <darkduck@darkduck.com>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Mon, 17 Oct 2011 21:24:04 GMT) Full text and rfc822 format available.

Message #50 received at 610155@bugs.debian.org (full text, mbox):

From: Dmitry K <darkduck@darkduck.com>
To: Per Olofsson <pelle@dsv.su.se>, 610155@bugs.debian.org
Subject: Re: Bug#610155: xdg-utils: fails to disable gnome-screensaver
Date: Mon, 17 Oct 2011 22:20:27 +0100
[Message part 1 (text/plain, inline)]
Hi Pelle,

I ran the command you gave me when VLC was running. It did not stop
screensaver.
Here is output:
darkduck@darkduck-laptop:~$ sh -x /usr/bin/xdg-screensaver suspend
$(xwininfo -root|grep "Window id:"| cut -d' ' -f4)
+ check_common_commands suspend 0x104
+ [ 2 -gt 0 ]
+ parm=suspend
+ shift
+ [ 1 -gt 0 ]
+ parm=0x104
+ shift
+ [ 0 -gt 0 ]
+ [ -z  ]
+ unset XDG_UTILS_DEBUG_LEVEL
+ [ 0 -lt 1 ]
+ xdg_redirect_output= > /dev/null 2> /dev/null
+ mv -T ... ...
+ grep \.\.\.
+ DEBUG 1 mv -T available
+ [ -z  ]
+ return 0
+ MV=mv -T
+ echo :0.0
+ sed s/:/-/g
+ screensaver_file=/tmp/xdg-screensaver-darkduck--0.0
+ which lockfile
+ lockfile_command=/usr/bin/lockfile
+ which xprop
+ XPROP=/usr/bin/xprop
+ [ xsuspend != x ]
+ action=
+ window_id=
+ action=suspend
+ shift
+ [ -z 0x104 ]
+ window_id=0x104
+ check_window_id
+ [ -z /usr/bin/xprop ]
+ DEBUG 2 Running /usr/bin/xprop -id 0x104
+ [ -z  ]
+ return 0
+ /usr/bin/xprop -id 0x104
+ DEBUG 3 Window 0x104 exists
+ [ -z  ]
+ return 0
+ detectDE
+ [ x = xtrue ]
+ [ xthis-is-deprecated != x ]
+ DE=gnome
+ xscreensaver-command -version
+ grep XScreenSaver
+ [ suspend = resume ]
+ perform_action suspend
+ result=1
+ [ suspend = resume ]
+ [ suspend = reset ]
+ screensaver_gnome suspend
+ screensaver_suspend_loop gnome-screensaver-command --poke
+ lockfile
+ [ -n /usr/bin/lockfile ]
+ /usr/bin/lockfile -1 -l 10 -s 3 /tmp/xdg-screensaver-darkduck--0.0.lock
+ test  = set
+ TMPDIR=/tmp
+ mktemp /tmp/tmp.XXXXXXXXXX
+ tmpfile=/tmp/tmp.Rd94CxCJjW
+ cat /tmp/xdg-screensaver-darkduck--0.0
+ IFS_save=

+ IFS=:
+ read wid pid
+ ps -p 2214
+ grep xprop
+ echo 0x03800281:2214
+ read wid pid
+ IFS=

+ [ -s /tmp/tmp.Rd94CxCJjW ]
+ mv -T /tmp/tmp.Rd94CxCJjW /tmp/xdg-screensaver-darkduck--0.0
+ unlockfile
+ rm -f /tmp/xdg-screensaver-darkduck--0.0.lock
+ return
+ result=0
+ [ suspend = suspend ]
+ grep DPMS is Enabled
+ xset -q
+ [ suspend = suspend ]
+ [ 0 -eq 0 ]
+ exit_success
+ [ 0 -gt 0 ]
+ exit 0
darkduck@darkduck-laptop:~$

Best regards,
Dmitry



On 16 October 2011 17:24, Per Olofsson <pelle@dsv.su.se> wrote:

> Hi Dmitry,
>
> Sorry for now answering earlier, I have been swamped with work.
>
> 2011-10-02 00:55, Dmitry K skrev:
> >
> > I am not 100% sure about xdg-screensaver and VLC. But I tried to discuss
> > it at VLC forum http://forum.videolan.org/viewtopic.php?f=13&t=94579
> > <http://forum.videolan.org/viewtopic.php?f=13&t=94579> .
>
> You are right, VLC uses xdg-screensaver.
>
> > I have Mageia installed on same laptop. VLC works fine there in same
> > configuration.
> > The differences between Mageia and Debian installations are:
> > -VLC is 1.1.11 in Mageia and 1.1.3 in Debian. Not a big difference I
> think.
> > -Command
> >
> > xdg-screensaver status
> >
> > returns "enabled" in Debian vs "disabled" in Mageia in freshly booted
> > system.
>
> So then either Mageia doesn't have a screensaver by default,
> or something else is wrong.
>
> > Now the question: why is it enabled in Debian and disabled in Mageia? I
> > have not found a way to disable it in Debian for a more equal test.
>
> The command to disable it is
>
> xdg-screensaver suspend <window-id>
>
> where <window-id> is an X11 window id for a window to track.
> This is what VLC is supposed to do.
>
> Could you please try running
>
> sh -x /usr/bin/xdg-screensaver suspend $(xwininfo -root|grep "Window id:"|
> cut -d' ' -f4)
>
> and send me the output?
>
> Also check if it stops the screensaver from running.
>
> You can enable the screensaver again with
>
> xdg-screensaver resume $(xwininfo -root|grep "Window id:"| cut -d' ' -f4)
>
> --
> Pelle
>
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sun, 20 Nov 2011 06:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sun, 20 Nov 2011 06:45:03 GMT) Full text and rfc822 format available.

Message #55 received at 610155@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: 610155@bugs.debian.org
Subject: [PATCH] xdg-screensaver: Use DBus API for GNOME
Date: Sun, 20 Nov 2011 06:42:56 +0000
[Message part 1 (text/plain, inline)]
gnome-screensaver-command --poke has been removed.  Closes: #610155.
---
I'm not sure how far back this DBus API is supported; I've only tested
in sid.

Ben.

 debian/changelog                              |    6 +++
 debian/control                                |    3 +-
 debian/patches/series                         |    1 +
 debian/patches/xdg-screensaver-new-gnome.diff |   60 +++++++++++++++++++++++++
 4 files changed, 69 insertions(+), 1 deletions(-)
 create mode 100644 debian/patches/xdg-screensaver-new-gnome.diff

diff --git a/debian/changelog b/debian/changelog
index 5accedc..d8fe9f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
 xdg-utils (1.1.0~rc1-3) UNRELEASED; urgency=low
 
+  [ Per Olofsson ]
   * Remove debian/patches/xserver-blanking.diff, already applied
     upstream. Thanks to Tanguy Ortolo for spotting this.
     Closes: #647794.
 
+  [ Ben Hutchings ]
+  * Add patch xdg-screensaver-new-gnome.diff: Use DBus API for GNOME
+    since gnome-screensaver-command --poke has been removed.
+    Closes: #610155.
+
  -- Per Olofsson <pelle@debian.org>  Tue, 08 Nov 2011 00:09:18 +0100
 
 xdg-utils (1.1.0~rc1-2) unstable; urgency=low
diff --git a/debian/control b/debian/control
index a5b89be..bf61964 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,8 @@ Homepage: http://portland.freedesktop.org/
 Package: xdg-utils
 Architecture: all
 Depends: ${misc:Depends}
-Recommends: libfile-mimeinfo-perl, x11-utils, x11-xserver-utils
+Recommends: libfile-mimeinfo-perl, libnet-dbus-perl, libx11-protocol-perl,
+ x11-utils, x11-xserver-utils
 Suggests: gvfs-bin
 Description: desktop integration utilities from freedesktop.org
  xdg-utils contains utilities for integrating applications with the
diff --git a/debian/patches/series b/debian/patches/series
index 370bb95..7574299 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ xdg-mime-generic-use-mimetype.diff
 bashisms.diff
 xdg-open-browser-multiword.diff
 xdg-open-printf.diff
+xdg-screensaver-new-gnome.diff
diff --git a/debian/patches/xdg-screensaver-new-gnome.diff b/debian/patches/xdg-screensaver-new-gnome.diff
new file mode 100644
index 0000000..679c448
--- /dev/null
+++ b/debian/patches/xdg-screensaver-new-gnome.diff
@@ -0,0 +1,60 @@
+Description: Use DBus API for GNOME since gnome-screensaver-command --poke
+	has been removed
+Author: Ben Hutchings <ben@decadent.org.uk>
+Bug: http://bugs.debian.org/610155
+
+--- xdg-utils.orig/scripts/xdg-screensaver
++++ xdg-utils/scripts/xdg-screensaver
+@@ -762,15 +762,45 @@
+ 
+ screensaver_gnome_screensaver()
+ {
+-# TODO
+-# There seems to be a DBUS interface for gnome-screensaver
+-# See http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-April/042579.html and
+-# http://cvs.gnome.org/viewcvs/gnome-screensaver/src/gs-listener-dbus.c?rev=1.36&view=log
+-# A problem seems to be that Inhibit is tied to the lifetime of the DBUS appname and
+-# this can not be used from a script
+     case "$1" in
+         suspend)
+-        screensaver_suspend_loop gnome-screensaver-command --poke
++        perl -e '
++use strict;
++use warnings;
++use IO::File;
++use Net::DBus;
++use X11::Protocol;
++
++my ($window_id, $screensaver_file) = @ARGV;
++
++# Find window name to pass to session manager.
++my $x = X11::Protocol->new();
++my ($window_name) = $x->GetProperty(hex($window_id), $x->atom("WM_NAME"),
++				    $x->atom("STRING"), 0, 1000, 0);
++
++# Inhibit idle detection (flags = 8) with window name and ID.
++# We have no reason so just send the window name again.
++my $bus = Net::DBus->session();
++my $sm_svc = $bus->get_service("org.gnome.SessionManager");
++my $sm = $sm_svc->get_object("/org/gnome/SessionManager",
++			     "org.gnome.SessionManager");
++$sm->Inhibit($window_name, hex($window_id), $window_name, 8);
++
++# Wait until removed from the status file.
++while (1) {
++  sleep(10);
++  my $status = new IO::File($screensaver_file, "r")
++    or exit 0;
++  my $found;
++  while (<$status>) {
++    if (/^$window_id:/) {
++      $found = 1;
++      last;
++    }
++  }
++  exit 0 unless $found;
++}
++' $window_id $screensaver_file &
+         result=0
+         ;;
+ 
-- 
1.7.7.3


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sun, 20 Nov 2011 07:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sun, 20 Nov 2011 07:30:04 GMT) Full text and rfc822 format available.

Message #60 received at 610155@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: 610155@bugs.debian.org
Subject: [PATCH v2] xdg-screensaver: Use DBus API for GNOME
Date: Sun, 20 Nov 2011 07:26:47 +0000
[Message part 1 (text/plain, inline)]
gnome-screensaver-command --poke has been removed.  Closes: #610155.
---
Second try - this copes with callers that pass the window ID for a child
window without a name (which VLC does).

Ben.

 debian/changelog                              |    6 ++
 debian/control                                |    3 +-
 debian/patches/series                         |    1 +
 debian/patches/xdg-screensaver-new-gnome.diff |   70 +++++++++++++++++++++++++
 4 files changed, 79 insertions(+), 1 deletions(-)
 create mode 100644 debian/patches/xdg-screensaver-new-gnome.diff

diff --git a/debian/changelog b/debian/changelog
index 5accedc..d8fe9f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
 xdg-utils (1.1.0~rc1-3) UNRELEASED; urgency=low
 
+  [ Per Olofsson ]
   * Remove debian/patches/xserver-blanking.diff, already applied
     upstream. Thanks to Tanguy Ortolo for spotting this.
     Closes: #647794.
 
+  [ Ben Hutchings ]
+  * Add patch xdg-screensaver-new-gnome.diff: Use DBus API for GNOME
+    since gnome-screensaver-command --poke has been removed.
+    Closes: #610155.
+
  -- Per Olofsson <pelle@debian.org>  Tue, 08 Nov 2011 00:09:18 +0100
 
 xdg-utils (1.1.0~rc1-2) unstable; urgency=low
diff --git a/debian/control b/debian/control
index a5b89be..bf61964 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,8 @@ Homepage: http://portland.freedesktop.org/
 Package: xdg-utils
 Architecture: all
 Depends: ${misc:Depends}
-Recommends: libfile-mimeinfo-perl, x11-utils, x11-xserver-utils
+Recommends: libfile-mimeinfo-perl, libnet-dbus-perl, libx11-protocol-perl,
+ x11-utils, x11-xserver-utils
 Suggests: gvfs-bin
 Description: desktop integration utilities from freedesktop.org
  xdg-utils contains utilities for integrating applications with the
diff --git a/debian/patches/series b/debian/patches/series
index 370bb95..7574299 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ xdg-mime-generic-use-mimetype.diff
 bashisms.diff
 xdg-open-browser-multiword.diff
 xdg-open-printf.diff
+xdg-screensaver-new-gnome.diff
diff --git a/debian/patches/xdg-screensaver-new-gnome.diff b/debian/patches/xdg-screensaver-new-gnome.diff
new file mode 100644
index 0000000..1a78c76
--- /dev/null
+++ b/debian/patches/xdg-screensaver-new-gnome.diff
@@ -0,0 +1,70 @@
+Description: Use DBus API for GNOME since gnome-screensaver-command --poke
+	has been removed
+Author: Ben Hutchings <ben@decadent.org.uk>
+Bug: http://bugs.debian.org/610155
+
+--- xdg-utils.orig/scripts/xdg-screensaver
++++ xdg-utils/scripts/xdg-screensaver
+@@ -762,15 +762,55 @@
+ 
+ screensaver_gnome_screensaver()
+ {
+-# TODO
+-# There seems to be a DBUS interface for gnome-screensaver
+-# See http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-April/042579.html and
+-# http://cvs.gnome.org/viewcvs/gnome-screensaver/src/gs-listener-dbus.c?rev=1.36&view=log
+-# A problem seems to be that Inhibit is tied to the lifetime of the DBUS appname and
+-# this can not be used from a script
+     case "$1" in
+         suspend)
+-        screensaver_suspend_loop gnome-screensaver-command --poke
++        perl -e '
++use strict;
++use warnings;
++use IO::File;
++use Net::DBus;
++use X11::Protocol;
++
++my ($window_id, $screensaver_file) = @ARGV;
++
++# Find window name to pass to session manager.
++my $x = X11::Protocol->new();
++my $named_window_id = hex($window_id);
++my $window_name;
++while (1) {
++  ($window_name) = $x->GetProperty($named_window_id, $x->atom("WM_NAME"),
++				   $x->atom("STRING"), 0, 1000, 0);
++  last if defined($window_name) && $window_name ne "";
++  (undef, $named_window_id) = $x->QueryTree($named_window_id);
++  if (!defined($named_window_id)) {
++    $window_name = "?";
++    last;
++  }
++}
++
++# Inhibit idle detection (flags = 8) with window name and ID.
++# We have no reason so just send the window name again.
++my $bus = Net::DBus->session();
++my $sm_svc = $bus->get_service("org.gnome.SessionManager");
++my $sm = $sm_svc->get_object("/org/gnome/SessionManager",
++			     "org.gnome.SessionManager");
++$sm->Inhibit($window_name, hex($window_id), $window_name, 8);
++
++# Wait until removed from the status file.
++while (1) {
++  sleep(10);
++  my $status = new IO::File($screensaver_file, "r")
++    or exit 0;
++  my $found;
++  while (<$status>) {
++    if (/^$window_id:/) {
++      $found = 1;
++      last;
++    }
++  }
++  exit 0 unless $found;
++}
++' $window_id $screensaver_file &
+         result=0
+         ;;
+ 
-- 
1.7.7.3


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Per Olofsson <pelle@debian.org>:
Bug#610155; Package xdg-utils. (Sun, 20 Nov 2011 16:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Per Olofsson <pelle@dsv.su.se>:
Extra info received and forwarded to list. Copy sent to Per Olofsson <pelle@debian.org>. (Sun, 20 Nov 2011 16:48:03 GMT) Full text and rfc822 format available.

Message #65 received at 610155@bugs.debian.org (full text, mbox):

From: Per Olofsson <pelle@dsv.su.se>
To: Ben Hutchings <ben@decadent.org.uk>, 610155@bugs.debian.org
Subject: Re: Bug#610155: [PATCH v2] xdg-screensaver: Use DBus API for GNOME
Date: Sun, 20 Nov 2011 17:44:36 +0100
On 2011-11-20 08:26, Ben Hutchings wrote:
> gnome-screensaver-command --poke has been removed.  Closes: #610155.
> ---
> Second try - this copes with callers that pass the window ID for a child
> window without a name (which VLC does).

Thanks a lot! Applied and uploaded.

-- 
Pelle




Reply sent to Per Olofsson <pelle@debian.org>:
You have taken responsibility. (Sun, 20 Nov 2011 16:51:07 GMT) Full text and rfc822 format available.

Notification sent to Frederik Himpe <fhimpe@telenet.be>:
Bug acknowledged by developer. (Sun, 20 Nov 2011 16:51:08 GMT) Full text and rfc822 format available.

Message #70 received at 610155-close@bugs.debian.org (full text, mbox):

From: Per Olofsson <pelle@debian.org>
To: 610155-close@bugs.debian.org
Subject: Bug#610155: fixed in xdg-utils 1.1.0~rc1-3
Date: Sun, 20 Nov 2011 16:49:32 +0000
Source: xdg-utils
Source-Version: 1.1.0~rc1-3

We believe that the bug you reported is fixed in the latest version of
xdg-utils, which is due to be installed in the Debian FTP archive:

xdg-utils_1.1.0~rc1-3.debian.tar.gz
  to main/x/xdg-utils/xdg-utils_1.1.0~rc1-3.debian.tar.gz
xdg-utils_1.1.0~rc1-3.dsc
  to main/x/xdg-utils/xdg-utils_1.1.0~rc1-3.dsc
xdg-utils_1.1.0~rc1-3_all.deb
  to main/x/xdg-utils/xdg-utils_1.1.0~rc1-3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 610155@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Per Olofsson <pelle@debian.org> (supplier of updated xdg-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 20 Nov 2011 17:38:38 +0100
Source: xdg-utils
Binary: xdg-utils
Architecture: source all
Version: 1.1.0~rc1-3
Distribution: unstable
Urgency: low
Maintainer: Per Olofsson <pelle@debian.org>
Changed-By: Per Olofsson <pelle@debian.org>
Description: 
 xdg-utils  - desktop integration utilities from freedesktop.org
Closes: 610155 647791 647794
Changes: 
 xdg-utils (1.1.0~rc1-3) unstable; urgency=low
 .
   [ Per Olofsson ]
   * Remove debian/patches/xserver-blanking.diff, already applied
     upstream. Thanks to Tanguy Ortolo for spotting this.
     Closes: #647794.
   * Add patch xdg-screensaver-check-gnome.diff: Use DBus API to check if
     gnome-screensaver is running, as gnome-screensaver-command no longer
     returns correct exit status. Thanks to Tanguy Ortolo for noticing
     this. Closes: #647791.
 .
   [ Ben Hutchings ]
   * Add patch xdg-screensaver-new-gnome.diff: Use DBus API for GNOME
     since gnome-screensaver-command --poke has been removed.
     Closes: #610155.
Checksums-Sha1: 
 807faf74ffe6e686e3e2133e73e11b8cad8c364a 1271 xdg-utils_1.1.0~rc1-3.dsc
 6086da188a99022768d171669a18e55b847fc28e 9317 xdg-utils_1.1.0~rc1-3.debian.tar.gz
 bd782d0aa141fd0ee0de20df7c8211dab381ca81 70844 xdg-utils_1.1.0~rc1-3_all.deb
Checksums-Sha256: 
 6bc5c62c74e5cef205234533f95d7e7dfa4818f64a4aeb34fe1dfc839ee88421 1271 xdg-utils_1.1.0~rc1-3.dsc
 b3cdc29d71a929b98a35f3af17e4724b9acb92530e2bbeb4ae4822e6586ef006 9317 xdg-utils_1.1.0~rc1-3.debian.tar.gz
 249e6757c2006c6b90ccca44bcf725b9800e93117a157050ee8bbe4e68e9981d 70844 xdg-utils_1.1.0~rc1-3_all.deb
Files: 
 e17224b98e7f93a4e8c261c7f4fb9617 1271 utils optional xdg-utils_1.1.0~rc1-3.dsc
 ed797498e1ce309e210f4f9ae490228c 9317 utils optional xdg-utils_1.1.0~rc1-3.debian.tar.gz
 0fe9c1228fa166a4213437a0ac5f28ed 70844 utils optional xdg-utils_1.1.0~rc1-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk7JLWkACgkQeDAsS42/7C9ifwCfc0fO3lUIjwUP6zoNYi38ogpC
Dl4AoLnvlvDI5TJXKymtaNrg53TZkKm4
=jyoO
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 29 Dec 2011 07:36:08 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 03:35:34 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.