Set BING Background as your Desktop Wallpaper in GNOME
BING, GNOME, GRUB, Linux, Ubuntu, Wallpaper, bash July 18th, 2009
BING comes up with a beautiful background everyday. I thought why not set this background as my desktop wallpaper. But it would be a cumbersome task to set it manually. So I searched (Googled, BINGed) for some script which will do this for me. I found BING Downloader which does this task on Windows. I could not find any such script for GNOME. So, I thought of writing one.
I wrote a script which when executed automatically sets the GNOME wallpaper as BING background of the day. This is a PHP script. To execute this script you need to have php installed on your system. You can install php in Ubuntu as
sudo apt-get install php5 php5-cli
Now you are all set to download this script. Download Link: http://www.spsneo.com/scripts/bing_wallpaper.tar.gz
Download this file, extract the script file. Now you can run the script from terminal :
php bing_wallpaper.php
And your wallpaper is set. You can run this script daily from your terminal or you can set a cron job for the same or you can set up an icon in your gnome panel for this script.
I will keep updating this script. And I am also planning to write the same script in python. So check back again if you dont want to install php on your system.
Send your feedbacks and suggestions.
Update 1: I have modified the script to work with http proxy. Just assure that the environment variable http_proxy is properly set.
Update 2: Modified the script to keep the image centered on the desktop with black background. Try it out.
cool man!! I liked it but never thought of porting it to the desktop..
Wow..! I never thought in PHP it would be just 5 lines!!! Thanks for visiting my blog and thanks for the port…
Nice job. Likd it.
Great job! I didn’t thought of using PHP’s wget to retrieve the wallpaper and set it through system function…
isn’t PHP so amazing… too bad it won’t be around much longer
after uppacking the tar.gz, i would recommend to run this on the .php file:
sed ’s/centered/zoom/g’ -i bing_wallpaper.php
in order to set the wallpaper fullscreen, since the images from bing.com is pretty small compared to the monitors used today. Even on netbooks.