Where can I get a list of SCHEMA / PATH / KEY to use with gsettings?

17,723

Solution 1

gsettings list-schemas gets you all the schema. You can also use gsettings list-recursively for what you want but this program will list all the values for all the keys for all schemas:
(Lest's call the script gsettings-iterate-all)

#!/bin/bash
# Gnome 3 can be customised from the command line via the gsettings command
# This script should help you to find what you're looking for by
# listing the ranges for all keys for each schema

for schema in $(gsettings list-schemas | sort)
do
    for key in $(gsettings list-keys $schema | sort)
    do
        value="$(gsettings range $schema $key | tr "\n" " ")"
        echo "$schema :: $key :: $value"
    done
done

Expanding on your example gsettings-iterate-all | grep com.canonical.Unity2d.Launcher yields

com.canonical.Unity2d.Launcher :: edge-decayrate :: type i 
com.canonical.Unity2d.Launcher :: edge-overcome-pressure :: type i 
com.canonical.Unity2d.Launcher :: edge-responsiveness :: type d 
com.canonical.Unity2d.Launcher :: edge-reveal-pressure :: type i 
com.canonical.Unity2d.Launcher :: edge-stop-velocity :: type i 
com.canonical.Unity2d.Launcher :: hide-mode :: type i 
com.canonical.Unity2d.Launcher :: only-one-launcher :: type b 
com.canonical.Unity2d.Launcher :: reveal-mode :: type i 
com.canonical.Unity2d.Launcher :: super-key-enable :: type b 

You can reroute the output to a file for easy reading.

And for creative folks out there. Here is a list of possible options to gsettings that might help create other scripts.

Solution 2

It's a bit late, but I just started wrestling with this privacy concern...

It looks like com.canonical.Unity.Lenses remote-content-search 'none' is the toggle you seek.

Share:
17,723
Sri
Author by

Sri

Updated on September 18, 2022

Comments

  • Sri
    Sri over 1 year

    After doing some research, I found that I can quickly set configuration options using the gsettings command in the terminal, instead of installing dconf-editor or gconf-editor or CCSM.

    But we need the SCHEMA/PATH and KEY to set the value.
    Syntax is:

    gsettings set SCHEMA[:PATH] KEY VALUE
    

    For example to never auto-hide the launcher:

    gsettings set com.canonical.Unity2d.Launcher hide-mode 0
    

    And, for windows not to overlap the launcher:

    gsettings set com.canonical.Unity2d.Launcher use-strut true 
    

    So, where can I get a list of all the SCHEMA / PATH / KEY that can be set with gsettings?

    No, please don't suggest the gsettings list-keys command, because I don't know the possibly hundreds of schema available.

  • Sri
    Sri almost 12 years
    Rinzwind, Thank you for the additional useful information. I realized after I posted the question that a full list was available using the command gsettings list-recursively, but like you say, you have given great additional info for creative folks :)
  • Zta
    Zta over 11 years
    If you want the keys' default value, this may be of interest: askubuntu.com/questions/196896/…
  • Aditya
    Aditya about 11 years
    The question asks about where we can get the list of complete Schema. You are providing the one which relates to privacy. This doesn't really answer the question that is asked.
  • Sergiy Kolodyazhnyy
    Sergiy Kolodyazhnyy almost 9 years
    Very useful ! +1
  • Volker Siegel
    Volker Siegel over 7 years
    @Rinzwind As a practical note that may be useful: Do not call call a test script test (I edited it out). Starting test will work just fine - and perfectly do it's job. But it may be /usr/bin/test; To make it really fast, it's also a shell builtin. - It's job with no arguments is to return exit code 0 and keep quiet. (see man test)
  • user3757405
    user3757405 over 3 years
    An enhancement suggestion: change to for schema in $(gsettings list-schemas | grep "^$1" | sort), to allow things like gsettings-iterate-all com.canonical
  • Snackoverflow
    Snackoverflow over 2 years
    For anyone trying to find and disable/modify a certain keybinding, check out this answer which uses a slightly modified version of the same script. The thing is, if you are looking for a certain value from GSettings, the script above does not print out the values, so you must use list-recursively for that.