You are not logged in.
I used a public domain perl script (by some Michael Moore) to change periodically the wallpaper under Gnome 2, here it is:
#!/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.
Offline
change this line
`gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$photo"`;
for
`gsettings set org.gnome.desktop.background picture-uri "file:///$photo"`;
Last edited by kolos (2011-05-08 01:57:42)
och noes!
Offline
I'm seriuosly indebted, it works like a charm!
Thanks a really lot, kolos!
:-)))))
Offline
it really works,
thanks for this script.
Offline
Why not use a XML file? check this out https://github.com/dzup/borednomore you can either make your own XML file or use one of those scripts, one is for gconf2tool (gnome 2) and the other for gsettings (gnome 3) its for ubuntu/debian, but i see no difference between the way you guys call gsettings in arch, looks the same to me in debian, you may try it and told me if it does, thanks.
Offline
@pendor, you had all the information you needed right in front of you. There was no need for perl skills whatsoever.
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...
Last edited by WonderWoofy (2012-10-20 07:42:58)
Offline