Fails to set background from drag and dropped picture
During SpinachCon 2018, we did some user testing. One of the items we asked people to do was set a wallpaper. Some of the users tried dragging and dropping an image onto the chooser dialogue, which seemed to work, but when they tried to set it the previous background remained selected.
A quick look at the errors produced:
(gnome-control-center:20980): background-cc-panel-WARNING **: 13:04:33.192: Could not fill pictures source: Error opening directory '/home/maulkin/.cache/gnome-control-center/backgrounds': Permission denied
(gnome-control-center:20980): background-cc-panel-WARNING **: 13:04:41.490: Failed to create directory '/home/maulkin/.cache/gnome-control-center/backgrounds'
.cache/gnome-control-center does exist but has the odd permissions
d-w-r-xr-T (octal 1254), which doesn't really make much sense. If you delete this folder, it's re-created with mode 1254. Chmodding it to 0700 works, but then
.cache/gnome-control-center/backgrounds is created with mode 1254. Chmodding both of these then leads to the background being set properly, so it seems to be the permissions issue is causing the root problem.
Having a dig through the code, the only thing I can guess which may be causing an issue is in
panels/background/cc-background-panel.c line 427, which calls
g_mkdir_with_parents (cache_path, USER_DIR_MODE). As far as I can tell, this should be working with 0700 from meson.build, and seems to go through via g_mkdir to mkdir(2), so at this point, I've run out of ideas as to what's going on.
This has been tested using GNOME 3.28 in Debian Testing and OpenSUSE Tumbleweed.