dconf-editor 里面能否删除一些键值

各种窗口管理器和美化相关
回复
头像
bcsflilong
帖子: 382
注册时间: 2010-07-24 15:18
系统: Arch Linux x86_x86_6
来自: 吉林省长春市
联系:

dconf-editor 里面能否删除一些键值

#1

帖子 bcsflilong » 2014-11-22 21:34

我发现 没有删除的选项

例如 我要删除 apps.indicators.chinaweather 这个配置 不知道如何删除 :em20
life's a struggle
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: dconf-editor 里面能否删除一些键值

#2

帖子 poloshiao » 2014-11-22 21:50

試試 gsettings
http://manpages.ubuntu.com/manpages/tru ... ngs.1.html
gsettings set SCHEMA [:PATH] KEY VALUE

set
Sets the value of KEY to VALUE. The value is specified as a serialised GVariant.
头像
bcsflilong
帖子: 382
注册时间: 2010-07-24 15:18
系统: Arch Linux x86_x86_6
来自: 吉林省长春市
联系:

Re: dconf-editor 里面能否删除一些键值

#3

帖子 bcsflilong » 2014-11-22 22:11

poloshiao 写了:試試 gsettings
http://manpages.ubuntu.com/manpages/tru ... ngs.1.html
gsettings set SCHEMA [:PATH] KEY VALUE

set
Sets the value of KEY to VALUE. The value is specified as a serialised GVariant.
这样是给重新赋值 不能删除这个节点呀
life's a struggle
头像
bcsflilong
帖子: 382
注册时间: 2010-07-24 15:18
系统: Arch Linux x86_x86_6
来自: 吉林省长春市
联系:

Re: dconf-editor 里面能否删除一些键值

#4

帖子 bcsflilong » 2014-11-22 22:14

poloshiao 写了:試試 gsettings
http://manpages.ubuntu.com/manpages/tru ... ngs.1.html
gsettings set SCHEMA [:PATH] KEY VALUE

set
Sets the value of KEY to VALUE. The value is specified as a serialised GVariant.
如图
1.png
我要删除 apps.indicators.chinaweather 及其所有的key 怎么删除呀
life's a struggle
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: dconf-editor 里面能否删除一些键值

#5

帖子 poloshiao » 2014-11-23 7:41

試試

1. 先列出所有 apps.indicators.chinaweather 的 key
gsettings list-keys SCHEMA [:PATH]
gsettings list-keys apps.indicators.chinaweather

2. 把 上面的 key 值 改為預設值
gsettings reset SCHEMA [:PATH] KEY
gsettings reset apps.indicators.chinaweather KEY

3. 全部 key 一次 改為預設值
gsettings reset-recursively SCHEMA [:PATH]
gsettings reset-recursively apps.indicators.chinaweather

4. 把 上面的 key 值 一個一個改為 期望值
gsettings set SCHEMA [:PATH] KEY VALUE
gsettings reset apps.indicators.chinaweather KEY VALUE
這裡提供的 VALUE 需要合於格式要求

5. 注意 D-Bus 必須已經連接至 dconf database
Note that gsettings needs a D-Bus session bus connection to write changes to the dconf database.

6. 進一步參閱
http://askubuntu.com/questions/416556/s ... e-database

7. 補充說明
Ubuntu
從 Gconf
http://en.wikipedia.org/wiki/GConf
轉向 Dconf
http://en.wikipedia.org/wiki/Dconf
這個轉向需要歷經好幾個 Ubuntu 版本 才能完成
7-1. Gsettings 是 幫助這個轉向順利的一個中間工具程式
7-2. 這一篇 有很好的說明 跟實例
http://wiki.mate-desktop.org/docs:gsettings
7-3. 由於動態轉向 所以每個 Ubuntu 版本 可能進度都不同
意思是 參考網路文章 或 提問
一定要注意 Ubuntu 版本
dconf-editor 里面能否删除一些键值
8. http://ubuntuforums.org/showthread.php?t=1882053
這一篇文章建議
在不是非常了解 dconf 資料庫 以前
不建議 隨便刪除 key
但是 可以修改 key 的值
回复