Pour pouvoir changer de fond d'écran aléatoirement; j'ai trouvé un script fort utile pour faire cela sous gnome . J'ai modifié ce dernier pour l'utiliser avec fcron mais quelque soit la version ( que j'ai modifié ou non ) il ne se lance jamais .
L'original.
Code : Tout sélectionner
#!/usr/bin/perl -w
use strict;
use warnings;
my $searchPath = '/home/peuks/Images/wall/'; # Set to the directory you want to have searched for photos
my $switchTime = 900; # Edit to the number of seconds between photo switches
# bgotd-- background of the day
# Written by Michael Moore, Nov. 2007, placed in the public domain
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);
}
Code : Tout sélectionner
#!/usr/bin/perl -w
use strict;
use warnings;
my $searchPath = '/home/peuks/Images/wall/'; # Set to the directory you want to have searched for photos
# bgotd-- background of the day
# Written by Michael Moore, Nov. 2007, placed in the public domain
my @photos = `find $searchPath -type f | grep [jJ][pP][eE]*[gG]`;
chomp(@photos);
my $photo;
$photo = $photos[rand($#photos)];
`gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$photo"`;
Code : Tout sélectionner
*/15 * * * * /home/peuks/Documents/Scripts/wallpaper #( le script se trouve ici )
Je ne vois vraiment pas d'ou peut provenir l'erreur. Le fait que le script est écrit en perl ?