Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

#!/bin/bash
cd ~/earthwallpaper/
while [  1 ]; do
    COUNTER=0
    while [  $COUNTER -lt 60 ]; do
        wget http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg -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
                break
        fi
        sleep 5
            let COUNTER=COUNTER+1 
    done
    pcmanfm --set-wallpaper=~/earthwallpaper/world_sunlight_Wallpaper.jpg
    sleep 60m
done

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 (http://ubuntuforums.org/showthread.php?t=2154734)

:)

share|improve this answer

Your Answer

 
discard

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.