In Linux, what happens after a user logs in depends on the type of login:
This type of login happens from a terminal, pseudo-terminal, network connection (rsh, ssh, telnet), or from the conosle if not in GUI mode.
The details depend on which shell is started, but each shell is similar. For our purposes here let's assume the BASH shell which is the most common shell in Linux.
Once a login shell is started it runs two scripts to initialize the shell environment:
Once a user logs in, gdm-binary then starts gnome-session. This drives the Gnome login session. Gnome-session then starts other processes including: