I use Fedora 15 with GNOME 3 and I'd like my wallpaper to periodically change like it's possible with Windows 7. It would be the best if it could use RSS/Atom or a specified directory.

I haven't found any tools in the repository. I guess you can change it with a script and cron, but I'm looking for something more elegant.

link|improve this question

80% accept rate
feedback

3 Answers

up vote 1 down vote accepted

This is the solution you are looking for:

I made it; just a testing version but works!

link|improve this answer
feedback

Save the following shell script somewhere:

#!/bin/bash
cd /home/sammhe/WALLPAPER
while [ 1 ]
  do
  set — *
  length=$#
  random_num=$(( $RANDOM % ($length + 1) ))
  gsettings set org.gnome.desktop.background picture-uri “file:/home/sammhe/WALLPAPER/${!random_num}”
  sleep 600
done

Then in your home directory in .config/autostart put the following into a file called wallpaper-changer.desktop

[Desktop Entry]
Name=wallpaper-changer
Exec=/home/sammhe/bin/setbg.sh
Comment=change wallpaper every so often
Hidden=false
Type=Application
X-GNOME-Autostart-enabled=true

This will change your wallpaper every 10 minutes… or whatever value you set in the script…

I originally posted this as a comment on a post entitled "Customizing the GNOME Shell" at Musings of an OS plumber.

link|improve this answer
I can't find anything about changing wallpaper or Hubert Samm on your link. Could you be more specific? – KovBal Jun 16 '11 at 19:59
Or you can just write it down here :) (I didn't checked your name, sorry :)) – KovBal Jun 16 '11 at 20:00
feedback

For some reason, I can't see a way to reply to Hubert Samm, but I found his link helpful. Just in case it goes down or you don't want to read the whole thing to get this particular answer, I've added how I managed to accomplish a live-updating background in Gnome 3.

By going to ~/.cache/gnome-control/center/backgrounds you will find a file with a long name (something like "a4f327082b43572cfa36ad23b5e1fda7be77b6fb6bfe362e4d682fd9c6699f27" ) which is the cached version of the file you have set your background to. If you delete this file and create a symlink with the same name to replace it:

$ rm a4f327082b43572cfa36ad23b5e1fda7be77b6fb6bfe362e4d682fd9c6699f27 
$ ln -s /path/to/original/file a4f327082b43572cfa36ad23b5e1fda7be77b6fb6bfe362e4d682fd9c6699f27

then, as the original file is updated, the desktop background will change to reflect that. I am using this technique to make sure my XPlanetFX background stays up to date. For example, simply have an image called "background.jpg" and change this file whenever you wanted to update the background.

Probably the more correct way to go about this would be to use gsettings to change the picture-uri address to point directly to the file of your choosing, but I chose the symlink option because I didn't know how persistent the setting change would be when using the UI to change the wallpaper. Either way should work in theory, however.

Note: I don't know this for sure as I didn't test it, but there's a good chance that if you change your background through the normal UI, that long unique filename will change, and your symlink will not be useful any longer.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.