syntax to override gsettings bytestring

1k views Asked by At

I am trying to define a gsetting default for nemo in an override file. The key (org.nemo.preferences bulk-rename-tool) is of type="ay", which means it's a bytestring as explained on developer.gnome.org

After setting it to gprename in nemo's preferences dialog the returned value for gsettings get org.nemo.preferences bulk-rename-tool is b’gprename’ and in the running environment I can successfully set the value with gsettings set org.nemo.preferences bulk-rename-tool "b’gprename’" But I fail at finding the correct syntax to include in an override file.

I've tried square brackets, double/single quotes, including the nul terminator as mentioned on developer.gnome.org in all kinds of combinations and variations - without success.

For example

[org.nemo.preferences]
bulk-rename-tool="b’gprename’"

leads to

# glib-compile-schemas /usr/share/glib-2.0/schemas/

error parsing key 'bulk-rename-tool' in schema 'org.nemo.preferences' as
specified in override file '/usr/share/glib-2.0/schemas/99_custom-cinnamon.gschema.override':
0-13:can not parse as value of type 'ay'.Ignoring override for this key.

Or

bulk-rename-tool=[b’gprename’]

gives

error parsing key 'bulk-rename-tool' in schema 'org.nemo.preferences' as
specified in override file '/usr/share/glib-2.0/schemas/99_custom-cinnamon.gschema.override':
1:expected value.Ignoring override for this key.

Since the default in the schema lists just empty brackets [], I have also tried stuff like

bulk-rename-tool=[b’gprename'\0]

which gives me

1.14:unterminated string constant.

So maybe this is the closest to working, just the nul terminator is apparently wrong syntax...

1

There are 1 answers

0
ElDuderino On
[org.nemo.preferences]
bulk-rename-tool=b'thunar --bulk-rename'

Don't use quotes in the config override "...". You would only use them if you set the value via cli, i.e.

$ dconf write /org/nemo/preferences/bulk-rename-tool "b'thunar --bulk-rename'"

The compile line you have posted is correct and all should work.

$ glib-compile-schemas /usr/share/glib-2.0/schemas/