在没有开启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程序即可。

最新文章

  1. sqlplus无密码登录TNS协议适配器错误
  2. 云主机-vps购买
  3. oc总结
  4. 四个常用.NET的SqlHelper的方法
  5. iOS开发——设备信息小结(未完待续...)
  6. CMOS门电路
  7. 链表中倒数第k个节点(Java)
  8. (转)springcloud(一):大话Spring Cloud
  9. Nginx 开启目录下载
  10. ABP+AdminLTE+Bootstrap Table权限管理系统第十一节--Bootstrap Table用户管理列表以及Module Zero之用户管理
  11. Zabbix报警执行远程命令
  12. SpringData Redis
  13. ajax 简介0
  14. X Window(远程桌面)
  15. Android 常用动画之RotateAnimation
  16. Golang Vendor 包管理工具 glide 使用教程
  17. 如何更改webstrom的默认端口63342
  18. 独立开发人员低成本推广APP的18条技巧
  19. sqlserver查询最接近的记录
  20. 原创Java多线程详解(一)

热门文章

  1. 如何将json拼接在url后面当做地址栏参数?
  2. 洛谷——P1177 【模板】快速排序
  3. ABP+NetCore+Vue.js实现增删改查
  4. Python开发基础-Day8-装饰器扩展和迭代器
  5. Web会话安全分析工具ProxyStrike
  6. Spring事务传播性
  7. UML动态模型(顺序图、协作图、状态图)
  8. hdu 4825(Trie)
  9. 【Splay】bzoj3224 Tyvj 1728 普通平衡树
  10. 【概率论】hdu5985 Lucky Coins