Ho scritto il seguente semplice script python che intendevo impostare come cron job in Ubuntu 12.04 per cambiare lo sfondo una volta all'ora. Lo script viene eseguito e cambia lo sfondo quando lo eseguo perfettamente da un terminale. Tuttavia quando imposto il cron job posso vedere in syslog che il cron job è stato eseguito ma lo sfondo non cambia?Impostazione dello sfondo con Python2.7 Crontab in Ubuntu 12.04
#!/usr/bin/python
import os
import random
directory = os.getcwd() + '/'
files = os.listdir('.')
random.shuffle(files)
files.remove('.project')
files.remove('.pydevproject')
files.remove('background.py')
background = files[0]
setup = 'file://' + directory + background
print setup
os.system("gsettings set org.gnome.desktop.background picture-uri '%s'" % (setup))
grazie ho provato entrambi, ma non ha funzionato. Lo sfondo non cambia. – James