Gnome wallpaper changer
Posted: 20 Jul 2010, 19:30
In KDE you can put all your Wallpapers in a folder and change them every hour minute or day or whatever. There is no similar function in gnome.
Here is a python script that rvause made for it with improvements from b1o:
It will change your wallpaper every 5th minute (300 sec.).
Save it as wallpaper.py (or whatever as long as you have the extension py) and call it in a terminal with
Your background will now change every 5 minutes.
To change the interval you just alter the last line "time.sleep(300)" to whatever you like 300 sec = 5 minutes. Altering it to 600 would then change your wallpaper every 10 minutes.
Put in among your autostarts and it will work everytime you boot.
Nice work there rvause and b1o.
I have a challenge for you tho..
Since this function already is in KDE we do not want this script to work there - only in Gnome. The first one to make a condition that takes care of this, gets a pannekake from rolf
Here is a python script that rvause made for it with improvements from b1o:
It will change your wallpaper every 5th minute (300 sec.).
Code: Select all
import os, random, time
WALLPAPER_DIR = '/your/wallpaper/folder'
walls = os.listdir(WALLPAPER_DIR)
wallpaper = os.path.join(WALLPAPER_DIR, walls[random.randint(0, len(walls)-1)])
#i = 0
while (3):
walls = os.listdir(WALLPAPER_DIR)
wallpaper = os.path.join(WALLPAPER_DIR, walls[random.randint(0, len(walls)-1)])
if os.path.exists(wallpaper):
os.system('gconftool-2 -s -t string /desktop/gnome/background/picture_filename "%s"' % wallpaper)
time.sleep(300)Save it as wallpaper.py (or whatever as long as you have the extension py) and call it in a terminal with
Code: Select all
python wallpaper.pyYour background will now change every 5 minutes.
To change the interval you just alter the last line "time.sleep(300)" to whatever you like 300 sec = 5 minutes. Altering it to 600 would then change your wallpaper every 10 minutes.
Put in among your autostarts and it will work everytime you boot.
Nice work there rvause and b1o.
I have a challenge for you tho..
Since this function already is in KDE we do not want this script to work there - only in Gnome. The first one to make a condition that takes care of this, gets a pannekake from rolf

Pannekaker coming up
When I change the time in the conf. file it alters it on the fly - no restarting. Nice
Thanks again guys