Bug 12632

Summary: matchbox: gconf isn't able to apply changes
Product: [Runtime] General Runtime Reporter: Alejandro Hernandez <alejandr>
Component: General RuntimeAssignee: Jaewon Lee <jaewon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: randy.macleod, ross.burton, stephano
Version: unspecified   
Target Milestone: 2.5 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alejandro Hernandez 2018-03-28 14:34:59 UTC
When building an image with a graphical interface (without the packagegroup-core-x11-sato), gconf isn't able to apply configuration changes, for example:

invoking matchbox-appearance shows the following error:


GConf Error: Configuration server couldn't be contacted: D-BUS error: Can't overwrite existing read-only value: Value for `/desktop/poky/interface/theme' set in a read-only source at the front of your configuration path
GConf Error: Configuration server couldn't be contacted: D-BUS error: Can't overwrite existing read-only value: Value for `/desktop/poky/interface/matchbox_theme' set in a read-only source at the front of your configuration path
GConf Error: Configuration server couldn't be contacted: D-BUS error: Can't overwrite existing read-only value: Value for `/desktop/poky/interface/icon_theme' set in a read-only source at the front of your configuration path


And if we try to change the font size for example, this is shown:


GConf Error: Configuration server couldn't be contacted: D-BUS error: Can't overwrite existing read-only value: Value for `/desktop/poky/interface/font_name' set in a read-only source at the front of your configuration path

The only thing changing here is <font_name>, but its still the same error.

D-Bus is telling the gconf client that the server couldn't make those changes because they are read-only values, (this can also be reproduced by invoking gconf itself).

Digging a little more we can see that these values are stored on /etc/gconf/gconf.xml.defaults/... and they are created at build time by the matchbox-session recipe, but they are system-wide (hence why gconf refuses to change them), changing the permissions does not make any difference, so what gconf really wants is to make changes per user on $HOME/$USER/.config/.gconf, sadly  $HOME/$USER/.config does not exist by default, creating it and rebooting solves the problem and gconf is able to create the gconf folder and make changes to it.

What was interesting here is that something in the packagegroup-core-x11-sato was creating the folder, hence why we cant see this same error on core-image-sato images and such.

After doing some more investigation we realized that the folder wasn't being created at build time, but at runtime during the first boot, and the software responsible for doing that was: start-pulseaudio-x11, when first started it creates the $HOME/$USER/.config/ folder which the gconf server is later able to use without any problems.

And the reason why we haven't seen this issue before is that packagegroup-core-x11-sato has the following line:

${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-client-conf-sato pulseaudio-misc', '', d)}

and pulseaudio is on DISTRO_FEATURES_BACKFILL so it gets added by utils.py.

The issue can be reproduces if we build core-image-sato and remove pulseaudio from DISTRO_FEATURES.

So, even if we can't see this bug easily, I still believe gconf shouldn't be dependant on pulseaudio to work properly.

I see two feasible solutions:

- Patch gconf to be able to do mkdir -p .config/gconf

- Create the .config folder by default on IMAGE_PREPROCESS_COMMAND or something, but we would have to deal with creating a folder per user and we don't have ${homedir} or something like that to achieve that.
Comment 1 Ross Burton 2018-03-28 14:49:41 UTC
Another solution is to run xdg-userdirs on login which I believe will also create .config.

However, I'd agree that gconfd should be creating the directory it wants to write into.  There's a number of reasons why it may not exist already.
Comment 2 Ross Burton 2018-04-19 04:54:20 UTC
Merged in oe-core 4d16fa05e47ccc8425ebb085c295d7d8dca6b2e6.