I tried adding the gsettings command to /usr/sbin/guest-account and ran it manually, i.e.:
$ sudo /usr/sbin/guest-acccount add
It gives the error:
(process:27140): dconf-CRITICAL **: unable to create directory '/run/user/1000/dconf': Permission denied. dconf will not work properly.
So the 'su' inside /usr/sbin/guest-account doesn't work in this case. In particular, gsettings is requiring $XDG_RUNTIME_DIR to exist and be set, this doesn't occur until the guest session has logged in.
I tried adding the gsettings command to /usr/sbin/ guest-account and ran it manually, i.e.:
$ sudo /usr/sbin/ guest-acccount add
It gives the error:
(process:27140): dconf-CRITICAL **: unable to create directory '/run/user/ 1000/dconf' : Permission denied. dconf will not work properly.
So the 'su' inside /usr/sbin/ guest-account doesn't work in this case. In particular, gsettings is requiring $XDG_RUNTIME_DIR to exist and be set, this doesn't occur until the guest session has logged in.