Electric Sheep Beta playing nice with mplayer and xscreensaver on Fedora 8 Linux

I’ve been a fan of the Electric Sheep screensaver for a long time, but I haven’t been running it lately.

It turns out that there is now a new linux version, so I thought I would try to install it on my home machine running Fedora 8. The source install went great, I already had all the prerequisites installed, so simple configure; make; make install went fine.

The problem was a strange interaction with xscreensaver and mplayer. I did a system update recently, and mplayer decided that the “stop-xscreensaver=1” setting in my ~/.mplayer/config stopped working. That means every ten minutes while I’m watching videos, the screensaver kicks in. So I switched to the alternative method of preventing the screensaver from starting up by using the heartbeat command to tell the screensaver not to start every 30 minutes.

That worked great. When I got around to installing Electric Sheep though, I found a problem: Electric Sheep uses mplayer to play the videos it creates. Mplayer tells the screensaver to not invoke. So while Electric Sheep worked fine from the command line, when run as a screensaver it would just quit immediately.

The solution: a simple bash script that checks whether electricsheep is running. If it is, it does nothing, otherwise it will call the “do not invoke the screensaver” command. If anyone else is interested, here i the script:




#!/bin/bash
#
# devans 2008-07-19
# This script will check to see if electricsheep is running, and if so, it will do nothing
# If it is not running, it will invoke xscreensave-command -deactivate to prevent xscreensaver
# from running. Mostly this is useful is set as the command to call via heartbeat-cmd in
# ~/.mplayer/config

if [[ -z $(ps -ef | grep electricsheep | grep -v grep) ]] ; then
# echo "suppressing";
xscreensaver-command -deactivate
fi


The whole thing works well if you put heartbeat-cmd="~devans/suppressXscreensaver.sh &" in your ~/.mplayer/config

So far the screensaver seems a bit unreliable. It has trouble starting up sometimes and the screen just blanks. I haven’t tracked down what the problem is, but when it works it is really beautiful.


Posted

in

,

by

Tags:

Comments

4 responses to “Electric Sheep Beta playing nice with mplayer and xscreensaver on Fedora 8 Linux”

  1. Scott Draves Avatar

    Hi, glad you like the new beta and happy to hear it’s working well for you. Alas we have a bit of a problem: there was a bug in the FLAM3 renderer CVS when you happened to compile from source. Please upgrade to the latest version 2.7.14 which is not available from CVS since we switched to SVN. Get it here: http://flam3.com/index.cgi?&menu=download Thanks! -Spot

  2. Scott Draves Avatar

    Oh, and then email me (see scottdraves.com), so I can unblock your IP# 🙂

  3. Fugu Avatar

    Wow, email from the Electricsheep creator himself. Cool.

    I’ve re-installed flam3 so hopefully that clears up the problem.

  4. Anonymous Avatar
    Anonymous

    mplayer -heartbit-cmd “gnome-screensaver-cmd –deactivate”
    or
    gmplayer -heartbit-cmd “gnome-screensaver-cmd –deactivate”

Leave a Reply

Your email address will not be published. Required fields are marked *