Random desktop background

Well, I have a directory with a bunch of backgrounds, and I like to have it change pretty often because I get bored with the scenery :) . So I figured I would make a script to randomly select an image and change the background. Then I added it to the crontab so now I have a different background every hour.

All you need is to change /home/gerard/wpaper with whatever your directory is.

#/bin/bash
imagedir=/home/gerard/wpaper
count=`ls $imagedir|wc -l`
let “pick = $RANDOM % $count”
let “pick += 1″
image=`ls $imagedir|sed -n “$pick”p`
Esetroot -scale $imagedir/$image

One Response to “Random desktop background”

  1. CLINTON Says:


    MedicamentSpot.com. Canadian Health&Care.No prescription online pharmacy.Best quality drugs.Special Internet Prices. High quality pills. Buy pills online

    Buy:Lumigan.Prevacid.Zyban.Nexium.Retin-A.Zovirax.Human Growth Hormone.Prednisolone.Actos.Valtrex.Petcam (Metacam) Oral Suspension.100% Pure Okinawan Coral Calcium.Accutane.Mega Hoodia.Arimidex.Synthroid….