so i have upgraded to Ubuntu 12.10 and i installed smplayer from the repositories. The thing is when i play a movie (even in full screen) the screen saver comes up. I have to disable screensaver enabled in smplayer but it doesn't seem to work

apt-cache policy mplayer
  Installed: 2:1.0~rc4.dfsg1+svn34540-1ubuntu2
  Candidate: 2:1.0~rc4.dfsg1+svn34540-1ubuntu2
  Version table:
 *** 2:1.0~rc4.dfsg1+svn34540-1ubuntu2 0
        500 http://pt.archive.ubuntu.com/ubuntu/ quantal/universe amd64 Packages
        100 /var/lib/dpkg/status

apt-cache policy gnome-screensaver
  Installed: 3.6.0-0ubuntu2
  Candidate: 3.6.0-0ubuntu2
  Version table:
 *** 3.6.0-0ubuntu2 0
        500 http://pt.archive.ubuntu.com/ubuntu/ quantal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.6.0-0ubuntu1 0
        500 http://pt.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages

Any ideas?


The -p option doesn't exist anymore.

Its a bug in gnome-screensaver. http://lists.mplayerhq.hu/pipermail/mplayer-users/2012-November/085566.html

| improve this answer | |
  • It's not a bug in gnome-screensaver, they removed the functionality as it's handled in gnome-session now. Mplayer should use DBUS to inhibit the screensaver. – ko-dos Nov 15 '12 at 12:19

first install xdotool Then add to mplayer config or comand line

heartbeat-cmd="xdotool key shift"

This will send shift key press and release as code above but using xdotool.

| improve this answer | |

I am not sure whether smplayer reads ~.mplayer/config, but you need to

sudo apt-get install libxtst-dev

(maybe more, I had some developement packages already installed)

paste this into a file called sendXshift.c

/* program to send shift-down, shift-up through X test extension to indicate that the X session isn't idle */

#include <stdio.h>
#include <stdlib.h>

#include <X11/Xlib.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/XTest.h>

int main(){
  Display *dpy;
  Status stat;
  int i1,i2,i3,i4;
  Bool stat1;`

  dpy = XOpenDisplay(NULL);

  if (dpy == NULL){
    printf("open display failed\n");

  stat1 = XTestQueryExtension(dpy,&i1,&i2,&i3,&i4);
  if (stat1 == 0){
printf("Xtest not supported\n");
  // shift down:
  // shift up:



And compile with cc -o sendXshift sendXshift.c -lX11 -lXtst, make it executable and then put heartbeat-cmd="/PATH/TO/COMPILED/FILE/sendXshift".

This should do until/if http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1887 isi solved.

| improve this answer | |

My guess is this: gnome-screensaver removed the "poke" argument.

Mplayer however tries to poke the screensaver via

heartbeat-cmd="gnome-screensaver-command -p"

and fails.

I'm not sure how to proceed, setting the hearbeat command to

heartbeat-cmd="gnome-screensaver-command --exit"

would disable the screensaver for the whole session.

It may be best to install xscreensaver instead. Or use DBUS to inhibit the screensaver. For gnome-shell there are extensions to pause the screensaver manually.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.