How to set Bing.com wallpaper as your Linux desktop wallpaper

It sets Bing.com wallpaper of the Day as your Linux Desktop

  supports GNOME and KDE4.

Easy Usage:


mkdir bin
wget https://raw.github.com/marguerite/linux-bing-wallpaper/master/bing_wallpaper.sh -o bin/bing_wallpaper.sh
# If you use KDE
wget https://raw.github.com/marguerite/linux-bing-wallpaper/master/kde4_set_wallpaper.sh -o bin/kde4_set_wallpaper.sh
chmod +x bin/*.sh 
./bin/bing_wallpaper.sh

Advanced:

  • You can make them autostart. So next time you boot your computer for the first time a day, it’ll run once. Next boots in that day it will run too, but do nothing.

  • You can also use cron jobs for them. But I didn’t success on KDE4. Because it needs to prompt a KDE JS Console, but the user runs cron has no permission to GUI programs. You may try on GNOME.


crontab -e
1 0 * * * /home/YOUR_USERNAME/PATH/TO/SCRIPTS/bing_wallpaper.sh > /home/YOUR_USERNAME/.cronjob.log

Uninstall:

Just remove those sh

Crontab Uninstall:


sudo rm -rf /var/spool/cron/tabs/YOUR_USERNAME

Have a lot of fun!

http://s.cn.bing.net/az/hprichbg?p=rb%2FWyomingHorses_ZH-CN9245252279_1366x768.jpg

I am not sure your bash script download is working.

I find KDE was equal to:

--2012-11-28 17:34:04--  https://raw.github.com/marguerite/linux-bing-wallpaper/master/kde4_set_wallpaper.sh
Resolving raw.github.com (raw.github.com)... 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1013 [text/plain]
Saving to: `kde4_set_wallpaper.sh'

     0K                                                       100%  847M=0s

2012-11-28 17:34:04 (847 MB/s) - `kde4_set_wallpaper.sh' saved [1013/1013]

The standard was:

--2012-11-28 17:30:52--  https://raw.github.com/marguerite/linux-bing-wallpaper/master/bing_wallpaper.sh
Resolving raw.github.com (raw.github.com)... 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2429 (2.4K) [text/plain]
Saving to: `bing_wallpaper.sh'

     0K ..                                                    100% 1.85G=0s

2012-11-28 17:30:52 (1.85 GB/s) - `bing_wallpaper.sh' saved [2429/2429]

There is no need to create a bin folder in your /home/username as it already exists. If you posted the actual bash script in a code field, we could put it in Suse Pate if you like and use the wget command to download it.

Thank You,

Hi, Jim,

KDE4 needs to download both scripts and place them in the same folder…they are not two separate scripts.:wink:

Yes, you can place them anywhere…~/bin is just an easy usage example…

So I am saying I did not end of with the bash script using the wget commands as posted here. Can you post the complete bash script into code tags here?

Thank You,

Sorry, Jim. I didn’t quite follow you…

> If you posted the actual bash script in a code field, we could put it in Suse Pate if you like and use the wget command to download it.

Why we have to download from paste.o.o? you can either


wget https://raw.github.com/marguerite/linux-bing-wallpaper/master/bing_wallpaper.sh
wget https://raw.github.com/marguerite/linux-bing-wallpaper/master/kde4_set_wallpaper.sh

or just “save as” these two

https://raw.github.com/marguerite/linux-bing-wallpaper/master/bing_wallpaper.sh
https://raw.github.com/marguerite/linux-bing-wallpaper/master/kde4_set_wallpaper.sh

by the way…crontab no longer works. as it can’t be used for KDE. so I added sleep function to work for all DEs.

Just make them autostart will work. if you keep your computer running, it’ll change wallpaper on 00:10, or else it’ll will change on next boot(if there’s any new wallpaper, bing.com just release one wallpaper a day).

OK, well I did get the bash script running and fetched today’s picture at which time the script just sits there waiting for tomorrow to come. The command to fetch the script is not correct which is why it did not work for me. Here is the correct line to download these scripts. Consider that we always have a ~/bin folder in openSUSE and no need to create it. Further, since ~/bin is in your path, there is no need to change to this folder to run the script.

To download the script(s) (and replace any bad ones you might already have) copy the following line and paste it into a terminal session:

rm $HOME/bin/bing_wallpaper.sh ; wget -nc https://raw.github.com/marguerite/linux-bing-wallpaper/master/bing_wallpaper.sh -O $HOME/bin/bing_wallpaper.sh ; chmod +x $HOME/bin/bing_wallpaper.sh

AND for KDE a second script:

rm $HOME/bin/kde4_set_wallpaper.sh ; wget -nc https://raw.github.com/marguerite/linux-bing-wallpaper/master/kde4_set_wallpaper.sh -O $HOME/bin/kde4_set_wallpaper.sh ; chmod +x $HOME/bin/kde4_set_wallpaper.sh

The first script works, but you need to modify this for your market:

# The mkt parameter determines which Bing market you would like to
# obtain your images from.
# Valid values are: en-US, zh-CN, ja-JP, en-AU, en-UK, de-DE, en-NZ, en-CA.
mkt="en-US"

AND I modified line 138 to read like this:

kde4_set_wallpaper.sh $saveDir$picName

Taking out the **’./’ **which only required if you actually change to the ~/bin folder which is not required. I have not yet determined what the second script does yet and it may work great. To run the first script open up a terminal session and type in:

bing_wallpaper.sh

The script then fetches today’s wallpaper and places it in $HOME/pictures/bing and then just waits for tomorrow to come and does not close. Or, you could run it once a day I guess and close it down after you get the latest picture.

Thank You,