Unable to set background image using python (2.7.3), bash and gnome3
- by malon
#!/usr/bin/env python
import os
bashCommand = "gsettings set org.gnome.desktop.background picture-uri file:///home/malon/autowallpaperchanger/" + pic_name
print bashCommand
os.system(bashCommand)
Print result:
gsettings set org.gnome.desktop.background picture-uri file:///home/malon/autowallpaperchanger/wallpaper-1252048.jpg
Copying and pasting the print result into a terminal makes the change successfully, so the command is correct, but os.system isn't processing the request correctly for some reason. In the full script (posted below), I use os.system for a different reason immediately before (wget) and that works fine.
Thank you!
Full script: http://pastebin.com/R90GTmBZ