Gentoo Forums
Gentoo Forums
Quick Search: in
Any wallpaper auto switcher plugin?
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
pingp
n00b
n00b


Joined: 12 Jul 2007
Posts: 11

PostPosted: Thu Jul 12, 2007 5:58 pm    Post subject: Any wallpaper auto switcher plugin? Reply with quote

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
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 4648

PostPosted: Fri Jul 13, 2007 1:07 am    Post subject: Reply with quote

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
View user's profile Send private message
misterbob05
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2007
Posts: 90

PostPosted: Fri Jul 13, 2007 1:52 am    Post subject: Reply with quote

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
View user's profile Send private message
ZZamboni
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 96
Location: Zurich, Switzerland

PostPosted: Fri Jul 13, 2007 3:07 am    Post subject: Reply with quote

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
View user's profile Send private message
pingp
n00b
n00b


Joined: 12 Jul 2007
Posts: 11

PostPosted: Fri Jul 13, 2007 3:59 am    Post subject: Reply with quote

Thanx you !!! both methods work!!!

Issue is after I set USE and re emerge gnome, JPEG still does not work.
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 4648

PostPosted: Sat Jul 14, 2007 12:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum