I've created a neat little script that downloads a JPG using
wgetand then sets it as the Unity desktop background with
gsettings set org.gnome.desktop.background picture-uri file:///home/myname/wallpaper.jpg
After running the script, the desktop wallpaper is incomplete but when I open the downloaded image, it is fine! When I manually run the
gsettings command, the same thing happens - so I don't think the problem could be that
gsettings starts before the image is downloaded completely.
What is causing this odd problem, and how can I fix it?
- Exhibit A: my neat little script.
- Exhibit B: My desktop with an incomplete background image:
- Exhibit C: original image url. The trick is that this URL is static but the actual image file is continually refreshed with a different image file. That's why I made my script.
- Exhibit D: When the desktop is broken, manually setting the wallpaper through the Settings GUI (or desktop right-click) fixes it ... until the cron'ed script runs again.
- Exhibit E: When the desktop is broken, manually running
gsettings set org.gnome.desktop.background picture-uri file:///home/myname/wallpaper.jpgdoesn't fix it.
- Exhibit F: When the desktop is broken, manually running
gsettings set org.gnome.desktop.background picture-options zoomdoesn't fix it. Nothing seems to happen.
- Exhibit G: When the desktop is broken, the cached wallpaper is also broken. I came across this very similar topic. Adding
rmof the cached file before the
gsettingscommand doesn't solve my problem though; the new cached image is broken too. It almost seems like that
gsettingscommand is broken?