gconftool的用法

gconftool是一個gconf的CLI前端,用法是很簡單滴!

1. 列出所有子目錄
語法:gconftool --all-dirs directory
stlxv@stlxvcomputer:~$ gconftool --all-dirs /
 
/desktop
 
/apps
 
/system
 
/schemas

2. 列出所有項
語法:gconftool -a directory
stlxv@stlxvcomputer:~$ gconftool -a /apps/panel/objects/object_2
 toplevel_id 
= top_panel_screen0
 bonobo_iid 
= 
 attached_toplevel_id 
= 
 use_custom_icon 
= true
 action_type 
= lock
 tooltip 
= 主菜單
 custom_icon 
= /home/stlxv/gnome-start-button/start_green.png
 launcher_location 
= 
 use_menu_path 
= false
 panel_right_stick 
= false
 object_type 
= menu-object
 position 
= 0
 locked 
= true
 menu_path 
= applications:/

3. 獲取值
語法:gconftool --get entry
stlxv@stlxvcomputer:~$ gconftool --get /apps/panel/objects/object_2/custom_icon
/home/stlxv/gnome-start-button/start_green.png

4. 獲取類型
語法:gconftool --get-type entry
stlxv@stlxvcomputer:~$ gconftool --get-type /apps/panel/objects/object_2/custom_icon
string

5. 設置值
語法:gconftool --type type --set entry value
gconftool --type bool --set /apps/panel/objects/object_2/use_custom_icon false


今天順手做了個小程序,修改GNOME主菜單圖標的(直接調用gconftool,雖然簡單,但是比較慢)。以前用tr會導致亂碼,但是用trUtf8就完全沒有亂碼了。
csdn的上傳文件系統完全掛了,可執行程序在這裏
發佈了110 篇原創文章 · 獲贊 4 · 訪問量 28萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章