LightDM doesn't show the user background

Just in case somebody uses my script, I’ve noticed a bug in it. Here is a small update (that would also fix another issue specific to Ubuntu MATE 17.10):

#!/bin/bash

function setuserbackground(){
	export USERBACKGROUND=`gsettings get org.mate.background picture-filename | tail -c +2 | head -c -2`
	dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User`id -u` org.freedesktop.Accounts.User.SetBackgroundFile string:"$USERBACKGROUND"
}

setuserbackground

dbus-monitor --profile "type='signal',interface='ca.desrt.dconf.Writer',path='/ca/desrt/dconf/Writer/user',arg0path='/org/mate/desktop/background/'" |
while read -r line; do
	setuserbackground
done

The change is in the line that sets the USERBACKGROUND variable: it would remove single quotes in the whole path and thus wouldn’t work with wallpapers that have one. As for UM 17.10, it seems that bash changed the gsettings output to being between double quotes instead of single ones. The command now removes the first and last characters (the quotes) rather than quotes in the path.