Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have this simple script, take a look at it please:

cd ~/earthwallpaper/
while [  1 ]; do
    while [  $COUNTER -lt 60 ]; do
        wget -O world.jpg
        temp=$(stat -c%s world.jpg)
        if [[ $temp > 1000 ]]
            then    rm world_sunlight_Wallpaper.jpg
                    mv world.jpg world_sunlight_Wallpaper.jpg
        sleep 5
            let COUNTER=COUNTER+1 
    pcmanfm --set-wallpaper=~/earthwallpaper/world_sunlight_Wallpaper.jpg
    sleep 60m

It is downloading picture from web every hour, save file to disk and set up as desktop wallpaper. One file, same name. Downloading and saving works fine, but refreshing wallpaper on desktop works only once - only first time. Next hour it won't change. The picture is saved in some cache and the system won't change it even the file is updated, on the desktop I see only the picture downloaded first time. After system restart, the picture will change.

So is it possible to refresh wallpaper on desktop which has the same name?

share|improve this question
Have you thought about adding your script to a cronjob instead of having the while [ 1 ] loop in it? – AJefferiss Jun 20 '13 at 7:43

1 Answer 1

up vote 3 down vote accepted

the solution for this problem is addinng this in script:

pcmanfm --wallpaper-mode=center

pcmanfm --wallpaper-mode=stretch

thanx to toxicbreakfast (


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.