So I'm writing a bash script that pulls a background picture from the web and sets it as the desktop wallpaper. I've managed to change the desktop background which is fairly easy by just running
gsettings set org.gnome.desktop.background picture-uri file:///path/to/file
but this does not have the same effect as right clicking a photo and choosing "set as desktop background". Using the right click method the login screen background changes too, but using gsettings I can't get the login screen background to change.
I've read about pantheon-greeter and it's .conf files in /etc/lightdm, but I don't want to use that method because all those files need root permissions to be edited. Clearly, if I can just right click a picture and set it as background I don''t need root permissions. Can anyone help me find a way to do that using the terminal? Thanks.