Q:

How come a Desktop Environment be one layer under a shell (kernel-DE-shell instead kernel-shell-DE)?

I ask the following question as a followup to this question.
How come a Desktop Environment be one layer under a shell (kernel-DE-shell instead kernel-shell-DE)?
Why I ask this question
In Ubuntu, for example, both the Gnome Shell and Unity GUI for Gnome shell, are 2 layers above the Gnome Desktop Environment (DE), respectively.
My assumption
Maybe the order is different between CLI-only and CLI+GUI systems, that is, maybe in CLI only systems it is, for example:
kernel-shell(sh,Bash)-utilities.

and in CLI+GUI system it is, for example:
kernel-primary shell(sh,Bash)-DE-secondary shell(Gnome shell)-GUI(Unity).

A:

There is no primary shell.
If you’re running the default GNOME 3 desktop, then the stack is

Kernel → X.org or Wayland → GNOME session manager (which starts a number of GNOME helper applications) → GNOME Shell (which uses a number of GNOME libraries)

If you’re running Unity, then the stack is

Kernel → X.org or Mir or Wayland → GNOME session manager → Unity (which also uses a number of GNOME libraries)

If you’re running a command-line shell in a virtual console or an old-school terminal, then the stack is

Kernel → login → shell

A desktop environment is a whole set of applications working together to provide a consistent experience to the user. The “shell” is one of those applications (the one which acts as the last layer in the interface to the user, i.e. the one which has first dibs on user-initiated events such as keystrokes).

