Reputation: 829
I'm running a vagrant provisioning script and I'm trying to set the desktop background, but I can't get gsettings to take. It works fine at the command line, just not from the script. Everything else in the Vagrantfile works fine.
config.vm.provision "file", source: "image.jpg", destination: "~/image.jpg"
I use the file provision to move the file over, and then call gsettings from the non-sudo bootstrap.sh.
config.vm.provision :shell, path: "sudo-bootstrap.sh"
config.vm.provision :shell, path: "bootstrap.sh", privileged: false
In bootstrap.sh:
gsettings set org.gnome.desktop.background picture-uri file:///home/vagrant/image.jpg
I read about there not being a DBUS Session bus address, but adding the line to get the PID didn't work in the provisioning script. Also found it was perhaps missing schemas, but I don't have any schemas in .local.
Been hammering at this for a few hours now, no idea what I'm missing.
Upvotes: 1
Views: 265
Reputation: 829
While the accepted answer to the DBUS Session question didn't work for me, the linked answer under it did, Run DBUS.
dbus-launch gsettings set ...
Upvotes: 1