Edit: I see now, you were trying to use a full path instead of the $photo variable set by the script. Sorry for the noise...
]]>:-)))))
]]>`gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$photo"`;
for
`gsettings set org.gnome.desktop.background picture-uri "file:///$photo"`;
#!/usr/bin/perl -w
use strict;
use warnings;
my $searchPath = '~/wallpapers/'; # Set to the directory you want to have searched for photos
my $switchTime = 300; # 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)];
`gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$photo"`;
sleep($switchTime);
}
Of course, it doesn 't work under Gnome 3, because of the gconftool line.
I understand it is done this way now:
gsettings set org.gnome.desktop.background picture-uri "file:///home/user/background.jpg"
But my perl skills are quite limited and my attempts to modify the script to the new way have failed miserably.
Is here someone more skilled than me can give me some help with this thing??
It's not incredibly important but I really really liked the wallpaper timed changing.
Thanx in advance.