“systemd --user” instance can't find d-bus

Bug #1476364 reported by Luke Hoersten
6
This bug affects 1 person
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-ubuntu-vivid-64:~$ systemctl --user list-units
    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
ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
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-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-21-generic root=UUID=e176bae0-84a5-4bd2-b968-e809e902488c ro console=tty1 console=ttyS0
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:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:rvnOracleCorporation:rnVirtualBox:rvr1.2:cvnOracleCorporation:ct1:cvr:
dmi.product.name: VirtualBox
dmi.product.version: 1.2
dmi.sys.vendor: innotek GmbH

Revision history for this message
Luke Hoersten (lukehoersten) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

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.

Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.