Bug 5144

Summary: when use systemd, "systemctl --user" can not print out expected info
Product: [Build System, Metadata & Runtime] OE-Core Reporter: LiRongQing <rongqing.li>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher
Version: 1.5   
Target Milestone: 1.5 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

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.