Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
39
rated 0 times [  39] [ 0]  / answers: 1 / hits: 18666  / 2 Years ago, wed, december 8, 2021, 2:36:35

I'm trying to change a string based dconf key with a bash script, using the following command line:



dconf write /org/gnome/nautilus/preferences/show-directory-item-counts 'never'


But it return the following error:



error: 0-5:unknown keyword

Usage:
dconf write KEY VALUE

Write a new value to a key

Arguments:
KEY A key path (starting, but not ending with '/')
VALUE The value to write (in GVariant format)


Can someone help me?



edit 1 : I'm trying to make nautilus to not count the number of item in the directory (for optimization purpose)


More From » bash

 Answers
1

The value needs additional quoting i.e. to assign GVariant string value 'foo' you need to write the value argument as "'foo'"



dconf write /org/gnome/nautilus/preferences/show-directory-item-counts "'never'"


See dconf — Simple tool for manipulating a dconf database at https://developer.gnome.org/


[#24468] Thursday, December 9, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lowovey

Total Points: 287
Total Questions: 98
Total Answers: 117

Location: Bosnia and Herzegovina
Member since Thu, Jan 14, 2021
3 Years ago
;