在没有开启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. 是时候升级你的Js工具了-分页【基于JQ】

    好久没有来逛园子,也好久没有更新博客,就像沉睡已久的人忽然被叫醒,忽然就被园友的回复惊醒了.园友提出了关于我之前一篇文章的疑问——可那已经是半年以前的博客了,加上我一直觉得分享给大家的应该是我最新的思 ...

  2. JavaScript性能优化【转载】

    你愿意为打开一个网页等待多长时间?我一秒也不愿意等.但是事实上大多数网站在响应速度方面都让人失望.现在越来越多的人开始建立自己的网站,博客,你的网页响应速度如何呢?在这篇文章中我们来介绍一下提高网页性 ...

  3. 前端读者 | Javascript设计模式理论与实战:状态模式

    本文来自 @狼狼的蓝胖子:链接:http://luopq.com/2015/11/25/design-pattern-state/ 在软件开发中,很大部分时候就是操作数据,而不同数据下展示的结果我们将 ...

  4. BotBuilder Nodejs示例查看

    关于Bot Framework知识,可以参考<Nodejs Bot学习> 本文是根据bot framework官方示例<https://github.com/Microsoft/Bo ...

  5. 洛谷P1919 A*B problem 快速傅里叶变换模板 [FFT]

    题目传送门 A*B problem 题目描述 给出两个n位10进制整数x和y,你需要计算x*y. 输入输出格式 输入格式: 第一行一个正整数n. 第二行描述一个位数为n的正整数x. 第三行描述一个位数 ...

  6. python笔记一:函数的参数

    1.默认参数 def fun(x,y,z=3): sum=x+y+z return sum fun(1,2) 2.可变参数(两种方法定义) def fun(n): sum=0 for i in n: ...

  7. 循序渐进PYTHON3(十三) --5-- DJANGO请求处理流程

    上面的流程图可以大致描述Django处理request的流程,可以分为以下几个步骤: 1. 用户通过浏览器请求一个页面 2. 请求到达Request Middlewares,中间件对request做一 ...

  8. 使用html+css实现三角标示符号

    我们平常打开某个网站的时候,常常会发现网页上很多导航或者指示条会使用一个三角符号去指向内容,效果简洁美观,甚至很多前端面试中也会提及如何在网页上实现一个三角符号,这里给出一个很简单使用的实现方式. 首 ...

  9. [Agc008F]Black Radius

    [AGC008F] Black Radius Description 给你一棵有N个节点的树,节点编号为1到N,所有边的长度都为1 "全"对某些节点情有独钟,这些他喜欢的节点的信息 ...

  10. 【推导】Codeforces Round #410 (Div. 2) C. Mike and gcd problem

    如果一开始就满足题意,不用变换. 否则,如果对一对ai,ai+1用此变换,设新的gcd为d,则有(ai - ai+1)mod d = 0,(ai + ai+1)mod d = 0 变化一下就是2 ai ...