从 Ubuntu 14.10 升级到 15.10 后,似乎不再支持gnome-terminal使用更改首选项gconftool-2。我猜这个问题与Gconf 与 GSettings 迁移有关。
现在,我想更改我的一些旧脚本(因为它们在 Ubuntu 15.10 中已损坏)以使用dconf/gesettings而不是gconftool-2.
例如,在 Ubuntu 14.10(gnome-terminal版本 3.6.2)上,我可以使用以下方法设置Default配置文件中的列数:
$ gconftool-2 --set /apps/gnome-terminal/profiles/Default/default_size_columns \
--type=int 140
$ gconftool-2 --set /apps/gnome-terminal/profiles/Default/use_custom_default_size \
--type=bool true
Run Code Online (Sandbox Code Playgroud)
现在,在 Ubuntu 15.10 中,输入:
$ dconf list /org/gnome/terminal/legacy/
Run Code Online (Sandbox Code Playgroud)
给
profiles:/
schema-version
Run Code Online (Sandbox Code Playgroud)
然而
$ gsettings list-relocatable-schemas | grep Terminal
Run Code Online (Sandbox Code Playgroud)
给
org.gnome.Terminal.SettingsList
org.gnome.Terminal.Legacy.Profile
org.gnome.Terminal.Legacy.Keybindings
Run Code Online (Sandbox Code Playgroud)
上面的输出让我感到困惑:
/org/gnome/terminal/legacy/profiles:/路径dconf但没有org.gnome.Terminal.Legacy.Profiles(注意尾随s)模式 ID …