“systemd --user” instance can't find d-bus
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I have an executable I'd like to run as a user and that user should be able to start and stop that service without sudo.
I have `systemd --user` always running for the user by running `loginctl enable-linger user`
I've confirmed the `systemd --user` instance is running as that user using `ps` but when I try to run any `systemctl` command as that user, I get the following error:
vagrant-
Failed to get D-Bus connection: Connection refused
Based on my googling it sounds like I should have a `dbus-daemon` instance running as that user but it is not. It should be noted I'm switching to the user with `su` so it may not be counting as a "login".
It seems that either:
1. My user instance of `systemd` should use the system instance of d-bus.
2. Ubuntu should somehow be starting a user instance of d-bus.
On Gentoo, for example, there is a user instance of `dbus-daemon`.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: systemd 219-7ubuntu6
ProcVersionSign
Uname: Linux 3.19.0-21-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
Date: Mon Jul 20 19:00:19 2015
JournalErrors: Error: command ['journalctl', '-b', '--priority', 'warning'] failed with exit code 1: No journal files were found.
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: innotek GmbH VirtualBox
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.board.name: VirtualBox
dmi.board.vendor: Oracle Corporation
dmi.board.version: 1.2
dmi.chassis.type: 1
dmi.chassis.vendor: Oracle Corporation
dmi.modalias: dmi:bvninnotekG
dmi.product.name: VirtualBox
dmi.product.
dmi.sys.vendor: innotek GmbH
Switching user with "su" does not count as opening a full new session (see /etc/pam.d/su). This does not start a session bus and systemd process in particular.