相关疑难解决方法(0)

如何使用 dconf 或 gsettings 更改 gnome-terminal 配置文件首选项?

从 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 …

gnome-terminal gconf gsettings dconf

21
推荐指数
1
解决办法
1万
查看次数

标签 统计

dconf ×1

gconf ×1

gnome-terminal ×1

gsettings ×1