今天在调试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: Autolaunch error: X11 initialization failed.的更多相关文章

  1. /usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity on endpoint naughty_wozniak (444e26e0a2a3adb1ff88177ead86099ad64c0406afcec179ce7cfeef8ffa2d5c): (i

    /usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity ...

  2. [ERROR][org.springframework.web.context.ContextLoader][main] Context initialization failed org.sprin

    做一个SSH为基础框架的webapp小DEMO,复制了一把以前可以跑的代码,竟发现无法初始化数据源,报错如下: [ERROR][org.springframework.web.context.Cont ...

  3. namenode 和datanode无法启动,错误:FSNamesystem initialization failed. datanode.DataNode: Incompatible namespaceIDs

    问题一: namenode无法启动,查看日志,错误信息如下: org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem ini ...

  4. ERROR: transport error 202: bind failed: Address already in use

    早上上班,同事反应服务上不去,后台看了一下,发现tomcat挂掉了,重新启动tomcat时报错. ERROR: transport error 202: bind failed: Address al ...

  5. [ERROR] Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected

    1:出现此种错误应该是jar版本包冲突了,启动hive的时候,由于hive依赖hadoop,启动hive,会将hadoop的配置以及jar包等等导入到hive中,导致jar包版本冲突,下面贴一下错误, ...

  6. org.springframework.beans.factory.BeanCreationException,Invocation of init method failed,Context initialization failed

    G:\javaanzhuang\apache-tomcat-\bin\catalina.bat run [-- ::,] Artifact ssm_qingmu02_web:war exploded: ...

  7. docker启动时报错Error response from daemon: driver failed programming external connectivity on endpoint *

    公司服务器由于断电重启,部署在docker服务上的一些web服务需要重新开启容器, [root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND C ...

  8. [转]error MSB4018: The "GenerateResource" task failed unexpectedly

    本文转自:https://github.com/Microsoft/msbuild/issues/364 After uninstall Visual Studio 2015 Update 1 RC ...

  9. hive_异常_01_ Terminal initialization failed; falling back to unsupported

    一.异常现象 hive初始化数据库时,在执行了 schematool -initSchema -dbType mysql 这个命令时,终端抛出如下异常: [ray@rayner bin]$ schem ...

随机推荐

  1. [leetcode/lintcode 题解] Amazon面试题:连接棒材的最低费用

    为了装修新房,你需要加工一些长度为正整数的棒材 sticks. 如果要将长度分别为 X 和 Y 的两根棒材连接在一起,你需要支付 X + Y 的费用. 由于施工需要,你必须将所有棒材连接成一根. 返回 ...

  2. break statement not within loop or switch报错

    break statement not within loop or switch. 注意你的循环,可能多加了个分号.for语句后面?

  3. vue同时安装element ui跟 vant

    记一个卡了我比较久的问题,之前弄的心态爆炸各种问题. 现在来记录一下,首先我vant是已经安装成功了的. 然后引入element ui npm i element-ui -S 接着按需引入,安装插件 ...

  4. Python循环控制语句

    Python循环控制语句:主要有三种,break.continue 和 pass 语句. break   语句 :在语句块执行过程中,终止循环.并跳出整个循环. continue 语句  :在语句执行 ...

  5. PHP array_splice() 函数

    实例 从数组中移除元素,并用新元素取代它: <?php$a1=array("a"=>"red","b"=>"gr ...

  6. PHP tempnam() 函数

    定义和用法 tempnam() 函数在指定的目录中创建一个具有唯一文件名的临时文件. 该函数返回新的临时文件名,如果失败则返回 FALSE. 语法 tempnam(dir,prefix) 参数 描述 ...

  7. PHP is_bool() 函数

    is_bool() 函数用于检测变量是否是布尔型.高佣联盟 www.cgewang.com PHP 版本要求:PHP 4, PHP 5, PHP 7 语法 bool is_bool ( mixed $ ...

  8. 2020牛客暑期多校训练营 第二场 I Interval 最大流 最小割 平面图对偶图转最短路

    LINK:Interval 赛时连题目都没看. 观察n的范围不大不小 而且建图明显 考虑跑最大流最小割. 图有点稠密dinic不太行. 一个常见的trick就是对偶图转最短路. 建图有点复杂 不过建完 ...

  9. 4.11 省选模拟赛 序列 二分 线段树优化dp set优化dp 缩点

    容易想到二分. 看到第一个条件容易想到缩点. 第二个条件自然是分段 然后让总和最小 容易想到dp. 缩点为先:我是采用了取了一个前缀最小值数组 二分+并查集缩点 当然也是可以直接采用 其他的奇奇怪怪的 ...

  10. 加载Properties文件工具类:LoadConfig

    import javax.servlet.http.HttpServletRequest; import javax.ws.rs.GET; import javax.ws.rs.Path; impor ...