在没有开启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. css 三(清除浮动专题)

    1.  三个关于浮动的概念  不浮动float:none; 清除周围的浮动元素   float:both   这是清除浮动的本意 清除子元素浮动对父元素的影响  clearfix    很多人都理解成 ...

  2. vue模糊搜索&select取值

    之前vue1.0的过滤器真的很好使,但是作者为了不让搬运工变得太菜.硬是砍去了过滤器,为此,我还哭了好一阵,终于,一点一点的弄明白了过滤器是怎么回事后,也学明白了vue里的属性监听器computed以 ...

  3. HDU 6464.免费送气球-动态开点-权值线段树(序列中第first小至第second小的数值之和)(感觉就是只有一个状态的主席树) (“字节跳动-文远知行杯”广东工业大学第十四届程序设计竞赛)

    免费送气球 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submi ...

  4. STL容器 -- Stack

    核心:后进后出, LIFO. 头文件: #include <stack> 常用的构造方法: stack<int> st1; //构造一个空的存放 int 型的栈 stack&l ...

  5. linux——(2)文件权限与目录配置

    概念一:用户与用户组 对linux下的每一个文件或者目录来说,访问者都有三种身份:所有者,用户组,其他人.这三种人对于同一个文件的权限是可以分开设定的. 概念二:linux文件权限 文件和目录都有3种 ...

  6. WordPress漏洞扫描工具WPScan

    WordPress漏洞扫描工具WPScan   WordPress是主流的PHP网站模版,以构建博客而闻名.WordPress可以通过安装插件和主题的方式扩展功能,这也带来的安全隐患.WordPres ...

  7. 【HDU 3622】Bomb Game

    http://acm.hdu.edu.cn/showproblem.php?pid=3622 二分答案转化成2-sat问题. 上午测试时总想二分后把它转化成最大点独立集但是不会写最大点独立集暴力又秘制 ...

  8. noip2012开车旅行 题解

    题目大意: 给出n个排成一行的城市,每个城市有一个不同的海拔.定义两个城市间的距离等于他们的高度差的绝对值,且绝对值相等的时候海拔低的距离近.有两个人轮流开车,从左往右走.A每次都选最近的,B每次都选 ...

  9. 【Floyd】POJ2139 -Six Degrees of Cowvin Bacon

    普通的Floyd了分分秒可以水过,结果在submit前删调试段落的时候把程序本体给删了吃了两个WA…… #include<iostream> #include<cstring> ...

  10. Problem A: 零起点学算法80——逆序输出(数组练习)

    #include<stdio.h> int main() { ]; scanf("%d",&n); ;i<=n;i++){ scanf("%d& ...