Re: [Help] dinit-client fails to connect to a socket as user
Reply #3 –
When I was setting up my dinit user session I didn't fully understand (I honestly still don't) what dinit-userservd does with all that pam module stuff, so I opted not to use it.
Instead I wanted an easier approach that could also have a dbus user session as a service together with pipewire services, window manager, compositor... So I'll share my approach here.
First set vars for DBUS_SESSION_BUS_ADDRESS, XDG_RUNTIME_DIR, then start the dinit user session instance, all on `~/.bash_profile`:
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/dbus-session
export XDG_RUNTIME_DIR=/run/user/1000
exec dinit >> ~/.local/share/dinit/dinit.log &
Then for any user service I prefer to add them in `~/.config/dinit.d/` and enable/softlink to `~/.config/dinit.d/boot.d/`.
My dbus service is as follows `~/.config/dinit.d/dbus`
type=process
command = /usr/bin/dbus-daemon --session --nofork --nopidfile --print-address 5 --address $DBUS_SESSION_BUS_ADDRESS
load-options = sub-vars
logfile = /home/look/.local/share/dinit/dbus.log
ready-notification=pipefd:5
I'm still not quiet sure what I'm missing by using this instead of dinit-userservd but its a working alternative for me, been daily driving this way for months without any problems.