I would like to know more about what makes the GUI on *NIX systems work, but not quite sure where to begin the research. From my understanding, the X server is what makes all the visuals possible, and atop that there are the various UI environments like KDE, Gnome and others.
But, for instance, I have always thought that running under certain UI environments restricted you to programs that utilize that environment, until I realized I'm able to use KDE utilities and software under Gnome and vice versa, which retain the look of their native environment.
What would be a good place to start learning about this topic?