Bug 5144 - when use systemd, "systemctl --user" can not print out expected info
Summary: when use systemd, "systemctl --user" can not print out expected info
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5 M5
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-09-09 09:34 UTC by LiRongQing
Modified: 2013-09-10 10:04 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LiRongQing 2013-09-09 09:34:43 UTC
1. enable systemd when building image

VIRTUAL-RUNTIME_init_manager = " systemd "
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

2. run command as below
root@qemux86-64:~# systemctl --user
Failed to get D-Bus connection: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
root@qemux86-64:~#
Comment 1 Ross Burton 2013-09-10 10:04:13 UTC
That tells systemctl to display the state of the current user session, and it can't find one because $DBUS_SESSION_BUS_ADDRESS isn't set and the fallback of autolaunching using $DISPLAY doesn't work because that isn't set also.

If you've already started a user session then you'll need to set one of those variables so that systemctl can find the user session you're after.

However, are you attempting to *start* a user session using systemd?  If so, then you need to use "/usr/lib/systemd/systemd --user".

Closing notabug as this isn't a bug.