Is it possible to use Picture of the Day as SDDM background?

I tried editing /usr/share/sddm/themes/breeze/theme.conf.user and changing the image path to /home/username/.cache/plasma_engine_potd/bing:3840:2160 but that didn’t work.

I then tried creating a file that linked to bing:3840:2160 and then putting that in the image path, but that didn’t work either.

Is there another way to do it?

When you say the sddm background do you truly mean the login screen (sddm) or do you just want to change the lock screen? You only see the sddm screen on login which is once per reboot unless you log out.

Yes, the login screen (sddm). Not the lock screen.

What were the owner / permissions on the symlinked file?

Owner is me. Permissions are:

Owner rw-
Group r--
Other r--

Sorry, actually what are the owner / permission of the file the symlink points to? Try copying the owner / permission from the default wallpaper that sddm uses. Then use kde’s settings to select the symlinke of the image and see if that works.

I don’t know if this would work but:

#!/bin/bash

set -ex

api_url="https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
base_url="https://www.bing.com"

output=$HOME/wallpapers/bing-wallpaper.jpg

# Fetch the URL from the Bing API endpoint.
url_path=$(curl -s "$api_url" | jq -r ".images[0].url")

# Download the image to $output.
curl -L -o "${output}" "${base_url}${url_path}"

Will download it, but it needs network loaded, so would probably be “picture of yesterday” :smiley:

Symlinks don’t work with SDDM background. It needs to be an image file. I think that’s what the problem is. I don’t think it’s a permissions issue.

By doing this, I can get it to work:

sudo cp /home/username/.cache/plasma_engine_potd/bing:3840:2160 /usr/share/endeavouros/backgrounds/bing.jpg

I just have to update it manually every time the image updates. It would be nice to automate it somehow.

Maybe inotify to detect when something in the directory changes and then onchange copy the file to the place it needs to be.

I’m not familiar with that, but I will look into it. Thanks.

It’s a bit late but…

SDDM [for some reason] fails to read anything in a user’s home directory (I thought sddm process was owned by root).

So if you try to set a cursor theme installed in ~/.local/share/icons it won’t work. The same goes for symlinks to files in the home directory.

I would appreciate it if someone could point out a source/reason for this behavior.

There is a similar issue in SDDM git repo

To solve this, I created a cronjob (root user) to run at boot to copy the picture of the day to a non-home location and use the path in theme.conf.user

@reboot cp /home/user/.cache/plasma_engine_potd/bing:3840:2160 /etc/sddm/sddm.img

or if you want to use inotify for instantaneous updates, create this cron job (root user ofc)

Note: make sure inotify-tools is installed

@reboot while inotifywait -e close_write /home/tooknox/.cache/plasma_engine_potd/bing:3840:2160; do /usr/bin/cp /home/tooknox/.cache/plasma_engine_potd/bing:3840:2160 /etc/sddm/sddm.img; done