You are not logged in.

#1 2020-06-12 19:37:05

NateDogg1232
Member
Registered: 2018-12-31
Posts: 10

systemd failing to connect to user dbus

Hello!

I want to run some user services, but it seems the local D-Bus is not being started correctly.

Steps taken:

  • Check $DBUS_SESSION_BUS_ADDRESS

    • The variable returns unix:path=/run/user/1000/bus but this file does not exist

  • Try using busctl --user to see if IT can connect

    • nope

What I use to start my session:

I use xinit with an .xinitrc that simply, at the end, uses

exec i3

to run my window manager.
I then later use lxsession as a session manager and lxpolkit as a polkit client. I did attempt to start i3 without this session manager and now the $DBUS_SESSION_BUS_ADDRESS is unset and still cannot connect.

Offline

#2 2020-06-12 19:37:36

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: systemd failing to connect to user dbus

Post your complete ~/.xinitrc.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-06-12 19:44:30

NateDogg1232
Member
Registered: 2018-12-31
Posts: 10

Re: systemd failing to connect to user dbus

~/.xinitrc:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -z $WM ]; then
    export WM=i3
fi

# merge in defaults and keymaps

if [ -f $sysresources ]; then
	xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
	xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
	xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
	xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
	for f in /etc/X11/xinit/xinitrc.d/* ; do
		. "$f"
	done
	unset f
fi

# Run all local xinitrc stuff

# ADDING THIS COMMENT HERE FOR THE FOURM POST:
# Here is what is run here:
# - lxsession
# - sxhkd
# - picom
# - lxsession-xdg-autostart
# - urxvtd
if [ -d $LOCAL/etc/xinitrc.d ] ; then
	for f in $LOCAL/etc/xinitrc.d/* ; do
		. "$f"
	done
	unset f
fi

exec $WM

Offline

#4 2020-06-12 19:50:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: systemd failing to connect to user dbus

Where does $LOCAL expand to and what are you soucing in that dir?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2020-06-12 20:01:39

NateDogg1232
Member
Registered: 2018-12-31
Posts: 10

Re: systemd failing to connect to user dbus

$LOCAL expands to ~/.local
and in that dir, I have a few files:
I'll cat them out one by one:

00-lxsession

#!/bin/sh
lxsession -e "$WM"

00-sxhkd

#!/bin/sh
[ "$WM" = "bspwm" ] && sxhkd $XDG_CONFIG_HOME/sxhkd/sxhkdrc.bspwm &
sxhkd &

05-picom

#!/bin/sh

if [ "$(hostname || cat /etc/hostname)" = "main" ]; then
    picom -f -b --experimental-backends --config=$XDG_CONFIG_HOME/picom/main.conf
else
    picom -f -b --vsync -I 0.04 -O 0.04 --no-fading-openclose
fi

05-xdg-autostart

#!/bin/sh
lxsession-xdg-autostart

10-urxvtd

#!/bin/sh
urxvtd -q -o -f

Offline

#6 2020-06-18 01:28:09

NateDogg1232
Member
Registered: 2018-12-31
Posts: 10

Re: systemd failing to connect to user dbus

SOLVED!

I use my dotfiles to init my Gentoo and Void systems as well, and for those, I need to delete the $XDG_RUNTIME_DIR each startup. This was happening in some obscure file I forgot about and in the process, was deleting the file

/run/user/$UID/bus

Lesson: Don't clear that dir on systemd systems.

Offline

Board footer

Powered by FluxBB