Dbus boot failure: couldn ' t connect to system bus:unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Source: Internet
Author: User
Tags sessions

When you start the Dbus related program in a shell that does not have the X window open, the following error occurs, for detailed reasons:

This isn't a considered to be a bug. Auto-launching D-bus Sessions when
Not under X11 would result in one new D-bus session per application
Tried to use it, unable to communicate and other user-facing
Applications that does not share the 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 is 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 has the rest of their
Functionality. I believe PA already does this, in fact; That message in
Your syslog just tells the d-bus part of it functionality would
Not is active.

If you does need to start a d-bus session and not under X11, you can run
Dbus-launch as documented in the Dbus-launch (1) Mans 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 this runs a session for as long
As its child process was 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 the-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

Workaround:

Execute command First

Eval ' dbus-launch--sh-syntax '

You can run the Dbus program.

Dbus boot failure: couldn ' t connect to system bus:unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.