Mate桌面环境系统与终端模拟器参数配置
说明:
MATE桌面环境在使用中会优化一些参数配置,例如:电源选项、屏幕配置、字体配置、终端模拟器(Mate Terminal)配置等等。
通常工程师会根据自己喜好调整一些参数,修改后参数的保存位置在/home/username/.config/dconf/user,同时缓存文件会保留在/home/username/.cache/dconf/user中,当删除这两处user文件会重新加载系统默认配置。所以配置加载的顺序是:/home/username/.config/dconf/user–>系统默认配置。
系统默认参数配置位置
/usr/share/glib-2.0/schemas/ # 此目录可以通过grep来查找需要调整参数
例如:调整Scrollback参数
cd /usr/share/glib-2.0/schemas/
grep -ir "scrollback" .Binary file ./gschemas.compiled matches
./org.gnome.Terminal.gschema.xml: <key name="scrollback-lines" type="i">
./org.gnome.Terminal.gschema.xml: <summary>Number of lines to keep in scrollback</summary>
./org.gnome.Terminal.gschema.xml: <description>Number of scrollback lines to keep around. You can scroll back in the terminal by this number of lines; lines that don’t fit in the scrollback are discarded. If scrollback_unlimited is true, this value is ignored.</description>
./org.gnome.Terminal.gschema.xml: <key name="scrollback-unlimited" type="b">
./org.gnome.Terminal.gschema.xml: <summary>Whether an unlimited number of lines should be kept in scrollback</summary>
./org.gnome.Terminal.gschema.xml: <description>If true, scrollback lines will never be discarded. The scrollback history is stored on disk temporarily, so this may cause the system to run out of disk space if there is a lot of output to the terminal.</description>
./org.mate.terminal.gschema.xml: <key name="scrollback-lines" type="i">
./org.mate.terminal.gschema.xml: <summary>Number of lines to keep in scrollback</summary>
./org.mate.terminal.gschema.xml: <description>Number of scrollback lines to keep around. You can scroll back in the terminal by this number of lines; lines that don't fit in the scrollback are discarded. If scrollback_unlimited is true, this value is ignored.</description>
./org.mate.terminal.gschema.xml: <key name="scrollback-unlimited" type="b">
./org.mate.terminal.gschema.xml: <summary>Whether an unlimited number of lines should be kept in scrollback</summary>
./org.mate.terminal.gschema.xml: <description>If true, scrollback lines will never be discarded. The scrollback history is stored on disk temporarily, so this may cause the system to run out of disk space if there is a lot of output to the terminal.</description>
vim org.mate.terminal.gschema.xml
</key><key name="scrollback-lines" type="i"><default>10000</default> # 这里加载默认值<summary>Number of lines to keep in scrollback</summary><description>Number of scrollback lines to keep around. You can scroll back in the terminal by this number of lines; lines that don't fit in the scrollback are discarded. If scrollback_unlimited is true, this value is ignored.</description></key><key name="scrollback-unlimited" type="b"><default>false</default> # 关闭这里是禁用unlimited<summary>Whether an unlimited number of lines should be kept in scrollback</summary><description>If true, scrollback lines will never be discarded. The scrollback history is stored on disk temporarily, so this may cause the system to run out of disk space if there is a lot of output to the terminal.</description>
修改完文件后,需要重新编译 GSettings 模式:
glib-compile-schemas /usr/share/glib-2.0/schemas/
重新登录后生效
小结:
全用户生效,已创建用户需要更新/home/username/.config/dconf/user,新用户可加载默认配置。