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

cd ~/earthwallpaper/
while [  1 ]; do
    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
        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?

  • 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

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)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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