You can easily set both desktop and lock screen wallpaper in KDE Plasma using a simple shell script. This is especially useful for automation tools, scripting, or apps like qimgv that allow external scripts.
Save the following to a file, for example set-wallpaper.sh
:
#!/bin/bash
# Set desktop wallpaper
plasma-apply-wallpaperimage "$1"
# Set lock screen wallpaper
kwriteconfig5 --file kscreenlockerrc \
--group Greeter \
--group Wallpaper \
--group org.kde.image \
--group General \
--key Image "file://$1"
Make the Script Executable:
chmod +x set-wallpaper.sh
Run the Script:
./set-wallpaper.sh /path/to/your/image.jpg
Categories: Desktop