GConf错误:没有D-BUS守护进程运行?! 如何重新安装或修复?

安装Konquerer并重新启动我的笔记本电脑后,我尝试以终端内的root身份打开,编辑或访问文件时出现以下错误(这对我来说是存在的)。

root @ linuxBox:/ home / v2r # gnome-open /home/

(gnome-open:2686):GConf-WARNING **:客户端无法连接到D-BUS守护程序:// bin / dbus-launchexception终止,出现以下错误:未指定协议自动启动错误:X11初始化失败。

GConf错误: 没有D-BUS守护程序正在运行

root @ linuxBox:/ home / v2r#未指定协议无法解析参数:无法打开显示:

看来,dbus还没有正确安装在/bin//usr/bin/查看截图: 在此处输入图像描述

我将如何解决这个问题并提前谢谢你?!!!


谢谢你的回答SirCharlo! 它根本无法解决问题。 请注意,它只发生在root!

root @ linuxBox:/ home / v2r # gnome-open /home/

(gnome-open:5170):GConf-WARNING **:客户端无法连接到D-BUS守护程序:无法连接到socket / tmp / dbus-2RdCUjrZ9k:连接被拒绝GConf错误:没有运行D-BUS守护程序

root @ linuxBox:/ home / v2r#未指定协议无法解析参数:无法打开显示:

SirCharlo的回答对我有用。 在ubuntu 12.04(精确穿山甲)上也存在同样的问题。 是的,我也使用su(root)。 惭愧,羞耻。 同样的问题也开始emacs。

问题似乎是当你su而不是在/root/.dbus/session-bus/中获取值时,DBUS_SESSION_BUS_ADDRESS会保留其值

来自man dbus-launch:

  ... The second common reason for autolaunch is an su to another user, and display of X applications running as the second user on the display belonging to the first user. Perhaps the ideal fix in this case would be to allow the second user to connect to the session bus of the first user, just as they can connect to the first user's display. However, a mechanism for that has not been coded. ... 

使用sudo,suedit,gksu。

或者,如果你必须使用su,那么尝试将它添加到你的/root/.bashrc:

 sessionfile=`find "${HOME}/.dbus/session-bus/" -maxdepth 1 -type f` if [ -f "$sessionfile" ] ; then if grep -q "^DBUS_SESSION_BUS_ADDRESS=" "${sessionfile}" ; then export `grep "^DBUS_SESSION_BUS_ADDRESS=" "${sessionfile}"` else echo "DBUS_SESSION_BUS_ADDRESS not found in ${sessionfile}" fi else echo "no session address file found in ${HOME}/.dbus/session-bus" fi 

我有同样的问题。 在我的系统中,问题是由root拥有~/.dbus引起的。 改变所有权我解决了我的问题。 我建议你在你的系统上查看这个。

可以使用chown命令更改所有权。 对于单个文件:

 chown : file 

对于目录及其子目录:

 chown -R : folder 

那么,在这种情况下,

 chown -R : ~/.dbus 

应该管用。

尝试export $(dbus-launch)
这在Opensuse 12.1上运行,同时作为VM运行。

你能试试吗?

 sessionfile=`find "${HOME}/.dbus/session-bus/" -type f` export `grep "DBUS_SESSION_BUS_ADDRESS" "${sessionfile}" | sed '/^#/d'` 

然后重试你的命令..

 gnome-open /home/ 

我也遇到过dbus和vnc的问题。 所以我补充道

 eval `dbus-launch` 

~/.vnx/xstartup 。 它为我开始gnome会话!

删除/var/lib/dbus/machine-id ,一切都更好

以上修复还修复了:

 (virt-manager:2810): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Failed to connect to socket /tmp/dbus-vYNPgtHXG7: Connection refused (virt-manager:388): No D-BUS daemon running 

我可以使用su命令root@localhost# dbus-launch virt-manager运行virt-manager

我的Ubuntu机器上有这个问题。 安装dbus-x11解决了这个问题:

sudo apt install dbus-x11