如何恢复 gsettings set org.gnome.desktop 命令的结果

zlo*_*lon 2 gnome themes gtk

我尝试更改我的 Ubuntu 18.04 的主题,这里是如何描述的

命令后

gsettings set org.gnome.desktop.interface gtk-theme "macOS High Sierra"
gsettings set org.gnome.desktop.wm.preferences theme "macOS High Sierra"
Run Code Online (Sandbox Code Playgroud)

我有我不喜欢的结果。

你能帮我恢复更改吗?

Per*_*uck 8

gsettings命令有各种子命令:

pduck@host > 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
  describe                  Queries the description 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.
Run Code Online (Sandbox Code Playgroud)

...尤其是reset子命令:

pduck@host > gsettings help reset
Usage:
  gsettings [--schemadir SCHEMADIR] reset SCHEMA[:PATH] KEY

Reset KEY to its default value
...
Run Code Online (Sandbox Code Playgroud)

所以:

gsettings reset org.gnome.desktop.interface gtk-theme
gsettings reset org.gnome.desktop.wm.preferences theme
Run Code Online (Sandbox Code Playgroud)

个人观察:我从来没有改变过我的主题或图标包,并为两者gsettings get …显示'Ambiance'

但显然这不是默认,因为当我 gsettings reset …他们,然后我得到'Ambiance'gtk-theme'Adwaita'theme。我已将它们都设置回'Ambiance'.

  • 事实上,发行版可以设置 gsettings 覆盖。这不会更改默认设置,但会在全新安装时设置替代 gsettings 值。 (2认同)