Inhibit gnome-screensaver

I want to inhibit gnome-screensaver from starting while I run mplayer.   There is a command "gnome-screensaver-command --inhibit" which should work but even with that running I still have gnome-screensaver starting.  I also can't get any dbus based commands/scripts to stop it. 
I am running XFCE.  Does that command work other XFCE users? How about GNOME users?

Allan wrote:
I want to inhibit gnome-screensaver from starting while I run mplayer.   There is a command "gnome-screensaver-command --inhibit" which should work but even with that running I still have gnome-screensaver starting.  I also can't get any dbus based commands/scripts to stop it. 
I am running XFCE.  Does that command work other XFCE users? How about GNOME users?
Though I use xscreensaver, I just installed gnome-screensaver to see what was up. I tested your python DBUS script, and it seems to work fine here. The inhibit cookie is being created (I threw in a print statement just to see the value), and it is being observed until the selected video finishes. As soon as the video finishes, mplayer exits and the screensaver kicks in as expected.
I'm not sure why you are getting different results, but you can run this from the command line or in a script as it might be helpful for testing:
dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.Inhibit string:"MPlayer" string:"Watching video"
It's pretty much the command-line version of what you have in your python DBUS-object code.
By the way, I only passed the 'file' argument to the script when testing, meaning I did not pass mplayer any other options via the python script. I don't know if that is relevant or not.
The gnome-screensaver command-line worked as well:
gnome-screensaver-command -i -n mplayer -r test
MPlayer used to have a command that simulated activity (−heartbeat−cmd) but it doesn't seem to be available anymore (at least not in the Arch version). Also, if you used xscreensaver, MPlayer's '-stop-xscreensaver' command is available.
Of course other alternatives could include simply killing gnome-screensaver and then restarting it via a script, though that may not be as elegant as using built-in commands or DBUS signals.
Edit:
Tested with gnome + openbox here. I only have XFCE-WM4 installed (not the full XFCE desktop) and I didn't test that yet.
Last edited by MrWeatherbee (2008-01-24 15:06:25)

