cannot inhibit gnome screensaver via gnome-screensaver-command

Bug #988949 reported by karl
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gnome-screensaver (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Inhibiting Screensaver via gnome-screensaver-command vanished, so it is not possible to prevent screensaver from locking unless deactivating via systemsettings which is laborious. Since youtube or skype do not inhibit screensaver by their own this option is important.

thx!
karl

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-screensaver 3.4.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Thu Apr 26 17:39:00 2012
EcryptfsInUse: Yes
GnomeSessionIdleInhibited: No
GnomeSessionInhibitors: None
GsettingsGnomeSession:
 org.gnome.desktop.session idle-delay uint32 180
 org.gnome.desktop.session session-name 'ubuntu'
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: gnome-screensaver
UpgradeStatus: Upgraded to precise on 2012-04-16 (9 days ago)
WindowManager: No value set for `/desktop/gnome/session/required_components/windowmanager'

Revision history for this message
karl (karl-sebastian-liebich) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-screensaver (Ubuntu):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Have you tried using xdg-screensaver to inhibit it?

Revision history for this message
karl (karl-sebastian-liebich) wrote :

this works, thank you!
Although it was way easier to use gnome-screensaver-command..

Revision history for this message
karl (karl-sebastian-liebich) wrote :

xdg-screensaver suspend does not work anymore here since 12.10 --

Revision history for this message
Danjones (goodevilgenius) wrote :

xdg-screensaver requires a windowid to suspend it. Once that window disappears, gnome-screensaver automatically resumes.

I was having a problem with mplayer not inhibiting gnome-screensaver, so I wrote this bash alias to inhibit it for mplayer:

alias xdg-screensaver-mplayer-suspend="xdg-screensaver suspend $(wmctrl -l | sed -nr 's/^(0x[0-9a-f]+).+mplayer.*/\1/p')"

Obviously, you also need wmctrl installed to use it. Whenever I have mplayer running, I just run xdg-screensaver-mplayer-suspend

You could do the same thing with skype:
alias xdg-screensaver-skype-suspend="xdg-screensaver suspend $(wmctrl -l | sed -nr 's/^(0x[0-9a-f]+).+skype.*/\1/ip')"

Or, if you have YouTube in a separate window:
alias xdg-screensaver-youtube-suspend="xdg-screensaver suspend $(wmctrl -l | sed -nr 's/^(0x[0-9a-f]+).+youtube.*/\1/ip')"

You would just put the command you want into ~/.bashrc

Yes, this is a big hassle, and gnome-screensaver-command should be fixed to support inhibit again, but it's a usable workaround for the time being.

Revision history for this message
Danjones (goodevilgenius) wrote :

Another option I just discovered would be something like this:
while true; do dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity; sleep 30; done

30 should be slightly less than your screensaver timeout (in seconds).

This wouldn't require a WindowID, and when you're done, just do a Ctrl-C to resume the screensaver.

Revision history for this message
karl (karl-sebastian-liebich) wrote :

thanks for your helpful comments, Danjones. But I used to apply xdg-screensaver to the root-window which is never closed although when logging out. I used:
xdg-screensaver suspend $(xwininfo -root | grep "Window id" | cut -d" " -f4)
and it worked wonderful till update to 12.10.

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.