Xwinwrap is a great tool, designed for use with the beryl window management system for making movies run in mplayer or screensavers from xscreensaver run as your background.
electricsheep is a screensaver which creates and shares different patterns via bittorrent, some of these patterns look very nice and some people want to be able to use them with xwinwrap's screensaver setting.
I am basing my work off of this thread: (xgl desktop screensaver script)
Currently this has been tested on my i386 ubuntu edgy eft system, using an nvidia graphics card, aiglx and beryl. I don't see any reason why this shouldn't work on any other of the architectures though. I will not handle support for getting your beryl working, I will assume you have already got it working on your own. This method will work by changing electricsheep so it uses the mplayer engine to play its files.
I'd suggest you take a look at the above link first, however it is not necessary.
First you will need to add the multiverse ubuntu repository to install mplayer.
and then add the linesCode:sudo gedit /etc/apt/sources.list
Code:deb http://au.archive.ubuntu.com/ubuntu/ edgy multiverse deb-src http://au.archive.ubuntu.com/ubuntu/ edgy multiverse
Second you will need to install xwinwrap, mplayer and electricsheep, so
after doing so you should be able to run electricsheep in a window, using the mplayer engineCode:sudo apt-get install electricsheep mplayer wget http://3v1n0.tuxfamily.org/pool/edgy/beryl-svn/xwinwrap_0.1+cvs20060209_i386.deb sudo dpkg -i xwinwrap_0.1+cvs20060209_i386.deb
Just a note, the electricsheep program requires mpg files to play, so you will have to let it download some via bittorrent or download some manually to your cache directory (~/.sheep/), a tutorial to do this manually can be found here
once you have electricsheep working, and if xwinwrap works as from the tutorial above, you should just be able to runCode:electricsheep --mplayer 1
and to closeCode:xwinwrap -ni -o 0.3 -fs -s -st -sp -b -nf -- /usr/bin/electricsheep --mplayer 1 -window-id WID &
The following script is based on the script in the link at the top of this tutorial.Code:killall electricsheep
I'm going to call the script xwinsheep, so we will first
then fill this into the file and saveCode:sudo gedit /usr/bin/xwinsheep
then just make the script executableCode:#!/bin/bash # # This script runs the electric sheep screensaver on your desktop, # and drops the name of the screensaver in a marker file. # When run a second time, it will kill the screensaver. # Requires xwinwrap to be installed. # Usage: xwinsheep <OPACITY> <NICENESS> # e.g "xwinsheep 0.3 10" will run it at 0.3 opacity # with a niceness value of 10. Just running "xwinsheep" will # run it at 1.0 opacity and 19 niceness. # dir to write marker file to DIR=~/ #Niceness to run screen saver at. The lower this value, the higher #priority the screensaver will be. The higher the value, the jerkier #the screensaver will be, and the less it will intefere with your #work NICENESS=$2 if [ -z "$2" ] then NICENESS=19 fi OPACITY=$1 if [ -z $1 ] then OPACITY=1.0 fi if [ -e $DIR.flipflopmarker2 ] then #shows that electric sheep is running via this script #kill it, remove the marker file killall electricsheep rm $DIR.flipflopmarker2 exit fi #start the screensaver, write the name of it to a file nice -n $NICENESS xwinwrap -ni -o $OPACITY -fs -s -st -sp -b -nf -- /usr/bin/electricsheep --mplayer 1 -window-id WID & touch $DIR.flipflopmarker2 exit
I hope this helps.Code:chmod 755 /usr/bin/xwinsheep



Adv Reply





Bookmarks