Hello !
It used to be that one either had to source all shell scripts from /etc/X11/xinit/xinitrc.d/ or at least source the one including dbus stuff like /etc/X11/xinit/xinitrc.d/30-dbus:
if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
dbuslaunch=`which dbus-launch`
if test x"$dbuslaunch" != x"" -a x"$dbuslaunch" != x"no"; then
eval `$dbuslaunch --sh-syntax --exit-with-session`
fi
unset dbuslaunch
fi
Or as later, one could just use dbus-run like exec dbus-run-session <wm>. Or use the not available on artix I guess and still part of those shell script to source, /etc/X11/xinit/xinitrc.d/50-systemd-user.sh:
systemctl --user import-environment DISPLAY XAUTHORITY
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
Notice the dinit script in there, /etc/X11/xinit/xinitrc.d/01-dinit-env.sh:
#!/bin/sh
# we want to make these available in the user service activation environment
dinitctl setenv DISPLAY XAUTHORITY > /dev/null 2>&1 || :
Doesn't include any dbus stuff. And nothing in there calls for any dbus stuff either:
% ls /etc/X11/xinit/xinitrc.d/
01-dinit-env.sh* 40-libcanberra-gtk-module.sh* 80xapp-gtk3-module.sh* 90-xdg-user-dirs.sh*
% grep -ri dbus /etc/X11/xinit/xinitrc.d/
%
I'm not using any dbus stuff on my ~/.xinitrc neither I'm calling i3 with dbus-run neither dbus-launch session commands.
And yet, withing i3 on top of X11 started with startx I still see dbus stuff just running for X11:
% ps -auxww | grep dbus
dbus 892 0.0 0.0 5872 2868 ? Ss Jul18 0:01 /usr/bin/dbus-daemon --system --nofork --nopidfile --print-address=4
root 895 0.0 0.0 415824 9096 ? Ssl Jul18 0:41 /usr/bin/thermald --no-daemon --dbus-enable
<my_user> 27342 0.0 0.0 9744 5812 pts/4 S+ 16:31 0:00 grep -Es --color=auto dbus
<my_user> 28313 0.0 0.0 4548 1476 tty1 S 05:28 0:00 dbus-launch --autolaunch=3e04e041f27fd75e86c6b3f06569715c --binary-syntax --close-stderr
<my_user> 28314 0.0 0.0 5660 1940 ? Ss 05:28 0:00 /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
<my_user> 28396 0.0 0.0 5508 3064 ? S 05:28 0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/<my_UID>/at-spi/bus_0
Where did that <my_user> and <my_UID> stuff come from? I'm not calling for any dbus stuff. BTW, I notice on the Arch Xinit Wiki it's mentioned one needs to at least source the /etc/X11/xinit/xinitrc.d/ stuff, I guess to load the systemd dbus stuff, but I don't see anything dbus related there that I'm aware of. So I'm clueless where that stuff is coming from. Out of my own crazyness I was starting to believe that dunst was working without dbus now, just to get disappointed at myself believing I was running without dbus.
BTW, this doesn't happen on plain bash login session on console. When I haven't launched X11 yet, and I do the same grep command, nothing shows up. So this is spawned when X11 gets launched. BTW:
% grep -ri dbus /etc/X11/
%
There's nothing in there I could relate to dbus either.
So now a days there's no way to run a X11 session without dbus, right? Is that it? And also, there's no longer a need to even start the window manage with dbus-run-session or any similar command since session gets somehow auto-connected to the dbus socket and stuff somehow.
Ohh, I don't have elogind installed, I got rid of it when starting to use seatd:
% pacman -Qs elogind
local/libelogind 255.17-2
elogind client libraries
local/seatd-dinit 20230412-3 (dinit-world)
dinit service scripts for seatd
And I'm also not calling polkit either to favor seatd, and I actually re-built pcsclite so it no longer depends on polkit sruff anymore:
local meson_options=(
-D libsystemd=false
-D libudev=true
-D polkit=false
-D serial=true
)
Just to make sure. If there's not way without dbus, should I then use dbus-run-session for better integration, or this automatic dbus spawn is enough not to have something half way? Or is there something that can be tweaked?
I noticed thermald, bluetoothd and pcscd which I currently have enabled are all dependent on dbus. I can't get rid of pcscd since I depend on my yubikey for work related stuff, though I can rebuild stuff, but I'm afraid those guys need dbus for IPC with stuff using the yubikey like the browser. Doe this also mean I can't get rid of dbus?
Sorry for the long set of questions.