You are not logged in.
Hi there,
Recently I looked how many dbus processes there are running on my system. I realised it is quite a few:
~ ps aux | grep dbus
root 367 0.0 0.0 124760 3688 ? Ssl 07:31 0:00 /usr/sbin/thermald --no-daemon --dbus-enable
dbus 374 0.0 0.0 27084 1952 ? Ss 07:31 0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
lightdm 846 0.0 0.0 17992 544 ? S 07:32 0:00 /usr/bin/dbus-launch --autolaunch e8b37a474b614e438a0ab6a142101c2c --binary-syntax --close-stderr
lightdm 896 0.0 0.0 26664 1040 ? Ss 07:32 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
lightdm 902 0.0 0.0 26664 1540 ? S 07:32 0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
orschiro 1128 0.0 0.0 15896 616 ? S 07:32 0:00 dbus-launch --sh-syntax --exit-with-session
orschiro 1129 0.0 0.0 27012 1496 ? Ss 07:32 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
orschiro 1445 0.0 0.0 17992 540 ? S 07:33 0:00 dbus-launch --autolaunch e8b37a474b614e438a0ab6a142101c2c --binary-syntax --close-stderr
orschiro 1446 0.0 0.0 26664 1036 ? Ss 07:33 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
Is this the same for you?
I do not start dbus manually anywhere on my system except for launching lightdm and thermald through a systemd service.
Last edited by orschiro (2014-02-28 07:16:45)
Offline
Here is mine:
ps aux | grep dbus
dbus 506 0.0 0.0 25080 1984 ? Ss Feb24 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
frank604 2162 0.0 0.0 15900 620 tty1 S Feb24 0:00 dbus-launch --sh-syntax --exit-with-session
frank604 2163 0.0 0.0 24728 1388 ? Ss Feb24 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 7 --session
frank604 22914 0.0 0.0 10672 1108 pts/1 S+ 00:08 0:00 grep --color=auto dbus
Offline
Here is mine, do you have a load of software / bloatware loading on boot?
I don't use a login manager as I log in through the terminal and then use startx to load my Openbox environment
This is on boot
archKartious
> ~ ps -aux | grep dbus >> ~/psdbus.txt
dbus 222 0.0 0.0 3964 1456 ? Ss 12:01 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
tech10 640 0.0 0.0 2824 584 tty1 S+ 12:02 0:00 grep dbus
And this is after loading Openbox
archKartious
> ~ ps -aux | grep dbus
dbus 221 0.0 0.0 3964 1456 ? Ss 11:38 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
tech10 534 0.0 0.0 3612 584 tty1 S 11:39 0:00 dbus-launch --sh-syntax --exit-with-session
tech10 535 0.0 0.0 3964 1104 ? Ss 11:39 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
tech10 4398 0.0 0.0 2824 580 pts/0 S+ 11:58 0:00 grep dbus
Offline
With XFCE, and busybox init (custom system, not based on Arch):
message+ 944 0.0 0.0 2980 1080 ? Ss 09:01 0:00 dbus-daemon --system
brebs 1303 0.0 0.0 3768 780 ? S 09:03 0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session
brebs 1304 0.0 0.0 3368 1288 ? Ss 09:03 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
Offline
@frank604
How do you start your system? Manually (xinitrc) or with a display manager?
yup, startx
Offline
Using LightDM (obviously) I'm running 6...
rob@arch:~$ ps aux | grep dbus
dbus 425 0.0 0.0 27548 2292 ? Ss 09:37 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
lightdm 608 0.0 0.0 17992 544 ? S 09:37 0:00 /usr/bin/dbus-launch --autolaunch 3fb3a9e2673542c6ae7e61c25c160666 --binary-syntax --close-stderr
lightdm 613 0.0 0.0 26664 1044 ? Ss 09:37 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
lightdm 641 0.0 0.0 26664 1568 ? S 09:37 0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
rob 681 0.0 0.0 15896 612 ? S 09:38 0:00 dbus-launch --sh-syntax --exit-with-session
rob 682 0.0 0.0 27336 1808 ? Ss 09:38 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
rob 1265 0.0 0.0 10664 1088 pts/0 R+ 11:08 0:00 grep --color=auto dbus
Why do you want to know?
Last edited by Slithery (2014-02-25 11:10:32)
Offline
This is in X with a running WM:
dbus 188 0.0 0.0 26784 1604 ? Ss 06:18 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
jmcclure 3459 0.0 0.0 10896 1080 pts/0 S+ 06:24 0:00 grep dbus
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks to all of you!
Interesting to see such a difference ranging from just one dbus-daemon process to nine in my case.
What is in fact starting these processes except of a display manager/xinitrc? How can I find that out?
Offline
There's info at freedesktop, especially under "Automatic Launching".
There's 30-dbus, for the --system dbus instance. Although it's a bit "iffy". I use in ~/.xinitrc:
for f in `ls /etc/X11/xinit/xinitrc.d/*` ; do
. "$f"
done
exec startxfce4
Apparently, an alternative (for gnome) is:
dbus-launch gnome-session
Last edited by brebs (2014-02-25 12:01:49)
Offline
I thought "dbus-launch" was no longer needed (or recommended?) with systemd/logind.
I start X with xinit and in my xinitrc I just launch my wm with no inclusion of xinitrc.d files nor reference to dbus{,-launch}.
I have not run into anything that complains about lacking dbus sessions. But then I don't use any DE tools, some of which may require something extra. But there are many things I use that "pre-logind" would not work without dbus-launch in my xinitrc; they work fine now without it.
Last edited by Trilby (2014-02-25 12:21:49)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Running a wm(bspwm), with startx and no display manager, no manual launch with dbus-launch:
dbus 290 0.0 0.0 26896 1836 ? Ss 15:53 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
steef 516 0.0 0.0 15896 616 tty4 S 15:53 0:00 dbus-launch --sh-syntax --exit-with-session
steef 517 0.0 0.0 26924 1468 ? Ss 15:53 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
steef 565 0.0 0.0 26664 1612 ? S 15:53 0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
I've been using some software already though, so I'm not sure about how it looks just after boot.
Offline
I thought "dbus-launch" was no longer needed (or recommended?) with systemd/logind
It is consolekit which is no longer required with logind, not dbus-launch which is required for the WM to access dbus through its own session bus instance.
You say you don't use any DE tools, that's why you can do without it; but using an appli, like a file manager, which uses dbus for accessing other layers, like udisks2, it is required.
Offline
I thought "dbus-launch" was no longer needed (or recommended?) with systemd/logind
[Removed]
I supposed it was because of custom init.
Confusing things here. Sorry.
Last edited by rebootl (2014-02-26 16:47:23)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
dbus-launch is what gets run by Arch's 30-dbus, as I linked to earlier:
# launches a session dbus instance
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && type dbus-launch >/dev/null; then
eval $(dbus-launch --sh-syntax --exit-with-session)
fi
The purpose of using "eval", and running it in that seemingly-weird way, is to set these environment variables:
DBUS_SESSION_BUS_ADDRESS
DBUS_SESSION_BUS_PID
Offline
dbus 281 0.0 0.0 27848 2540 ? Ss 11:02 0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
steb 486 0.0 0.0 26896 1760 ? Ss 11:03 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
I'm also using lightdm however, I'm running version 1.9.7 and have appended `class=greeter` to to the `pam_systemd.so` line (in /etc/pam.d/lightdm-greeter).
Additionally, I'm using a systemd user instance to manage my user (session) bus.
Offline
Thanks for your insights!
So, if one wants to run a minimum amount of dbus processes, then without running a display manager the minimum requirements for a working system are the following in ~/.xinitrc:
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
and an enabled dbus.service?
dbus.service - D-Bus System Message Bus
Loaded: loaded (/usr/lib/systemd/system/dbus.service; static)
Active: active (running) since Mi 2014-02-26 09:21:36 CET; 2h 24min ago
Nothing more, nothing less?
Offline
Yes at the minimum, you need a system instance of the dbus-daemon process, which is started by the systemd service;
and a session instance for your graphical environment, which is started by the .xinitrc script.
$ ps aux | grep dbus-daemon
dbus 209 0.0 0.0 26800 1732 ? Ss 10:21 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
berbae 936 0.0 0.0 26664 1048 ? Ss 10:21 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
Offline
From your OP, it seems there is a redundancy between lightdm, which starts the dbus session, and when you log in as orschiro, where two other dbus-daemons are started.
Maybe something is not necessary somewhere in lighdm configuration or your login profile...
Offline
I will mark this as solved for now. In order to minimise the running dbus sessions, I switched back from ldm to startx and also removed the pulseaudio autostart from /etc/X11/xinit/xinitrc.d/ since I want to control myself when pulseaudio starts the dbus sessions.
This is how it looks now with X running and udisks2/gvfs enabled dbus session.
dbus 331 0.0 0.0 27048 1608 ? Ss Feb27 0:10 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
orschiro 1574 0.0 0.0 15896 448 tty1 S Feb27 0:00 dbus-launch --sh-syntax --exit-with-session
orschiro 1581 0.0 0.0 27160 1396 ? Ss Feb27 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
orschiro 12920 0.0 0.0 26664 1216 ? S Feb27 0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
orschiro 15516 0.0 0.0 17992 532 ? S 06:26 0:00 dbus-launch --autolaunch e8b37a474b614e438a0ab6a142101c2c --binary-syntax --close-stderr
orschiro 15523 0.0 0.0 26664 964 ? Ss 06:26 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
Offline