{"id":292,"date":"2008-07-19T14:08:03","date_gmt":"2008-07-19T05:08:03","guid":{"rendered":"https:\/\/fugutabetai.com\/blog\/2008\/07\/19\/electric-sheep-beta-playing-nice-with-mplayer-and-xscreensaver-on-fedora-8-linux\/"},"modified":"2008-07-19T14:08:03","modified_gmt":"2008-07-19T05:08:03","slug":"electric-sheep-beta-playing-nice-with-mplayer-and-xscreensaver-on-fedora-8-linux","status":"publish","type":"post","link":"https:\/\/fugutabetai.com\/blog\/2008\/07\/19\/electric-sheep-beta-playing-nice-with-mplayer-and-xscreensaver-on-fedora-8-linux\/","title":{"rendered":"Electric Sheep Beta playing nice with mplayer and xscreensaver on Fedora 8 Linux"},"content":{"rendered":"<p>I&#8217;ve been a fan of <a href=\"http:\/\/www.electricsheep.org\/\">the Electric Sheep screensaver<\/a> for a long time, but I haven&#8217;t been running it lately.  <\/p>\n<p><P><\/p>\n<p>It turns out that there is now <a href=\"http:\/\/community.electricsheep.org\/node\/237\">a new linux version<\/a>, 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.  <\/p>\n<p><P><\/p>\n<p>The problem was a strange interaction with xscreensaver and mplayer.  I did a system update recently, and mplayer decided that the &#8220;stop-xscreensaver=1&#8221; setting in my ~\/.mplayer\/config stopped working.  That means every ten minutes while I&#8217;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.<\/p>\n<p><P><\/p>\n<p>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.  <\/p>\n<p><P><\/p>\n<p>The solution: a simple bash script that checks whether electricsheep is running.  If it is, it does nothing, otherwise it will call the &#8220;do not invoke the screensaver&#8221; command.  If anyone else is interested, here i the script:<\/p>\n<p><P><br \/>\n<code><br \/>\n<PRE><br \/>\n#!\/bin\/bash<br \/>\n#<br \/>\n# devans 2008-07-19<br \/>\n# This script will check to see if electricsheep is running, and if so, it will do nothing<br \/>\n# If it is not running, it will invoke xscreensave-command -deactivate to prevent xscreensaver<br \/>\n# from running.  Mostly this is useful is set as the command to call via heartbeat-cmd in<br \/>\n# ~\/.mplayer\/config<\/p>\n<p>if [[ -z $(ps -ef | grep electricsheep | grep -v grep) ]] ; then<br \/>\n#   echo \"suppressing\";<br \/>\n    xscreensaver-command -deactivate<br \/>\nfi<br \/>\n<\/PRE><br \/>\n<\/code><\/p>\n<p><P><\/p>\n<p>The whole thing works well if you put <code>heartbeat-cmd=\"~devans\/suppressXscreensaver.sh &\"<\/code> in your ~\/.mplayer\/config<\/p>\n<p><P><\/p>\n<p>So far the screensaver seems a bit unreliable.  It has trouble starting up sometimes and the screen just blanks.  I haven&#8217;t tracked down what the problem is, but when it works it is really beautiful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been a fan of the Electric Sheep screensaver for a long time, but I haven&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,5],"tags":[],"_links":{"self":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/posts\/292"}],"collection":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/comments?post=292"}],"version-history":[{"count":0,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/posts\/292\/revisions"}],"wp:attachment":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/media?parent=292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/categories?post=292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/tags?post=292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}