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的上传文件系统完全挂了,可执行程序在
这里。
发表于 @ 2007年05月26日 23:12:00|评论(loading...)|编辑