July 19, 2008
Electric Sheep Beta playing nice with mplayer and xscreensaver on Fedora 8 LinuxI'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:
# 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
if [[ -z $(ps -ef | grep electricsheep | grep -v grep) ]] ; then
# echo "suppressing";
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.
CommentsProvide your email address when commenting and Gravatar will provide general portable avatars, and if you haven't signed up with them, a cute procedural avatar with their implementation of Shamus Young's Wavatars.
Comments have now been turned off for this post