Gsettings not working (to change wallpaper)

Hello,

For some reason, gsettings is not working on my installation—ubuntu 16.04 MATE 64-bit. Specifically, a command similar to

$ gsettings set org.mate.background picture-filename ‘/usr/share/backgrounds/mate/abstract/Spring.png’

has no effect. On the other hand, the wallpaper changes if I make the changes with dconf editor. It also changes if I change wallpaper via System > Look and Feel > Appearance

I need gsettings to work, because variety (a wallpaper-changer s/w) depends on it…

I can't reproduce this on my 16.04 install.

Edit

By:

You mean it doesn't change the background or it doesn't change the gsettings entry?
You can use the following command to monitor the value of picture-filename:

gsettings monitor org.mate.background

Check with Mate Tweak that the option “Show Desktop icons” is enabled.
I once disabled that option and Variety stopped changing the wallpaper.
If this is the case, this option should be called something like “dinamic desktop”.

Thanks for your reply! I mean, it doesnt change the background. When I enter the gsetting monitor command, it simply “freezes”. rather nothing happens, and it doesnt go back to the prompt.

To add, I checked the permissions of dconf/user and they seem fine (this solution was suggested elsewhere)

I had disabled it, but now I enabled it, and still no changes. Also, isnt it a bit strange that it interferes with gsettings?

Nothing will happen until you issue a gsettings set command to change the value.

Still nothing: I issued gsettings set command and then subsequently, also used dconf-editor. using dconf-editor changed background but the monitor command still didnt give any result

could it be that gsettings is looking at the wrong place, somehow? I dont exactly understand it, but when I run

$ set | grep XDG

I find XDG_RUNTIME_DIR=/run/user/1000

which contains dconf but the binary file is a very small one. otoh, ~/.config has dconf with a binary file that is probably the working one? is gsettings pointing to the wrong binary file, perhaps?

~/.config/dconf/user is 33KB in my system.
/run/user/1000/dconf/user is only 2 bytes.

same here. what do you get for XDG_RUNTIME_DIR when you try

$ set | grep XDG

XDG_CONFIG_DIRS /etc/xdg/xdg-mate:/etc/xdg
XDG_CURRENT_DESKTOP MATE
XDG_DATA_DIRS /usr/share/mate:/usr/share/mate:/usr/local/share/:/usr/share\u2026
XDG_GREETER_DATA_DIR /var/lib/lightdm-data/desa33
XDG_RUNTIME_DIR /run/user/1000
XDG_SEAT seat0
XDG_SEAT_PATH /org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP mate
XDG_SESSION_ID c1
XDG_SESSION_PATH /org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE x11
XDG_VTNR 7

okay, hmmmm. then the problem lies elsewhere.

did you check the file permissions?

-rw-rw-r-- 1 desa33 desa33 33K jun 26 16:39 user

for dconf, yeah. it is
-rw-rw-r-- 1 arun arun 17006 kesä 26 22:47 user

doesnt seem to be a permissions issue

And gsettings?
~ > which gsettings
/usr/bin/gsettings
~ > ll /usr/bin/gsettings
-rwxr-xr-x 1 root root 22K ene 6 14:32 /usr/bin/gsettings*

which gsettings
~/.anaconda3/bin/gsettings
$ ll ~/.anaconda3/bin/gsettings
-rwxrwxr-x 1 user user 50633 kesä 5 18:13 ~/.anaconda3/bin/gsettings*

And there was the problem! I just had not realized it so far—anaconda had hijacked gsettings!

Solution: I went to ~/.anaconda3/bin/gsettings and renamed it as ~/.anaconda3/bin/gsettings_old.

It works now! Thank you so much!! :slight_smile:
hopefully, this will also help someone else using anaconda (python package)

:slight_smile: great!

Wow this is weird. A binary in a hidden config folder? :confused:
And it probably added that folder to $PATH - check your ~/.bashrc and ~/.profile for the entries it might add…

Indeed, I was wondering how it could have happened. I dont remember doing anything explicitly. I did an update to anaconda recently and maybe something got goofed up. Will check bashrc and profile, thanks!