Similar Messages

  • Mplayer doesn't stop gnome screensaver

    Hi !
    I'm using the option stop-xscreensave="yes" in mplayer config but after about 5 minutes of playing the movie the screen fades away and i have to login in order to get to mplayer again
    How can i stop this from happening ?
    Thanks a lot !

    Here's my tv watching script.. 
    #!/bin/sh
    # inhibit the screensaver and output to the tv (display 0.2)
    # gnome-screensaver-command -i -r "Watching Videos" &
    xscreensaver-command -exit
    DISPLAY=:0.2 mplayer -fs "$@"
    # killall gnome-screensaver-command
    xscreensaver -no-splash &
    You'ld probably want something more like
    #!/bin/sh
    # inhibit the screensaver and output to the tv
    gnome-screensaver-command -i -r "Watching Videos" &
    mplayer -fs "$@"
    killall gnome-screensaver-command
    Not sure if it is the most efficient way, but I believe it worked.
    You would just copy that to a file named tv.sh (or tv or watch or foo), make the file executable (chmod 755 tv.sh), put it in your path somewhere (/usr/local/bin if that's in your path), and then type tv.sh filename  to start watching  (but I imagine you already knew all that).
    If you use a graphical player.  I dunno.  The player might have an option?  Or else just run the `gnome-screensaver-command -i -r "Watching Videos"` part in a term and kill it when your done.  Or run it from an Alt-F2 dialog with & and kill it when your done might work.  Something to tinker with..

  • Gnome-screensaver doesn't autolock the screen in gnome 2.26 in testing

    Under gnome 2.26 in testing, gnome screensaver no longer auto locks the screen after the specified time. The screensaver doesn't even come up either. I have to manually switch off the monitor.
    Anyone else seeing this bug? How can I find out what's going wrong?
    Last edited by hussam (2009-03-31 04:46:48)

    Just start gnome-screensaver on a terminal (it starts up in daemon mode by default).
    That's it.For a test you can set screensaver time to 1 min.
    A random discovery I am happy for
    Last edited by nema.arpit (2010-01-11 17:28:09)

  • GNOME screensaver won't start!@!$%

    for some time now I have not been able to launch gnome-screen-saver, either from a gnome-panel or from the command line.  from the command line one sees the following error:
    ** (gnome-screensaver:2468): WARNING **: Failed to get session presence proxy: Could not get owner of name 'org.gnome.SessionManager': no such name
    I suspect that whatever is causing the problem (presumably with gnome-session) is also causing loss of update sounds in terminal windows (i.e.  pine getting a new message in the inbox used to play a system beep sort of sound, now does nothing.)  I don't care so much about the gnome screensaver, but the window sounds are incredibly useful and I'd really like to get them back.

    for some time now I have not been able to launch gnome-screen-saver, either from a gnome-panel or from the command line.  from the command line one sees the following error:
    ** (gnome-screensaver:2468): WARNING **: Failed to get session presence proxy: Could not get owner of name 'org.gnome.SessionManager': no such name
    I suspect that whatever is causing the problem (presumably with gnome-session) is also causing loss of update sounds in terminal windows (i.e.  pine getting a new message in the inbox used to play a system beep sort of sound, now does nothing.)  I don't care so much about the gnome screensaver, but the window sounds are incredibly useful and I'd really like to get them back.

  • Gnome-screensaver 2.30.0-1 : Can't unlock the screen

    Starting about two weeks ago, I haven't been able to unlock my screen after the screensaver kicks in.  When I move the mouse, the desktop background image flashes for a split second, the mouse cursor is visible, and then the screensaver resumes: the prompt to unlock the screen never appears.  The only way to get back to the desktop is to kill gnome-screensaver.  I've tried re-installing it, and all of it's dependancies (with the exception of libgl as it conflicts with the nvidia package).  As I expected, no luck there, but I didn't know what else to do...
    Here's the output of "gnome-screensaver --no-daemon --debug"
    http://pastebin.com/1B4UZaDj
    I don't know if this helps, but here's some interesting output from LD_DEBUG=libs gnome-screensaver:
    7559: /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so: error: symbol lookup error: undefined symbol: g_module_unload (fatal)
    7559: /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so: error: symbol lookup error: undefined symbol: gtk_module_display_init (fatal)
    7559: /usr/lib/gtk-2.0/2.10.0/engines/libpixmap.so: error: symbol lookup error: undefined symbol: g_module_unload (fatal)
    7559: /usr/lib/gio/modules/libgvfsdbus.so: error: symbol lookup error: undefined symbol: g_module_check_init (fatal)
    7559: /usr/lib/gio/modules/libgvfsdbus.so: error: symbol lookup error: undefined symbol: g_module_unload (fatal)
    I hope that doesn't steer anyone in the wrong direction; I just learned about LD_DEBUG last night so I don't know if it's of any help. 
    Any help will be appreciated.

    My gtk2 was already up to date (gtk2 2.20.1-2).  I tried removing it, re-installing it, and then running ldconfig, but the issue is still present.

  • Gnome-screensaver && slim archlinux theme

    Hi all,
    I'm using SLIM + the archlinux theme as my login manager. I like the very simple but beautifull layout.
    As screensaver (read: as window-lock-application) I'm using xscreensaver, but I'm tired of the ugly interface. I mean, we live in 2009, not back in the nineties where those ugly interfaces were a common thing! Gnome-screensaver is a better-looking screensaver/screenlocker, but with the background and the grey login window + buttons it's still not that nice.
    As you all can guess; is there a way to get gnome-screensaver having an interface just like the SLIM loginmanager + archlinux theme? The black screen + nice logo + just a simple password-field?
    I would love this!
    Regards

    Wonder is likely correct; these are tumultuous times for GNOME fans.  If KDE fans thought they had it bad during the transition to version 4, in many ways I think the jump to GNOME 3 and gnome-shell has been even more severe. With KDE, many of missing features were at least expected to be reinstated in subsequent versions; for GNOME 3, many of the features, as we know them, will simply disappear.
    Last edited by thayer (2011-05-29 17:17:20)

  • Mplayer and gnome-screensaver

    How do I disable gnome-screensaver while mplayer is running?  I did a google search and found  http://bugs.archlinux.org/task/5371 which says it should be happening already...

    Yeah, that annoys me, too. I just looked arround  after reading you post and found in ~/.mplayer/gui.conf to set
    stopxscreensaver = "yes"
    seems fixed it half. The screensaver doesn't start, but before not starting he fades out anyway
    But i don't want to disable the fadeout, because i find it useful on other occasions.
    Edit: some collateral Damage -- the screensaver doesn't start anymore although mplayer isn't running anymore (but it still fades out ). Perhaps X restart fixes this, will try later.
    Last edited by kakTuZ (2007-11-14 21:01:16)

  • Gnome screensaver

    I just installed gnome-screensaver and it seemed to set up just fine. Hoiwever, it does not come on at the specified inactive period irrespective of which particular flavor I am using. Any suggestions?

    Do you have a user session of dbus running? If not, try changing "exec gnome-session" to "exec dbus-launch --exit-with-session gnome-session" in your .xinitrc, or putting this (ripped right from the dbus-launch man page) in your .bashrc:
    if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`
    echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
    fi
    (The third line is optional.)
    GDM launches a dbus session without any configuration though, so if you use GDM the problem must be something else.

  • Gnome-screensaver "leave message" button gone?

    A recent update seems to have removed the "leave message" feature from the screen lock dialog box of gnome-screensaver.  Was this removed on purpose, and if so, whose decision was it?  Vengeance shall be mine.
    Last edited by futuremonkey (2010-08-25 04:29:31)

    I still have there too
    gnome-screensaver 2.30.0-2

  • Gnome-screensaver ignores input when fading to black

    Hi,
    I'm experiencing the following bug:
    https://bugzilla.gnome.org/show_bug.cgi?id=594082
    It looks like it's now fixed in Fedora. Anyone having the same problem?
    Thanks.

    Fair enough but it's not clear from that if it got fixed by a Fedora dev or upstream... either way, bug reports should go to gnome-screensaver bugzilla.
    Also see this:
    https://bugzilla.redhat.com/show_bug.cgi?id=629419
    https://bugzilla.redhat.com/show_bug.cgi?id=626472
    Would be nice to know if Fedora applied any patches in F11, but I don't get where to look that up atm (stopped here.
    Something else, what graphics are you using? nvidia proprietary here.
    typo
    Last edited by hokasch (2010-09-03 13:34:12)

  • Can't unlock gnome-screensaver, dialog won't come up.

    Hi all,
    I'm having an issue with gnome-screensaver, when the computer locks, it won't unlock, 4 times out of 5. The unlock dialog never appears, it acts as if I don't even send any input. In order to get past the screensaver, I need to switch to tty1, log in, and killall gnome-screensaver. It does occasionally give me the unlock dialog, and I'm not sure why it does that 20% of the time. My issue seems to be a duplicate of this, although I don't want to bump an old thread.
    $ gnome-screensaver --debug --no-daemon 2>&1 | tee gnome-screensaver.txt
    http://pastebin.com/aZmLK3yF
    Edit: I should say, this started a few weeks ago, seemingly without reason; I was using gnome-screensaver 2.30.0-?, but yesterday pacman updated gnome-screensaver to 2.30.0-5, and this issue is still occurring.
    Any help or suggestions would be appreciated.
    Last edited by sargk (2010-09-29 15:16:39)

    Ok, so does it only happen when it times out or if you issue the command xscreensaver-command -lock?
    Which screensaver do you have running?
    I was just thinking that perhaps another program is being run when the screensaver activates that is stealing that focus from the screensaver. 
    I know that there are some that you have to move the mouse to a certain corner or press a certain key combination in order for it to release it's lock.  (can't think of any names though. )

  • How does one configure gnome-screensaver under xfce4

    How does one set the time delay of inactivity gnome-screensaver should wait before activating under xfce4?

    How does one set the time delay of inactivity gnome-screensaver should wait before activating under xfce4?

  • Fglrx-utils is a dep. of gnome-screensaver ?!

    Hey There,
    I'm trying to upgrade to GNOME 2.20 but it requires installing fglrx-utils since gnome-screensaver's dependencies require it.. I'm a nVidia user by the way.. :S

    scj wrote:Is it possible to use to query which packages provide package X?
    Hm, not directly, but if you do a search for the provision:
    $ pacman -Ss ^libgl$
    extra/fglrx-utils 8.40.4-1
    Proprietary AMD/ATI userspace tools and libraries for Radeon brand cards.
    extra/libgl-dri 6.5.2-1
    Mesa DRI OpenGL library and drivers
    extra/nvidia-71xx-utils 1.0.7185-1
    NVIDIA legacy drivers utilities and libraries, 71xx branch.
    extra/nvidia-96xx-utils 1.0.9639-1
    NVIDIA legacy drivers utilities and libraries, 96xx branch.
    extra/nvidia-utils 100.14.11-1
    NVIDIA drivers utilities and libraries.
    Everything that provides libgl shows up, but it doesn't really explain why.  I think a bit of extra info in the search results was planned (I remember a thread about it...)

  • [SOLVED]Gnome-screensaver not kicking in

    Hi, since the recent update gnome-screensaver hasn't been kicking in.
    I can lock my screen with gnome-screensaver-command -l manually and I see that the gnome-screensaver process is running but it just won't activate itself after 5 minutes. I can leave my computer on for an hour and the screensaver doesn't kick in.
    Does anyone else experience this ?
    Last edited by moljac024 (2009-01-28 13:41:20)

    I have ocassional locks when trying to unlock the screensaver. The solution for me is to kill this application.
    It seems that the application has problems with libgnomekdbui. Having a look at /var/log/everything.log shows me lines like this:
    Dec 3 17:32:01 t23 gnome-screensav[16328]: segfault at 11 ip b7d679c6 sp bfc329f0 error 4 in libgnomekbdui.so.3.0.0[b7d61000+f000]
    Dec 3 17:32:02 t23 gnome-screensav[16329]: segfault at 19 ip b7d4a9c6 sp bf814dd0 error 4 in libgnomekbdui.so.3.0.0[b7d44000+f000]
    Dec 3 17:32:04 t23 gnome-screensav[16330]: segfault at 19 ip b7d3a9c6 sp bfe053c0 error 4 in libgnomekbdui.so.3.0.0[b7d34000+f000]
    Dec 3 17:32:04 t23 gnome-screensav[16333]: segfault at 19 ip b7ea29c6 sp bf86f630 error 4 in libgnomekbdui.so.3.0.0[b7e9c000+f000]
    Dec 3 17:32:05 t23 gnome-screensav[16334]: segfault at 19 ip b7e4e9c6 sp bfe1bbe0 error 4 in libgnomekbdui.so.3.0.0[b7e48000+f000]
    Dec 3 17:32:06 t23 gnome-screensav[16335]: segfault at 11 ip b7e529c6 sp bfe1fbe0 error 4 in libgnomekbdui.so.3.0.0[b7e4c000+f000]
    Dec 3 17:32:06 t23 gnome-screensav[16336]: segfault at 19 ip b7e979c6 sp bfb64120 error 4 in libgnomekbdui.so.3.0.0[b7e91000+f000]
    Dec 3 17:32:07 t23 gnome-screensav[16337]: segfault at 19 ip b7f2d9c6 sp bfcf8ac0 error 4 in libgnomekbdui.so.3.0.0[b7f27000+f000]
    Dec 3 17:32:07 t23 gnome-screensav[16338]: segfault at 19 ip b7d399c6 sp bf8045c0 error 4 in libgnomekbdui.so.3.0.0[b7d33000+f000]
    Dec 3 17:32:08 t23 gnome-screensav[16339]: segfault at 19 ip b7f009c6 sp bfccda90 error 4 in libgnomekbdui.so.3.0.0[b7efa000+f000]
    Do you maybe have something similar?
    Last edited by ss2 (2008-12-03 17:21:07)

  • Gnome screensaver crashes on gnome startup

    Hi,
    As soon as gnome starts up Gnome Screensaver crashes.  Gnome is versions 2.20.3.
    Any ideas?
    Adam
    Last edited by AP81 (2008-03-09 23:43:37)

    Fixed by adding dbus to my DAEMONS.
    I thought that Gnome automatically started dbus.

Maybe you are looking for

  • Itunes wont connect to the store using proxy

    Ok so here is whats happening, we have a proxy server that requires authentication for the users to access the internet. this is done through an auto configuration script, after doing a diagnostic and seeing itunes said it wasnt using a proxy i assum

  • Report in SAP that shows me the fixed assets per vendor

    Hi, I have been asked to produce the following; Can I run a report in SAP that shows me the fixed assets per vendor? I need the detail of the depreciations (start and end date, purchase price, depreciation rate, methodu2026) and the fixed assets regi

  • Belle update,now pink screen

    I know of the N8 pink screen problem and it only  mildly affected my N8 under pr1.1,the Anna update, but after updating to the officially released Belle  609 it now suffers quite badly from the pink screen (greys are pink). Although it does not reall

  • How to transfer chat history in Skype?

    Hi guys, I've bought a new computer and I want to transfer my all chat history to it. I've chat running with 25 friends for almost 5 years now. So my chat history is extremely extensive and I need to transfer them all!It's very important for me. How

  • How do i transfer ebook to new computer

    I've been issued a new computer at work and need to transfer e-book from old to new.  The e-book is for a course that I'm doing.  I can't seem to find instructions for doing this.  I've authorised both computers but in the process of authorising the