Hi, andyj. I have been surprised multiple times by finding that dbus is running on my system without a clear explanation (at the time). As juanito mentioned, several applications start dbus on their own. Eventually I tracked down all the culprits. I used this approach:
1. Move dbus-launch to dbus-launch-real
$ cd /usr/local/bin
$ sudo mv dbus-launch dbus-launch-real
2. Create a "fake" /usr/local/bin/dbus-launch that logs who called it (don't forget to mark it executable):
#!/bin/sh
log=/home/tc/log.txt
echo "My PID is $$ and my PPID is $PPID" >>$log
ps -ef | grep $$ >>$log
ps -ef | grep $PPID >>$log
exec dbus-launch-real "$@"
Eventually I found all of applications that start dbus automatically on my system: filezilla, firefox, gparted, thunderbird, libreoffice, mktrayicon, yad
For the applications on my system that actually require dbus (namely: filezilla, firefox, gparted, thunderbird, libreoffice), I created wrapper scripts that cause dbus to go away once the application is done running.
Here's my wrapper script for filezilla, for example:
#!/bin/sh
# this ensures that dbus goes away after the application closes:
exec dbus-run-session /usr/local/bin/filezilla "$@"
For mktrayicon and yad, I realized that they don't actually need dbus--they run in dbus-less systems just fine, but for some reason they do start dbus if it's present on the system. (It seems to have something to do with GTK3 itself, because the string "dbus" does not appear anywhere in mktrayicon's source code.) To prevent such applications from starting dbus, you can create wrapper scripts like this, for example:
#!/bin/sh
# this wrapper script prevents mktrayicon from starting dbus
export NO_AT_BRIDGE=1
exec /usr/local/bin/mktrayicon "$@"
Obviously, a wrapper script needs to have the same name as the application (e.g., wrapper script for filezilla should be named filezilla) and needs to be present somewhere in PATH before the application.
I hope that helps.