xwinwrap is a cool utility that will allow you to run a screensaver or mpeg video on your desktop (root window). There are some issues with xwinwrap though. First, the command line to run it is impossibly long, and a PITA to type. Second, my screensaver of choice, electricsheep looks like hell with most wallpapers, so I like to run it without one.
There are other issues with xwinwrap, but the other issues are due to some incompatabilities between nautilus and xwinwrap. In metacity, this means that you cannot see your desktop icons.
In Beryl, this means that you will want to run the hack with a relatively high level of transparency (-o 0.11 is the parm that I use) , so desktop icons can be seen and used. This still leads to an issue with drag and drop onto the desktop, which doesn’t work, but otherwise xwinwrap works well and is stable.
Contrary to common wisdom, running xwinwrap does not suck up a significant amount of system resources. Like I said, I use electricsheep, which doesn’t create much of a cpu load, so your mileage can vary. On my system though, the combination of xwinwrap/electricsheep only takes about 6% of my cpu, and with “nice” it scales down easily. Since my cpu rarely runs over 60% (on a 3 year old AMD 3.8), the 4-5% isn’t significant.
I’ve written a script that will:
- Remove the current background and start xwinwrap, if xwinwrap is not running
- Restore the current background and kill xwinwrap, if xwinwrap is running
I use this script as a launcher on my gnome panel, so I can toggle my background between a wallpaper and xwinwrap. The script is currently hard coded to run the electricsheep screensaver hack. If you use xwinwrap, You can modify the script for whatever your preferred hack is by editing the xwinwrap_string.
#!/bin/bash
#
# xwinset.sh version 1.0
# Created: 3/23/07 by mugwump67
#
# This script will:
# turn on xwinwrap if it is off and set background option to 'none'
# turn off xwinwrap if it is on and set background option to stretched
#
# future enhancements
# Currently only switches between none and stretched
# - better to save all current background settings to config file and restore from there
# Add right-click integration with nautilus (i.e. click mpeg/hack to set)
#
#---------------------------
# outline:
#---------------------------
# If xwinwrap is running,
# shut off xwinwrap
# set background option to stretched
# If xwinwrap is off
# If current background is not "none"
# set current background to "none"
# start xwinwrap
# --------------------------
xwinwrap_string="nice -n 15 xwinwrap -ni -o 0.11 -fs -s -sp -st -b -nf -- /usr/bin/electricsheep --root 1 --nick mugwump67 --zoom 1 --max-megabytes 5000 -window-id WID"
# if xwinwrap is running,
if [ -n "$(ps | grep xwinwrap)" ]
then
# shut off xwinwrap, set backgound option to 'stretched'
killall xwinwrap
gconftool-2 --type string -s /desktop/gnome/background/picture_options stretched
else
# xwinwrap is off
# save current background option to 'none'
# set to 'none'
# start xwinwrap
gconftool-2 --type string -s /desktop/gnome/background/picture_options none
$xwinwrap_string &
fi
This is the first significant shell script that I’ve ever written, and its missing a few things because I couldn’t figure out how to do them yet (these are listed in future enhancements). Nonetheless, I hope others find it useful.
Recent Comments