On my virtual machine with Zorin lite 17 and Zorin core desktop I have installed the gnome extension bing wallpaper.
I'd like to set up my Zorin lite session this way, that the desktop background shows the bing wallpaper of the day. Is this possible without installing variety or another app/script?
I found this one
Is it save to use?
I'm not sure if I need it because I already get the wallpapers from the gnome extension and they are saved at ~/Bilder/BingWallpaper.
I'd like to set it so that the xfce background takes the latest file from this folder.
This script is safe to run but it will download new images, and if I understand correctly you only want to use the ones that you already have, correct?
Yes, exactly - if it is possible, as the gnome-extension downloads the pictures.
Or does the script recognize when the current image of the day is already available? I don't want to download it twice.
But I just remembered that I can also simply display a random image from the Bing wallpapers, which changes every day. That would be fine with me too. I think I would have to write a script for the current image and start it when I log in. That is difficult.
It looks like this script will handle everything from checking the new picture of the day, to download it at a specified location and then update the wallpaper. But if you are using another program that does the same, there might be a slight conflict there which is always preferable to avoid.
If you want I can write something for you, derived from this script you shared to just download the picture of the day and save it in your preferred location. Then you can choose to update the background or not however you wish.
Thank you very much for the kind offer, Zenzen! I really appreciate it.
I was more concerned with how to avoid double downloads. Since the script only controls the background image for the xfce4-desktop and the gnome extension only controls the background image for the gnome desktop, there should probably be no conflicts.
Ah, I see. And you said you only want to use the last file that was downloaded to your wallpapers directory?
You still need a script for that but should be fairly simple. The only challenge is: do you have one or more monitors? The way this script does it it by specifying the background image on each monitor, but knowing this upfront might make things simpler. Or in case you want to have it done separately.
I only have the notebook monitor. Yes, I'd like to have a script that sets the latest file of the folder bing wallpapers at
~/Bilder/BingWallpaper
as background at start and changes every day.
#!/bin/bash
WALLPAPER_DIR="$HOME/Bilder/BingWallpaper"
last_wallpaper=$(ls -t "$WALLPAPER_DIR" | head -n 1)
for mon in $(xrandr | awk '/\s+connected\s+/ { print $1 }'); do
prop_name="/backdrop/screen0/monitor${mon}/workspace0/last-image"
xfconf-query -c xfce4-desktop -p "$prop_name" -s "$WALLPAPER_DIR/${last_wallpaper}"
done
You'll have to make it executable with chmod u+x <name_of_script> first. Run it once to see if it works fine first, and if it does add it to the Application Startup by creating a desktop file for it.
Hello Zenzen, unfortunately, I haven't been able to get the script to run. Maybe it's because of an incorrect file name? I'm not sure what extension the file needs to have, whether it's .zsh or .sh or something else (I use ZSH as my default terminal).
I also tried variety, which I had already installed once before. That would also be an option, as I can use this app on both DEs, but I prefer the Gnome extension because it also offers the option of only keeping the current image of the day.
Unfortunately, it's not working yet. Maybe I need to add a path to .zshrc or save the script at a special place? Now it is saved at ~/Schreibtisch (desktop).
It doesn't work with autostart yet. Maybe I'm doing something wrong?
I entered the path to the script as the command in autostart. Is that wrong?
It opens randomly images of the BingWallpaper folder.
Edit: Added sleep 5 to autostart command and it works now. The command: sh -c "sleep 5; ~/Schreibtisch/BingHintergrundScript.sh"