1

I have a cron job which runs every 30 minutes that changes the background image by running this bash script:

#!/bin/bash

export DISPLAY=:0
export GSETTINGS_BACKEND=dconf

wpdir="/home/username/Pictures/wallpapers/"
prefix="file://"
file=`ls $wpdir | shuf -n 1`
gsettings set org.gnome.desktop.background picture-uri "$prefix$wpdir$file"

This worked perfectly until I upgraded to 14.04. Now, running the script produces this output:

(process:27459): dconf-WARNING **: failed to commit changes to dconf: Could not connect: Connection refused

What can I do to fix this? Google didn't turn up any useful results.

EDIT: I noticed that running this does change the background displayed on the lock screen, but it does not affect the desktop background.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.