You are not logged in.
I will attach the script i am trying to do.
It is setting the dir but it is not showing images in the preview box and not setting the interval to change the wallpaper.
I used duckduckgo AI to help write the script but it couldn't get me any further.
I was hoping someone here could help.
#!/usr/bin/env bash
set -euo pipefail
WALLPAPER_DIR="${HOME}/.config/variety/Downloaded"
INTERVAL_SECONDS=300
if [[ ! -d "$WALLPAPER_DIR" ]]; then
echo "Directory not found: $WALLPAPER_DIR" >&2
exit 1
fi
SAMPLE_IMAGE=$(find "$WALLPAPER_DIR" -maxdepth 2 -type f -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' | head -n1 || true)
if [[ -z "$SAMPLE_IMAGE" ]]; then
echo "No images found under: $WALLPAPER_DIR" >&2
exit 1
fi
WALLPAPER_URI="file://${WALLPAPER_DIR%/}"
SAMPLE_IMAGE_URI="file://${SAMPLE_IMAGE}"
INTERVAL_MS=$((INTERVAL_SECONDS * 1000))
JS='var all = desktops(); for (var i = 0; i < all.length; i++) { var d = all[i]; d.wallpaperPlugin = "org.kde.slideshow"; d.currentConfigGroup = ["Wallpaper","org.kde.slideshow","General"]; d.writeConfig("SlidePaths", ["'"$WALLPAPER_URI"'"]); d.writeConfig("Recursive", 1); d.writeConfig("Interval", '"$INTERVAL_MS"'); d.writeConfig("Image", "'"$SAMPLE_IMAGE_URI"'"); }'
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "$(printf '%s' "$JS")"
killall plasmashell || true
kstart5 plasmashell &>/dev/null || true
echo "Set slideshow wallpaper folder to: $WALLPAPER_DIR"
echo "Sample image: $SAMPLE_IMAGE"
echo "Interval: ${INTERVAL_SECONDS}s"Offline
This is just a heads up, It's not that I'm going to solve that fugly script for you, but did you actually (try and) read it and did it make sense??
My advice don't let AI make your scripts for you if you're unable yourself to verify and check it's output...
One thing I noticed 'qdbus' what is that?, btw that whole loop looks needlessly complicated.
Another thing, are you sure time is stored in milliseconds otherwise 300 * 1000 = 300000 seconds that's a few days
I'd be amazed if anyone's going to solve this for you, go and make something yourself chances are a lot better in that case!
And throw this thing away ![]()
Offline
Thanks for the help and words of encouragement .
Offline
One thing I noticed 'qdbus' what is that?
https://archlinux.org/packages/extra/x86_64/qt5-tools/
https://archlinux.org/packages/extra/x86_64/qt6-tools/ has qdbus6 and qdbus but not in regular $PATH's
This is insane
killall plasmashell || true
kstart5 plasmashell &>/dev/null || trued.wallpaperPlugin = "org.kde.slideshow"
So apparently there's a slideshow plugin to do the plasma wallpaper?
What's the point of this script?
Offline
One thing I noticed 'qdbus' what is that?
https://archlinux.org/packages/extra/x86_64/qt5-tools/
https://archlinux.org/packages/extra/x86_64/qt6-tools/ has qdbus6 and qdbus but not in regular $PATH'sThis is insane
killall plasmashell || true kstart5 plasmashell &>/dev/null || trued.wallpaperPlugin = "org.kde.slideshow"
So apparently there's a slideshow plugin to do the plasma wallpaper?
What's the point of this script?
@Seth
What I am trying to do and I didn't know how to so I tried to get help from AI . Obviously not a good choice.
I am trying to set via archiso the settings in plasma kde to have the wallpaper automatically set to a folder and rotate the images on a set time schedule.
This can be done manually by changing the settings to slideshow and selecting the folder.
I wanted to do it in the archiso and was lost on how to set the settings there. So I was looking for help.
The code AI provided did change the setting to slideshow and had the folder in place but it didn't display the images and the time setting didn't change.
Thanks
Offline
You just need to to fix/provide a static config file, there's no need for any runtime script, dbus or restarting plasma.
In doubt change the settings manually as you like them and then copy the config file.
Offline
@seth, thanks for the qdbus answer
@MAYBL8, If you would have said right away what it was your planning to do we could have given that answer right away ![]()
In case your wondering what file seth is talking about:
.config/plasma-org.kde.plasma.desktop-appletsrcOffline