v2r*_*v2r 28 system dbus services
安装 Konquerer 并重新启动我的笔记本电脑后,我在尝试从终端中以 root 用户身份打开、编辑或访问文件时出现以下错误(这对我来说是存在的)。
root@linuxBox:/home/v2r#
gnome-open /home/
(gnome-open:2686):GConf-警告**:客户端无法连接到 D-BUS 守护进程://bin/dbus-launch 异常终止,并出现以下错误:未指定协议自动启动错误:X11 初始化失败。
GConf 错误:没有 D-BUS 守护进程在运行
root@linuxBox:/home/v2r# 未指定协议 无法解析参数:无法打开显示:
此外,似乎 dbus 没有正确安装/bin/
并/usr/bin/
查看屏幕截图:
我将如何解决这个问题并提前谢谢你?!!!
感谢您的回答 SirCharlo!它根本不能解决问题。请注意,它只发生在 bee root 时!
root@linuxBox:/home/v2r#
gnome-open /home/
(gnome-open:5170): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Failed to connect to socket /tmp/dbus-2RdCUjrZ9k: Connection denied GConf Error: No D-BUS daemon running
root@linuxBox:/home/v2r# 未指定协议 无法解析参数:无法打开显示:
小智 32
我有同样的问题。在我的系统中,问题是~/.dbus
由 root 拥有的。改变所有权我解决了我的问题。我建议你也检查一下你的系统。
可以使用chown
命令更改所有权。对于单个文件:
chown <user>:<group> file
Run Code Online (Sandbox Code Playgroud)
对于目录及其子目录:
chown -R <user>:<group> folder
Run Code Online (Sandbox Code Playgroud)
所以,在这种情况下,
chown -R <your user>:<your group> ~/.dbus
Run Code Online (Sandbox Code Playgroud)
应该管用。
查洛爵士的回答对我有用。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.
...
Run Code Online (Sandbox Code Playgroud)
使用 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
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
126282 次 |
最近记录: |