| View previous topic :: View next topic |
| Author |
Message |
pingp n00b

Joined: 12 Jul 2007 Posts: 11
|
Posted: Thu Jul 12, 2007 5:58 pm Post subject: Any wallpaper auto switcher plugin? |
|
|
Is there any wallpaper switch (gnome), which picks picture from a directory and set as wallpaper by every start or periodly?
PS. My gnome can not show normal JPEG file as background, only png, anyidea? |
|
| Back to top |
|
 |
desultory Administrator

Joined: 04 Nov 2005 Posts: 4648
|
Posted: Fri Jul 13, 2007 1:07 am Post subject: |
|
|
| pingp wrote: | | PS. My gnome can not show normal JPEG file as background, only png, anyidea? | Try rebuilding with the jpeg USE flag enabled, optionally also the jpeg2k and exif USE flags. |
|
| Back to top |
|
 |
misterbob05 Tux's lil' helper

Joined: 28 Apr 2007 Posts: 90
|
Posted: Fri Jul 13, 2007 1:52 am Post subject: |
|
|
i actually have it to where my system picks a random picture outta a file and displays it as the wallpaper when the system starts but im on fluxbox and i use feh i believe
just let me know if you want to lines i put in a config file and i will find it |
|
| Back to top |
|
 |
ZZamboni Tux's lil' helper


Joined: 16 Jan 2004 Posts: 96 Location: Zurich, Switzerland
|
Posted: Fri Jul 13, 2007 3:07 am Post subject: |
|
|
The script below is a variation of what I use (mine are for a dual-screen setup, so it picks two images and stitches them together). It picks a random file from the $IMGDIR directory, and sets it as the background.
I run it from cron every hour with something like this (use crontab -e to edit your cron file):
| Code: | | 0 * * * * DISPLAY=:0.0 $HOME/bin/randombg.sh |
Here's the randombg.sh script:
| Code: | #!/bin/bash
# Desktop environment or window manager being used (gnome, kde, wmaker)
DESKTOP=gnome
IMGDIR=$HOME/lib/images/screensaver_slides
function getrandomimg()
{
ls $IMGDIR | perl -e '@f=<>; print $f[int(rand($#f+1))]'
}
function setbg() {
FILE=$1
# Set the desktop image
case $DESKTOP in
gnome)
gconftool-2 -s /desktop/gnome/background/picture_filename -t string $FILE
;;
kde)
/usr/kde/3.5/bin/dcop kdesktop KBackgroundIface setWallpaper $FILE 2
;;
wmaker)
/usr/bin/wmsetbg -t $FILE
;;
*)
echo "Do not know how to set the background for $DESKTOP" >&2
;;
esac
}
# If a file is given as argument, just use it as the background,
# don't generate anything
if [ -f "$1" ]; then
IMG=$1
else
IMG=`getrandomimg`
fi
if [ ! -f "$IMG" ]; then
if [ -f "$IMGDIR/$IMG" ]; then
IMG="$IMGDIR/$IMG"
else
echo "Error: $IMG not found" >&2
exit 1;
fi
fi
setbg $IMG
exit 0 |
|
|
| Back to top |
|
 |
pingp n00b

Joined: 12 Jul 2007 Posts: 11
|
Posted: Fri Jul 13, 2007 3:59 am Post subject: |
|
|
Thanx you !!! both methods work!!!
Issue is after I set USE and re emerge gnome, JPEG still does not work. |
|
| Back to top |
|
 |
desultory Administrator

Joined: 04 Nov 2005 Posts: 4648
|
Posted: Sat Jul 14, 2007 12:59 am Post subject: |
|
|
| pingp wrote: | | Issue is after I set USE and re emerge gnome, JPEG still does not work. | Please post more information, including the output of emerge --info, a list of any package specific USE flags in effect on the system and which version of GNOME is displaying this behavior; preferably in a new topic. |
|
| Back to top |
|
 |
|