Gnome3 wallpaper changer
Posted: 09 May 2011, 15:56
Here is a perl script that will change your background in Gnome3:
Save it as wallpaper.pl and start it with
As you can se it is set to change every 20th second. You can change it as fast as you want by entering the delay in seconds.
To put it in your startup programs:
hit <ALT>+<F2> and enter
add wp-changer in the GUI and enter this command:
Code: Select all
#!/usr/bin/perl -w
use strict;
use warnings;
my $searchPath = '~/<your_wallpaper_directory>/'; # Set to the directory you want to have searched for photos
my $switchTime = 20; # Edit to the number of seconds between photo switches
my @photos = `find $searchPath -type f | grep [jJ][pP][eE]*[gG]`;
chomp(@photos);
my $photo;
while(1)
{
$photo = $photos[rand($#photos)];
`gsettings set org.gnome.desktop.background picture-uri "file:///$photo"`;
sleep($switchTime);
}Save it as wallpaper.pl and start it with
Code: Select all
perl wallpaper.plAs you can se it is set to change every 20th second. You can change it as fast as you want by entering the delay in seconds.
To put it in your startup programs:
hit <ALT>+<F2> and enter
Code: Select all
gnome-session-propertiesadd wp-changer in the GUI and enter this command:
Code: Select all
perl /path/to/script/wallpaper.pl

