gsettings command

觀看 help

執行

$ gsettings

顯示

Usage:
  gsettings --version
  gsettings [--schemadir SCHEMADIR] COMMAND [ARGS...]

Commands:
  help                      Show this information
  list-schemas              List installed schemas
  list-relocatable-schemas  List relocatable schemas
  list-keys                 List keys in a schema
  list-children             List children of a schema
  list-recursively          List keys and values, recursively
  range                     Queries the range of a key
  get                       Get the value of a key
  set                       Set the value of a key
  reset                     Reset the value of a key
  reset-recursively         Reset all values in a given schema
  writable                  Check if a key is writable
  monitor                   Watch for changes

Use 'gsettings help COMMAND' to get detailed help.

觀看版本

執行

$ gsettings --version

顯示

2.40.2

執行指令

執行

$ gsettings list-schemas

執行

$ gsettings list-relocatable-schemas

執行

$ gsettings list-recursively

執行

$ gsettings list-schemas | grep nm-applet

執行

$ gsettings list-keys org.gnome.nm-applet

執行

$ gsettings monitor org.gnome.nm-applet show-applet

執行

$ gsettings get org.gnome.nm-applet show-applet

執行

$ gsettings set org.gnome.nm-applet show-applet false

執行

$ gsettings reset org.gnome.nm-applet show-applet

觀看 manpage

執行

$ man gsettings

可以看到「gsettings」的使用說明。

查詢 gsettings 放在那個位置

執行

$ whereis gsettings

顯示

gsettings: /usr/bin/gsettings /usr/bin/X11/gsettings /usr/share/man/man1/gsettings.1.gz

查詢 gsettings 屬於那個套件

執行

$ dpkg -S /usr/bin/gsettings

顯示

libglib2.0-bin: /usr/bin/gsettings

表示「/usr/bin/gsettings」是屬於「libglib2.0-bin」這個套件。