Video Tutorials  - 
 
Tutorial : Wallpaper Changer : LInux Mint (New 2013) HD
Repost from +Christopher S.
https://launchpad.net/~peterlevi/+archive/ppa

sudo add-apt-repository ppa:peterlevi/ppa
sudo apt-get update
sudo apt-get install variety

Video Tutorial: http://youtu.be/Eujtr24qoBQ
3
2
John Bastian's profile photoMatthew Karafa's profile photoTim Lawless's profile photoCristian Andres's profile photo
3 comments
 
Couldn't you just write a bash script that does the very same thing?
 
Possibly. Write us one and post it.
 
This is the one I use. It's in perl not bash, but I've had it for a long time totally stolen from some website and tweaked over the years... Just call it from a cron jorb as often as ya like.

#!/usr/bin/perl
use File::Find; #to get all files under mainDir
use Getopt::Std;  # command line processing

getopts("w:d:")|| die "Invalid argument\n";

if ($opt_w =~ /\D/) { die "w is not a digit";}

@images= ();

if ( $opt_w ) {
    $workspace = $opt_w-1;
}


sub process_file{
    /.thumbnail/ and $File::Find::prune = 1;
    /.xvpics/ and $File::Find::prune = 1;
    $filename = $File::Find::name;
    if ( -f $filename ){
        push(@images,$filename);
    }
}

if ( $opt_d ) {
    $basedir = $opt_d;
    }
else{
   $basedir = "<<<Where you store your BACKGROUNDS>>>";
}


find(\&process_file, $basedir);

srand;
$index=int(rand(@images));

if ($opt_w){
print "\n The background image is now @images[$index]\n";
}
else{
print "\n The background image is now @images[$index]\n";
system "gsettings set org.gnome.desktop.background picture-options \"stretched\"
 ";
system "gsettings set org.gnome.desktop.background picture-uri \"file:///$images
[$index]\" ";
system "gsettings set org.gnome.desktop.background picture-options \"stretched\"
 ";
}
 
Add a comment...