I'm looking for a good overview documentation describing the the stack of
daemons and services involved in a modern Linux session. Although having read
various documentation about dbus, and systemd,
I still don't get the big picture.
In particular, I'm looking for answers to these questions (don't answer the questions, they should only clarify what kind of documentation I'm looking for):
After logging in, which process is the root of the user's session?
Which processes should be started, and why? I'm looking for a Desktop-agnostic answer, no matter whether Gnome, KDE, FVWM, or a simple shell is started.
What role do all these daemons play? Which of them would run alone, which depend on others? Which one should be started by whom, why, and for how long? And who should maintain that zoo?
I'm asking, because I found that I have a whole zoo of daemons running right
after booting: systemd-journald, systemd-udevd, dbus-daemon,
systemd-logind. But not enough: Apart from these, Running ultra-lightweight
PDF-viewer zathura further populates my session with dbus-launch,
dbus-daemon, at-spi2-registryd, and at-spi-bus-launcher, the latter
launching yet another dbus-daemon. None of them have been there before,
none has been invited, but they will stay around the house, giving me a creepy
feeling, until I log out. I'm sure I'm missing something here...
Another example: After login, I have a systemd running with my users UID,
but I have no idea what it should do (since version 206 I think I'm not
supposed to use that
as session manager, right?). It has a child process (sd-pam), which I
failed to find documentation about.
What do they do? What is the idea behind this setup?
To clarify my perspective: In “the old days” it was enough to know that
login would launch my login shell (bash, executing ~/.profile), and
from that point I could continue building a session, depending on circumstances, maybe launching screen, or startx.