在没有开启x窗口的shell下启动dbus相关程序时会如上错误,详细原因如下:

This is not considered to be a bug. Auto-launching D-Bus sessions when
not under X11 would result in one new D-Bus session per application that
tried to use it, unable to communicate with other user-facing
applications that do not share that session; those sessions would also
never exit, leaving unused dbus-daemon and dbus-launch processes
building up indefinitely (until the next reboot). That's clearly not
useful or desirable, but in the absence of a clear and
machine-detectable definition of "session" we can't really improve on
it. (Under X11, the lifetime of the X server acts as the definition of
the session, so autolaunching can work and is useful.)

Applications that can usefully be run either with or without a D-Bus
session, such as pulseaudio, should treat errors in connecting to the
session bus as non-fatal, and continue to have the rest of their
functionality. I believe PA already does this, in fact; that message in
your syslog just tells you that the D-Bus part of its functionality will
not be active.

If you do need to start a D-Bus session while not under X11, you can run
dbus-launch as documented in the dbus-launch(1) man page, something like
this:

if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
        eval `dbus-launch --sh-syntax`
        echo "D-Bus per-session daemon address is:"
        echo "$DBUS_SESSION_BUS_ADDRESS"
    fi

in which case you're responsible for getting the
DBUS_SESSION_BUS_ADDRESS environment variable to all the processes that
should share the session, and managing the lifetime of the session (i.e.
killing the session's dbus-daemon when appropriate). I have sent patches
upstream to add a dbus-run-session tool that runs a session for as long
as its child process is running and then terminates it (similar
semantics to schroot), but they haven't been merged yet.

Older versions of dbus-launch tried to monitor the lifetime of text
login sessions on virtual consoles, but the way they did that would
consume every second character of input (Debian bug #453755) and it
isn't clear whether it actually ended the session on logout either. This
was fixed by several changes between squeeze and wheezy.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690530

解决办法:

先执行命令

eval `dbus-launch --sh-syntax`

在运行dbus程序即可。

dbus启动失败:Couldn't connect to system bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11的更多相关文章

  1. ubuntu启动失败the system is running in low graphics mode

    ubuntu启动失败the system is running in lowg raphics mode 起因 ubuntu重新设置selinux的模式 修改配置文件/etc/selinux/conf ...

  2. 云服务器 linux文件系统异常an error occurren during the file system check导致服务器启动失败

    云服务器 linux文件系统异常an error occurren during the file system check导致服务器启动失败 文件系统宕机,重启后报错,无法启动 处理流程: 1.编辑 ...

  3. windows service 1053错误 启动失败

    做项目移植的时候发现一个项目的window service启动失败,最后试出来是启动时间超时 解决办法是给window service设置一个长一点的等待时间,步骤如下: 启动,输入regedit启动 ...

  4. CentOS 7下MySQL服务启动失败的解决思路

    今天,启动MySQL服务器失败,如下所示: [root@spark01 ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Jo ...

  5. 服务器重启后SQL Server Agent由于"The EventLog service has not been started" 启动失败

    案例环境: 操作系统   : Microsoft Windows Server 2003 Standard Edtion SP2 数据库版本 : SQL Server 2005 Standard Ed ...

  6. IIs管理服务一直启动失败的原因之一

    首先eventlog里面的日志: 万维网发布服务(WWW 服务)没有为站点 1 注册 URL 前缀 https://*:8172/.该站点已被禁用.数据字段包含错误号. IISWMSVC_STARTU ...

  7. MySQL安装过程net start mysql 启动失败 报“错误2,系统找不到文件”的解决办法

    MySQL安装过程net start mysql 启动失败 报“错误2,系统找不到文件”的解决办法 错误2,系统找不到文件. 开始...运行... regedit  注册表项: HKEY_LOCAL_ ...

  8. avahi-daemon启动失败-解决方法-linux

         avahi-daemon是一种Linux操作系统上运行在客户机上实施查找基于网络的Zeroconf service的服务守护进程. 该服务可以为Zeroconf网络实现DNS服务发现及DNS ...

  9. Sonatype Nexus 服务启动失败问题解决

    Sonatype Nexus 服务启动失败问题解决 问题前述: 近日在开发机本机安装了 Oracle 数据库快捷版 11g2 之后,重启电脑后发现本机的maven代理服务无法访问. 现象 通过 Win ...

随机推荐

  1. srcache_nginx+redis构建缓存系统

    http://www.ttlsa.com/nginx/construction-of-srcache_nginx_redis-caching-system/ http://blog.csdn.net/ ...

  2. jquery.validate验证表单配合回调提交和h5.storage本地保存笔记

    表单验证插件我使用:jquery.validate.js 支持中文提示,可扩展性强!教程地址 本地保存状态信息使用:h5提供的storage,浏览器支持5m的存储量,存储类型必须是string类型,并 ...

  3. Unable to find a qt build, to solve this problem specify a qt build

    可能路径设置不对,比如大小写错误导致找不到qmake编译器,点击VS工具栏的QT菜单,选择options,指定qt Build所在的路径(qt安装路径),然后点击ok. 这是修改过默认安装路径的

  4. 在class中获取web资源

    背景介绍 项目中用jasperreport做报表,模板文件为web资源,不在classpath之中.class又需要获取模板文件,结合数据源,生成pdf格式的报表. 之前的做法是定义一个public ...

  5. HDU 6162 Ch’s gift (树剖 + 离线线段树)

    Ch’s gift Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total S ...

  6. Memory Allocation with COBOL

    Generally, the use of a table/array (Static Memory) is most common in COBOL modules in an applicatio ...

  7. Spring源码阅读入门指引

    本文大概的对IOC和AOP进行了解,入门先到这一点便已经有了大概的印象了,详细内容请看下文. AD: 本文说明2点: 1.阅读源码的入口在哪里? 2.入门前必备知识了解:IOC和AOP 一.我们从哪里 ...

  8. Python开发基础-Day20继承实现原理、子类调用父类的方法、封装

    继承实现原理 python中的类可以同时继承多个父类,继承的顺序有两种:深度优先和广度优先. 一般来讲,经典类在多继承的情况下会按照深度优先的方式查找,新式类会按照广度优先的方式查找 示例解析: 没有 ...

  9. Xamarin中Unsupported major.minor version 52.0问题解决

    Xamarin中Unsupported major.minor version 52.0问题解决 出现这种问题,是由于所使用的Java代码使用Java 8所才具有的特性.这个时候,需要将JDK升级到J ...

  10. asp总结

    什么是ASP.NET? ASP.NET是.NET FrameWork的一部分,是一项微软公司的技术,是一种使嵌入网页中的脚本可由因特网服务器执行的服务器端脚本技术,它可以在通过HTTP请求文档时再在W ...