当前位置:网站首页>gconf/dconf编程实战(1)gconf和dconf介绍
gconf/dconf编程实战(1)gconf和dconf介绍
2022-08-01 14:39:00 【奇妙之二进制】
一、背景
在Windows操作系统中有注册表,同样在Linux中也有类似注册表的东西(对应用程序进行配置以及管理),Linux操作系统(Ubuntu已确认,其他系统未确认)中有两种配置存储系统:
gconf,基于XML的数据库(后端系统),它有一个界面编辑器gconf-editor。主要是在基于gnome2的Linux操作系统中,比较老。
dconf,基于BLOB的数据库(后端系统),它有一个界面编辑器dconf-editor,比较新。
在gnome3中,gconf已经完全被dconf所替代。同时还有另外一个工具:
gsettings,用于编辑设置存储后端的CLI工具,在Linux上它使用dconf,在Windows上它使用注册表,在OS X上它使用本机数据存储。
gconf也有自己的前端工具,gconftool。
二、dconf 安装和使用
在桌面系统中,一般通过界面编辑器比较方便于配置编辑,dconf-editor不一定系统有缺省安装,如果没有的话,可以通过命令安装:
sudo apt install dconf-tools
或
sudo apt install dconf-editor
安装后执行命令:
dconf-editor
即可打开界面编辑器,如:
dconf以层级的形式管理配置:
每项配置都有一些固有属性,例如类型,描述等,这个叫schema。
三、gsettings 使用
输入命令:gsettings -h,可以查看帮助信息,如:
[email protected]:~$ 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.
边栏推荐
猜你喜欢
随机推荐
牛客刷SQL--7
【无标题】
牛客刷SQL--3
微服务原生案例搭建
Pytorch —— 分布式模型训练
php gui 框架 demo
SyntaxHighlighter带来的字符转义问题
String comparison size in MySQL (date string comparison problem)
开放原子全球开源峰会原圆满结束,openEuler模式得到参会者高度认可
解读selenium webdriver
动态模型中嵌入静态模型实践
2022-08-01 Daily: 18 graphs to intuitively understand neural networks, manifolds and topology
Grafana9.0发布,Prometheus和Loki查询生成器、全新导航、热图面板等新功能!
Performance Optimization - Animation Optimization Notes
WPF如何自定义隐藏下拉框选项
龙口联合化学通过注册:年营收5.5亿 李秀梅控制92.5%股权
math.pow()函数用法[通俗易懂]
Row locks in MySQL
D - Draw Your Cards (Simulation)
产品力无提升的雷克萨斯新款ES ,为何敢于涨价?