Synology: Daily Bing Wallpapers For DSM Login Page

Synology Daily Bing Wallpapers For DSM Login Page

Bing Wallpaper includes a collection of beautiful images from around the world that have been featured on the Bing search homepage. Did you know you can change your DSM 7.1 login page wallpaper with the Bing wallpapers? Today I will show you how to automatically get the latest Bing Wallpapers on your Synology DSM Login page every day.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Go to File Station and open your favorite shared folder, in my case, web. Inside your primary shared folder, create one new folder and name it wallpapers. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
Note: web is an example of a shared folder. You have to create the wallpapers folder inside one of your shared folders, not necessarily web.

Synology Daily Bing Wallpapers 1

  • STEP 3

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.

Synology Daily Bing Wallpapers 2

  • STEP 4

Once you click on User-defined script, a new window will open. Follow the instructions below:

  1. General: In the Task field type in Daily Bing Wallpapers. Select root for User and check the Enabled option.
  2. Schedule: Select Run on the following days then select “Daily“. Set Frequency to Every day.
  3. Task Settings: Copy paste the code below in the Run command area. After that, click OK.
savepath="/volume1/web/wallpapers"
pic=$(wget -t 5 --no-check-certificate -qO- "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1")
echo $pic|grep -q enddate||exit
link=$(echo https://www.bing.com$(echo $pic|sed 's/.\+"url"[:" ]\+//g'|sed 's/".\+//g'))
date=$(echo $pic|sed 's/.\+enddate[": ]\+//g'|grep -Eo 2[0-9]{7}|head -1)
tmpfile=/tmp/$date"_bing.jpg"
wget -t 5 --no-check-certificate $link -qO $tmpfile
[ -s $tmpfile ]||exit
rm -rf /usr/syno/etc/login_background*.jpg
cp -f $tmpfile /usr/syno/etc/login_background.jpg &>/dev/null
cp -f $tmpfile /usr/syno/etc/login_background_hd.jpg &>/dev/null
title=$(echo $pic|sed 's/.\+"title":"//g'|sed 's/".\+//g')
copyright=$(echo $pic|sed 's/.\+"copyright[:" ]\+//g'|sed 's/".\+//g')
word=$(echo $copyright|sed 's/(.\+//g')
if [ ! -n "$title" ];then
cninfo=$(echo $copyright|sed 's/,/"/g'|sed 's/,/"/g'|sed 's/(/"/g'|sed 's/ //g'|sed 's/\//_/g'|sed 's/)//g')
title=$(echo $cninfo|cut -d'"' -f1)
word=$(echo $cninfo|cut -d'"' -f2)
fi
sed -i s/login_background_customize=.*//g /etc/synoinfo.conf
echo "login_background_customize=\"yes\"">>/etc/synoinfo.conf
if (echo $savepath|grep -q '/') then
cp -f $tmpfile $savepath/$date@$title-"$word".jpg
fi
rm -rf /tmp/*_bing.jpg

Note: Before you paste the code above in the Run command area, add your personal path to wallpapers that you have created at STEP 2. For example, I have used my personal wallpaper path folder /volume1/web/wallpapers Change it according to your preferences. /path/toyour/wallpapers

Synology Daily Bing Wallpapers 3

  • STEP 5

After you click OK on STEP 4 a new warning pop up window will open. Click OK.

Synology Daily Bing Wallpapers 4

  • STEP 6

After you click OK on STEP 5, select your “Daily Bing Wallpapers” Task then click the “Run” tab. You will be asked to run Install Daily Bing Wallpapers – click Yes. Follow the instructions in the image below.

Synology Daily Bing Wallpapers 5 new

  • STEP 7

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 8

Clear the cache from your browser.

  • STEP 9

Enjoy a new Bing Wallpaper every day on your DSM 7.1 Login Screen.

Synology Daily Bing Wallpapers 6

After 24 hours, a new wallpaper comes from Bing.

Synology Daily Bing Wallpapers 7

Note: You can find the original script on GitHub.

This post was updated on Tuesday / April 5th, 2022 at 1:50 AM