I've created a neat little script that downloads a JPG using wget
and 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.jpg
doesn't fix it. - Exhibit F: When the desktop is broken, manually running
gsettings set org.gnome.desktop.background picture-options zoom
doesn'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
rm
of the cached file before thegsettings
command doesn't solve my problem though; the new cached image is broken too. It almost seems like thatgsettings
command is broken?
gsettings set org.gnome.desktop.background picture-uri file:///home/myname/wallpaper.jpg
on the downloaded file, it appears only half? – Jacob Vlijm Feb 27 '15 at 12:04gsettings set org.gnome.desktop.background picture-options zoom
(in an attempt to force refresh) – Jacob Vlijm Feb 27 '15 at 12:13