X window system (X11), simply X, provides basic GUI framework.
A desktop environment consists of window manager, file manager and utility programs.
startx
initializes an X session. It can be started manually after a console login or through a graphical login by display manager.
X window manager is windowing system that runs on top of X11. The user can choose between third-party window managers.
X display manager graphical login manager that authenticates user and then starts an X session through startx
. Examples are
GDM (Gnome display manager), lightdm etc.
windows manager vs display manager (such as Gnome Display Manager)?
xinit -> .xinitrc
.xsession
is executed when you login in graphical mode by display manager.
.xsessionrc
is executed as part of the startup process.