I've written a simple script for our Ubuntu machines at college which sets some dconf overrides to set the theme, background etc. However I cannot seem to get it to correctly set the login screen background.
Section of the script for this purpose:
#Set login background and remove dots
echo "Setting lightdm dconf settings"
xhost +SI:localuser:lightdm
su lightdm -c "gsettings set com.canonical.unity-greeter background '/background.png'"
su lightdm -c "gsettings set com.canonical.unity-greeter draw-grid false"
These same commands work if inputted directly into a terminal that is logged in as the lightdm user, for example:
sudo su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter background '/background.png'
gsettings set com.canonical.unity-greeter draw-grid false
Sets the wallpaper fine
Any ideas as to why the commands work but not the script?
Thanks