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

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

我尝试更改我的 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"

我得到了我不喜欢的结果。

你能帮我撤销更改吗?

答案1

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.

...特别是reset子命令:

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

Reset KEY to its default value
...

所以:

gsettings reset org.gnome.desktop.interface gtk-theme
gsettings reset org.gnome.desktop.wm.preferences theme

个人观察:我从未改变过我的主题或图标包并gsettings get …显示'Ambiance'两者。

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

答案2

打开终端++Ctrl并运行以下命令:AltT

重置图标包

gsettings set org.gnome.desktop.interface icon-theme ''

重置主题

gsettings set org.gnome.desktop.interface gtk-theme ''

gsettings set org.gnome.desktop.wm.preferences theme ''

运行此命令后注销并重新登录或重新启动。

相关内容