getting session bus failed: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

时间:2018-08-28 19:46:21   收藏:0   阅读:973

今天在调试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可执行程序就不会出现类似的错误了。

 

原文:https://www.cnblogs.com/hjj801006/p/9550083.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!