getting session bus failed: //bin/dbus-launch terminated abnormally with the following error: Autola
Posted 足各火丁
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了getting session bus failed: //bin/dbus-launch terminated abnormally with the following error: Autola相关的知识,希望对你有一定的参考价值。
今天在调试dbus程序的时候,运行程序出现了getting session bus failed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
在网上收了一下解决方法,参考了https://blog.csdn.net/shallon_luo/article/details/4139737,最后发现是执行程序的用户不对。我是用root用户执行的程序,而session bus需要访问启动用户所在home目录的隐藏文件夹/home/xxxxx/.dbus/
该目录在用户目录xxxx下。因此,只需要将root改为用户目录即可:su xxxx。然后执行dbus可执行程序就不会出现类似的错误了。
以上是关于getting session bus failed: //bin/dbus-launch terminated abnormally with the following error: Autola的主要内容,如果未能解决你的问题,请参考以下文章
docker Failed to get D-Bus connection 报错
Failed to get D-Bus connection: Operation not permitted
在 fedora 容器中 systemctl 给出 Failed to get D-Bus connection
Failed to get D-Bus connection: Operation not permitted