J'ai fait quelques recherches et j'ai fini par trouver l'origine du problème. C'est en fait un bug de gnome qui a été corrigé : le gestionnaire de papier peint ne détectait pas si le fichier du papier peint en cours changeait ...
Résultat, depuis cette correction, fatalement, l'effacement de mon fichier, bien que rapide, était détecté et se traduisait par ce petit "clignotement".
Du coup, il suffit de créer un fichier tampon pour résoudre le pb. Comme j'avais pas envie de modifier à la main mes 80 (!!) scripts shell, j'ai décidé d'en faire un gros et unique script python. Voilà le code :
#! /usr/bin/env python
# -*- coding: utf-8 -*-
##---------------------------------------------------
## Static webcam as a wallpaper in gnome v 0.20080430
## Script by MrKikkeli - 04.30.08
## Turned to Python because it's awesome. :)
##---------------------------------------------------
##---------------------------------------------------
## To do :
##
## - display through a discreet notification which webcam we are watching
## - turn it into a screenlet
## - integrate the xplanet background
##
##---------------------------------------------------
import os, random, urllib, time, sys
##options are :
## *Resolution would be 160x120 | 320x240 | 640x480
## *Quality can be 'Clarity', 'Standard' or 'Motion'
snapshotOption = {'Resolution': '640x480', 'Quality': 'Clarity'}
webcam_list = [["http://60.33.165.138:5080/snapshotJpeg",snapshotOption, u"LaundryMat", 0],
["http://cam30522.miemasu.net/snapshotJpeg", snapshotOption, u"Tennis Court", 0],
["http://kstc.miemasu.net/snapshotJpeg", snapshotOption, u"Tennis Court", 0],
["http://82308207.tel.netvolante.jp:8001/snapshotJpeg", snapshotOption, u"Some Appartment", 0],
["http://65.13.81.233/snapshotJpeg", snapshotOption, u"Some beach", 0],
["http://128.118.52.239/axis-cgi/jpg/image.cgi", {}, u"IST", 0],
["http://128.252.39.99/axis-cgi/jpg/image.cgi", {}, u"Some building", 0],
["http://napoliwebcam.dnsalias.com/record/current.jpg", {}, u"Napoli", 0],
["http://195.243.185.195/axis-cgi/jpg/image.cgi", {}, u"Stuttgart Airport", 0],
["http://images.ibsys.com/orl/images/weather/auto/daytonacam_640x480.jpg", {}, u"Daytona Beach", 20],
["http://shibuya02.ipcam.jp/SnapshotJPEG", snapshotOption, u"Shibuya", 0],
["http://www.acropolis.gr/webcam/acropolis.jpg", {}, u"acropolis", 60],
["http://213.253.80.123/still.jpg", {}, u"some airport", 0],
["http://www.westphalfamily.com/webcam.jpg", {}, u"altadena", 60],
["http://www.borealisbroadband.net/sheraton/sheraton1.jpg", {}, u"anchorage sheraton hotel", 10],
["http://192.102.150.10/record/current.jpg", {}, u"aquarium marina oberhausen", 0],
["http://142.22.58.150/axis-cgi/jpg/image.cgi", {}, u"aquarium", 0],
["http://125.206.34.118/SnapshotJPEG", snapshotOption, u"asakusa", 0],
["http://cam6075917.miemasu.net:50006/SnapshotJPEG", snapshotOption, u"barn", 0],
["http://biberstein.viewnetcam.com:50000/SnapshotJPEG", snapshotOption, u"Bibi's Webcam", 0],
["http://142.36.244.87:8888/SnapshotJPEG", snapshotOption, u"O Canada", 0],
["http://88.38.50.59/SnapshotJPEG", snapshotOption, u"Coast", 0],
["http://www.gotostjohn.com/live/cruzbay.jpg", {}, u"cruz bay", 30],
["http://dake.miemasu.net/snapshotJpeg", snapshotOption, u"dake Ryokan", 0],
["http://63.175.189.41/axis-cgi/jpg/image.cgi", {}, u'Deadland', 0],
["http://www.parislive.net/eiffelcam3.jpg", {}, u'Tour Eiffel', 10],
["http://www.parislive.net/eiffelwebcam1.jpg", {}, u'Tour Eiffel', 10],
["http://webmarin.com/images/wc/Camera.jpg", {}, u'Frisco Bay', 10],
["http://castrocam.net/castrocam.jpg", {}, u'Frisco Skyline',60],
["http://www.stefanome.it/current_lev.jpg", {}, u'Genova', 300],
["http://camgodovic.drsc.si/axis-cgi/jpg/image.cgi",{}, u'Godovic', 0],
["http://gunnarbu.axiscam.net/axis-cgi/jpg/image.cgi", {}, u'Gunnarbu', 0],
["http://www.ek.fi/kamera/tn_palace00.jpg", {}, u'Helsingin Tori', 0],
["http://71.254.156.56:8000/axis-cgi/jpg/image.cgi", {}, u'Hermosawave', 0],
["http://hih1.dyndns.org:81/record/current.jpg", {}, u'Hih1', 0],
["http://82.208.151.76:8000/record/current.jpg", {}, u'hotel unirea Romania',0],
["http://webcam.mmhk.cz/axis-cgi/jpg/image.cgi", {}, u'Hradek Kralove', 0],
["http://202.213.247.128/nphMotionJpeg/SnapshotJPEG", snapshotOption, u'Japanese Street', 0],
["http://211.18.192.147/nphMotionJpeg/SnapshotJPEG", snapshotOption, u'Japanese Studio', 0],
["http://www.shokoku-ji.or.jp/kinkakuji/webcam/fullsize.jpg", snapshotOption, u'Kinkakuji', 0],
["http://kohama2.miemasu.net:50000/SnapshotJPEG", snapshotOption, u'Kohama', 0],
["http://213.28.111.12/record/current.jpg", {}, u'Levi Ski station', 0],
["http://www.locogringo.com/Upload/netcam.jpg", {}, u'locogringo', 10],
["http://www.rovaniemi.fi/images/webcam/Kamera4_00001.jpg", {}, u'Lordin Aukio - Rovaniemi', 0],
["http://lovefm.miemasu.net:60002/SnapshotJPEG", snapshotOption, u'Love FM', 0],
["http://mainecam.dyndns.org:50004/SnapshotJPEG", snapshotOption, u'Maine Cam', 0],
["http://miyanoura.miemasu.net:60001/SnapshotJPEG", snapshotOption, u'Miya no Ura', 0],
["http://iozoonc5.city.miyazaki.miyazaki.jp/snapshotJPEG", snapshotOption, u'Firefoxes from the Miyazaki Zoo', 0],
["http://murolucano.dnsalias.com/jpg/image.jpg", {}, u'MuroLucano', 0],
["http://www.santaclauslive.com/cam/cam.jpg", {}, u'Napapiiri', 0],
["http://napoliwebcam.dnsalias.com/record/current.jpg", {}, u'Napoli', 300],
["http://221.251.109.90:84/SnapshotJPEG", snapshotOption, u'Neko Baba', 0],
["http://84.53.63.18:8000/axis-cgi/jpg/image.cgi", {}, u'nesna_botrorening', 0],
["http://www.wirednewyork.com/webcam2/wirednewyork2.jpg", {}, u'New York Empire State Building', 30],
["http://livesite.hongwanji.or.jp/camera/shirasu1.jpg", {}, u'Nishi HonganJi', 10],
["http://noshiro-ekimae.miemasu.net:92/snapshotJpeg", snapshotOption, u'Noshiro Ekimae', 0],
["http://ocean1cam-2.viewnetcam.com:81/SnapshotJPEG", snapshotOption, u'Ocean View', 0],
["http://opccam2.ohsu.edu/axis-cgi/jpg/image.cgi", {}, u'OPC Bridge', 0],
["http://www.slednh.com/webcam/netcam.jpg", {}, u'Ossipee Lake', 4],
["http://webkamera.overtornea.se/axis-cgi/jpg/image.cgi", {}, u'Overtornea', 0],
["http://webcam.ville.woob2.com/Pantheon_full.jpg", {}, u'Panthéon', 0],
["http://24.227.114.58/axis-cgi/jpg/image.cgi", {}, u'Perrys Ocean Edge', 0],
["http://69.57.245.115/axis-cgi/jpg/image.cgi", {}, u'Pineapple Beach', 0],
["http://dokumenty.prague-city.cz/camera/fullsize.jpg", {}, u'Prague Old Town', 0],
["http://civl3104acam1.ecn.purdue.edu/axis-cgi/jpg/image.cgi", {}, u'Purdue Armstrong Hall', 0],
["http://webcam.sewanee.edu/axis-cgi/jpg/image.cgi", {}, u'Quadcam Sewanee', 0],
["http://217.155.209.14:2220/SnapshotJPEG", snapshotOption, u'Random Street', 0],
["http://133.5.31.7/axis-cgi/jpg/image.cgi", {}, u'Room 134', 0],
["http://shibuya02.ipcam.jp/SnapshotJPEG", snapshotOption, u'Shibuya', 0],
["http://81.140.146.203/axis-cgi/jpg/image.cgi", {}, u'South Mainland', 0],
["http://195.243.185.195/axis-cgi/jpg/image.cgi", {}, u'Stuttgart Airport', 0],
["http://82.191.220.214/record/current.jpg", {}, u'Svincolo di Lago Negro', 0],
["http://www.bbc.co.uk/cgi-perl/webcams/camcache.pl", {'r': 120, 'h': 'mcs', 'l': 'webcams/london/548955.jpg'}, u'Swiss Cottage', 60],
["http://taosplaza.viewnetcam.com:50000/SnapshotJPEG", snapshotOption, u'Taos Plaza', 0],
["http://tezupin.ddo.jp/SnapshotJPEG", snapshotOption, u'Tezupin Hamsters', 0],
["http://207.251.86.248/cctv26.jpg", {}, u'Times Square CCTV', 0],
["http://www.bbc.co.uk/london/webcams/images/trafalgar_square.jpg", {}, u'Trafalgar Square', 0],
["http://trump.viewnetcam.com:50000/SnapshotJPEG", snapshotOption, u'Trump', 0],
["http://62.73.32.2/record/current.jpg", {}, u'Turun Tori', 0],
["http://www.serendipity.vi/images/vs.jpg", {}, u'Villa Serendipity', 10],
["http://69.146.254.227/axis-cgi/jpg/image.cgi", {}, u'VolksWagen Garage', 0],
["http://sprout.warwick.ac.uk/axis-cgi/jpg/image.cgi", {}, u'Warwick Sprout', 0],
["http://208.0.229.84/nphMotionJpeg/SnapshotJPEG", snapshotOption, u'Yacht Cam', 0],
["http://www.yosemite.org/vryos/sentinel.jpg", {}, u'Yosemite Park', 0]
]
if sys.argv[1] == '--list':
print "Webcam list :\n"
i = 1
for webcam in webcam_list:
print '%d - %s : %s' % (i, webcam[2], webcam[0])
i=i+1
exit()
elif sys.argv[1] :
try:
i = int(sys.argv[1]) - 1
webcam_list = [ webcam_list[i] ]
except:
print "Incorrect argument, integer lower than %d, '--list' or nothing expected" % len(webcam_list)
exit()
bgfile = open('/tmp/bg.jpg', 'wb+')
##---------------------------------------------------
## This loop ensures the connection to the chosen webcam is possible.
##---------------------------------------------------
while True:
chosen_one = random.choice(webcam_list)
print chosen_one[2]
try:
if chosen_one[1]:
params = urllib.urlencode(chosen_one[1])
bgfile.write(urllib.urlopen(chosen_one[0], params).read())
else:
bgfile.write(urllib.urlopen(chosen_one[0]).read())
break
except:
##---------------------------------------------------
## This is in case we have only one webcam to choose from !.
##---------------------------------------------------
if len(webcam_list) < 2 :
print "connection problem."
exit()
pass
bgfile.close()
os.system('gconftool -t string -s /desktop/gnome/background/picture_filename /tmp/bg.jpg')
## print "background changed"
##---------------------------------------------------
## Main loop
##---------------------------------------------------
while True:
bgtemp = open('/tmp/bgtmp.jpg', 'wb+')
if chosen_one[1]:
params = urllib.urlencode(chosen_one[1])
bgtemp.write(urllib.urlopen(chosen_one[0], params).read())
else:
bgtemp.write(urllib.urlopen(chosen_one[0]).read())
bgtemp.close()
os.system('cp /tmp/bgtmp.jpg /tmp/bg.jpg')
if chosen_one[3]:
time.sleep(chosen_one[3])
J'ai aussi modifié les scripts randomize et celui avec xplanet (étoiles et nuages en temps quasi-réel), si ça intéresse quelqu'un ...