Hi All
I have a series of digital photos taken with my camera using a time delay of 1 min over two hours.
I would like to use these as a changing screen background on a 2 hour loop. I know how to change the background using the menu system, but I think I need to use a script to do what I want.
Does anyone know of a program to change the background or the file where the background picture file name is stored, so I can change it every min?
Thanks
Laurence
Laurence Orchard wrote:
Hi All
I have a series of digital photos taken with my camera using a time delay of 1 min over two hours.
I would like to use these as a changing screen background on a 2 hour loop. I know how to change the background using the menu system, but I think I need to use a script to do what I want.
Does anyone know of a program to change the background or the file where the background picture file name is stored, so I can change it every min?
xsetroot will change the bacground image of the root (background) window of X. "man xsetroot" for info. ---------------------------------------------------------------------- - Rick Stevens, Senior Systems Engineer rstevens@vitalstream.com - - VitalStream, Inc. http://www.vitalstream.com - - - - Warning: You are logged into reality as the root user... - ----------------------------------------------------------------------
I run ~/.gnome2/nautilus-scripts/changebg every ten minutes from cron as myself (source below). Just change the two default variables and chmod 755. Good luck.
-- Travis
#!/bin/sh # # changebg # # Place this script in # ~/.gnome2/nautilus-scripts/ # # you can then call it at you leisure or # add it to a cron job to be run by # your user
DEFAULT_WALLPAPER_DIR="/mnt/mm/data/dump/pics" DEFAULT_MIN_SIZE=50k
# TODO: and condition to allow user to # override default values by passing values # the command line WALLPAPER_DIR=${DEFAULT_WALLPAPER_DIR} MIN_SIZE=${DEFAULT_MIN_SIZE}
FILES_FOUND=`find "${WALLPAPER_DIR}" -size +${MIN_SIZE} -and -name '*.jpg' | wc -l` echo "****************************" echo "* *" echo "* ${FILES_FOUND} were found" echo "* *" echo "****************************" RANDOM_NUMBER=$(( ${RANDOM} % ${FILES_FOUND} +1 )) RANDOM_FILE=`find "${WALLPAPER_DIR}" -size +${MIN_SIZE} -and -name '*.jpg' | head -n ${RANDOM_NUMBER} | tail -1` echo "* *" echo "* Setting ${RANDOM_FILE}" echo "* *" echo "****************************" gconftool-2 -s /desktop/gnome/background/picture_filename -t string "${RANDOM_FILE}"
# TODO # implement '-size' '-path' '-bg' and '--help' parameters # support multiple paths # support center, stretch, etc
On Wed, 30 Jun 2004 14:01:36 -0700, Rick Stevens rstevens@vitalstream.com wrote:
Laurence Orchard wrote:
Hi All
I have a series of digital photos taken with my camera using a time delay of 1 min over two hours.
I would like to use these as a changing screen background on a 2 hour loop. I know how to change the background using the menu system, but I think I need to use a script to do what I want.
Does anyone know of a program to change the background or the file where the background picture file name is stored, so I can change it every min?
xsetroot will change the bacground image of the root (background) window of X. "man xsetroot" for info.
- Rick Stevens, Senior Systems Engineer rstevens@vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
-Warning: You are logged into reality as the root user... -
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
On Wednesday 30 June 2004 16:07, Laurence Orchard wrote:
Hi All
I have a series of digital photos taken with my camera using a time delay of 1 min over two hours.
I would like to use these as a changing screen background on a 2 hour loop. I know how to change the background using the menu system, but I think I need to use a script to do what I want.
Does anyone know of a program to change the background or the file where the background picture file name is stored, so I can change it every min?
Thanks
Laurence
If you're using KDE you can set up for multiple background images, in your case all 120, and simply have them loop through changing them once a minute. I don't know if there's a similar setup for GNOME though....
Regards, Mike Klinke
Laurence Orchard wrote:
Hi All
I have a series of digital photos taken with my camera using a time delay of 1 min over two hours.
I would like to use these as a changing screen background on a 2 hour loop. I know how to change the background using the menu system, but I think I need to use a script to do what I want.
Under GNOME, try putting something like this in your (user) crontab:
#!/bin/bash # rotate the backdrop in X
PIC_DIR=/mnt/data/Pictures/Backdrop
cd $PIC_DIR || exit CHOICE=$(expr $RANDOM * $(ls 2>/dev/null | wc -l ) / 32768 + 1) PICTURE=$(ls 2>/dev/null | tail -n $CHOICE | head -1)
nice -20 gconftool-2 --type=string \ --set /desktop/gnome/background/picture_filename "$PIC_DIR/$PICTURE"
Note: that \ on the penultimate line must be right at the end of the line (no further spaces or tabs). Obviously, you replace PIC_DIR's value with where you keep your pictures.
HTH,
James.