gconftool设置其他用户的选项
发表于:2010年04月28日  分类:技术  Comments Off  53 次浏览 

想用root设置其它用户的某些配置。比如叫test
su – test -c “gconftool-2 –set ….”是不行
其实用gconftool的一个–config-source选项就可以了,
指定格式为
–config-source=xml::/home/test/.gconf
这样就能设置test的内容了,如果我们去看里面相应的xml文件,发现结果是立即更新的
但是如果你有客户端程序(gconf client)已经运行的话,必须重启客户端才行
比如kill -HUP。
只重启 gconfd-2是不行的。
麻烦

固定链接: http://liubin.nanshapo.com/2010/04/28/gconftool%e8%ae%be%e7%bd%ae%e5%85%b6%e4%bb%96%e7%94%a8%e6%88%b7%e7%9a%84%e9%80%89%e9%a1%b9/ | 其实我是一个程序员

报歉!评论已关闭.