当前位置: 代码迷 >> 综合 >> debian(wheezy) gvim GConf-WARNING **: Client failed to connect to the D-BUS daemon:
  详细解决方案

debian(wheezy) gvim GConf-WARNING **: Client failed to connect to the D-BUS daemon:

热度:11   发布时间:2023-12-08 03:10:26.0

最近在打开tmux的时候, 切到root, 执行gvim xxx的时候, 会弹出一个错误

oot@debian:/# gvim 1.txt(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.(gvim:6040): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.


意思就是D-bus守护进程没开, 关键是我是以root启用的. 以前都没出现过. 想起来最近貌似经常切的太快, 用的alias 的sr = su root, 没用su - 

缺少了root登录的环境. 也就是会少加载~/.bash_profile ,进而缺乏相应的授权支持. 

所以很简单, 把alias的sr = su root 改成 su -  或者su - root 即可, 

或者把/usr/bin/gvim 替换成 dbus-launch --exit-with-session /usr/bin/gvim 来启动gvim, 不过这种会因为拿不到session, 进而报一条错误.

(gvim:6642): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.



  相关解决方案