15

I want to learn more about UNIX systems and I think I have a pretty straight forward question. I think I know what X is used for: It gives a standard to applications to present their UI's (among other things).

But why then is there a need for Gnome/KDE and how do they relate to X? I thought that they were using X as some sort of interface between the application and the GUI, so the GUI is customize-able while the interface stays the same across applications.

Is that true or is Gnome/KDE independent of X?

18

(I am looking into the relation of GNOME and X. I'd like to share some of my understandings. I will present it in a logical way as much as I can.)

1. What is GUI composed of?

Below is an illustration of the basic components of a GUI.

enter image description here

The key component is the display server. There are several display servers available. Such as:

  • X11 (mostly for *nix)
  • Wayland (mostly for *nix)
  • Mir (mostly for *nix)
  • SurfaceFlinger (This is for Google Android.)
  • Quartz Compositor (This is what Apple MacOS uses.)
  • Desktop Window Manager (This is what Microsoft Windows uses.)

2. What is X?

X, X11 and X Window System are synonyms. They all stand for a windowing system. Windowing System is a type of graphical user interface (GUI, as I mentioned above) which implements the WIMP (windows, icons, menus, pointer) paradigm for a user interface.

Here is a list of major windowing systems for both Linux and Windows systems.

The main component of any windowing system is usually called the display server (no surprise because windowing system is a kind of GUI and display server is the key part of any GUI), although other names like window server or compositor are also used.

Any application that runs and presents its GUI is a client of the display server. The display server and its clients communicate with each other over a communications protocol, which is usually called display server protocol, the display server being the mediator between the clients and the user. The display server receives all the input from the kernel, that the kernel receives from all attached input devices, such as keyboard, pointing devices, or touchscreen and transmits it to the correct client. The display server is also responsible for the output of the clients to the computer monitor. A display server protocol can be network capable or even network transparent.

And according to here:

An X Server is a program that provides display and user input services to other programs. In comparison, a file server provides other programs with access to file storage devices. File servers are typically located in a remote location and you use the services of a file server from the machine that you are located at. In contrast, an X Server is typically running on the machine that you are located at; display and user input services may be requested by programs running on your machine, as well as by programs running on remote machines.

So X is composed of:

  • display server
  • display server protocol
  • some libs for development
  • and other things

enter image description here

According to here:

X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting with a mouse and keyboard. X does not mandate the user interface – this is handled by individual programs. As such, the visual styling of X-based environments varies greatly; different programs may present radically different interfaces.

In other words, X only gives a program the ability to do basic things like drawing/moving windows and input interacting. X doesn't enforce visual styles. So what you said "...It gives a standard to applications to present their UI's..." is incorrect.

3. What is GNOME/KDE

GNOME and KDE are both Linux Desktop Environment. A desktop environment is a bundle of programs running on top of an operating system, which share a common GUI.

But just like I mentioned above, X11, as a display server, only provides the basic drawing ability through some libs like Xlib or XCB. Applications that directly interface X11 through such libs can have radically different visual styles.

So how to create a common GUI? Here comes the widget toolkits. Such as GTK+ and Qt. They are popular in Wayland and X11 windowing systems.

GNOME use the GTK+.

KDE use the Qt.

And here is a comparison of X Window System Desktop Environments.

To summarize...

I draw a rough conceptual illustration. The 3 parts above the OS are very customizable. That's why so much flexibility (confusion) arise.

enter image description here

ADD 1 - 1:26 PM 9/21/2018

And here are some discussion about QT and GTK (maybe offtopic to this thread though...)

  • "The fact that the term "server" is applied to the software in front of the user is often surprising to users accustomed to their programs being clients to services on remote computers. Here, rather than a remote database being the resource for a local app, the user's graphic display and input devices become resources made available by the local X server to both local and remotely hosted X client programs who need to share the user's graphics and input devices to communicate with the user." (see wiki) – yaobin Nov 28 '18 at 20:16
  • 1
    In case somebody gets confused by the sentence "an X Server is typically running on the machine that you are located at", please see my comment above. Thanks @smwikipedia for giving such an incredibly awesome answer! – yaobin Nov 28 '18 at 20:18
5

Xorg (and the earlier Xfree, and earlier X10) is a server for a protocol more completely called the X Window System; it allows applications to draw on "the screen". Which can be remote with X. Gnome/KDE/Xfce and other window managers / desktop environments are special applications that run in X that draw things like borders and icons and minimize and maximize that the applications themselves don't.

And, since Gnome and KDE both can (or did) run on MS Windows (and Wayland to varying degrees), yes they are (or can be) independent of X.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.