I met several senior UNIX developers many years ago, such as James and casual brother. At that time, I was doing research on User Interface related fields in windows, such as win32k. in sys, the implementation principle of directui/netui and how to implement an external window style switch (similar to a windowblinds mechanism in one application or in the whole system ), for knowledge extension, I have consulted them about the X Window System in Unix/Linux. Although they are not focused on this field, they still solve many of my questions. Unfortunately, after so many years, those things I have known have been forgotten.
Since the end of 2011, I started to access Linux again and learned some shell and SSH-related superficial knowledge. yesterday afternoon, I suddenly had doubts about X's architecture and development history, so Google is late at night. The following is a brief record for memo. Because it is not an expert in this field and some information is not strictly verified and verified, it cannot be ensured that all information is correct. You are welcome to correct and supplement it.
In * nix, especially in Linux, the desktop environment is a general term, usually including a window manager that uses a certain graph development library, and a number of commonly used software (such as terminal simulation programs, text editors, file managers, control centers, browsers and even development tools ).
For a long time, the graphic interface of * nix system is based on X Window System, which is mainly composed of X Server and X client) and X protocol. The X server is responsible for drawing on the drawing device (usually the screen), interacting with the input device (usually the mouse and keyboard), and processing the creation and destruction of the window. The commonly used X protocol is x11r6, meaning X protocol version 11 release 6 (the latest release when writing this article
Is x11r7.6 ). In the X Window System, a window is a relatively abstract concept. The information contained in the window is only related to the properties of the window, and does not involve specific visual presentation details. The subsequent work is the responsibility of a dedicated component called Window Manager ).
Based on the above basic information, let's take a look at the two most common desktop environments, Kde and
Gnome. KDE stands for K desktop environment and gnome stands for GNU network object model environment. KDE is called
Qt's graph Development Library (currently owned by NOKIA), which carries the window manager named kwin and the File Manager Utility named doldolphin. The graph development library used by gnome is
GTK +, whose built-in window manager is named metacity and the File Manager is Nautilus.
In addition to the two desktop environments mentioned above, there are also two desktop environments that are commonly used: xfce and
Lxde. In comparison, they need to be lightweight because they chose a relatively high starting point during development, even though GTK +, the same underlying graph Development Library as gnome (xfce was switched from XForms), provides different Window managers and a small number of applications. The underlying layer of GTK + graphics library (and QT) is xlib, the Development Library of X11. It is tedious to directly use the APIS provided by xlib for development.
Because the entire x system architecture is highly flexible, in addition to graphic operation solutions such as Kde, gnome, xfce, and lxde (that is, the desktop environment, there are also a large number of separate Window managers available for use. It is common, such as icewm and FVWM.
Enlightenment. The latter is also very interesting Based on the graphics library, and does not select GTK + or QT, but a library called Elementary. The E17 desktop environment with enlightenment as the window manager is also growing. Similarly, the window manager openbox is used. These Window managers can often work in place of KDE or gnome's own window manager. We often see that some Linux releases have a lot of display effects on the desktop, which is called compiz
Window Manager (which is more accurate to the combination of Window Manager, compositing window manager, see
Http://en.wikipedia.org/wiki/Compositing_window_manager) to do. Its uniqueness lies in that the underlying layer is dependent on a different from the traditional X environment: xgl, and more underlying plotting operations using OpenGL called glitz.
In the X system, there is also a Display Manager (such as xdm, TPD, and WDM) that can manage multiple local or remote X servers. If the Linux system is started at level 5, the user logon interface displays the manager. After the user enters the user name and password, it starts the local X server, initializes an X session. Generally, the local window manager and desktop environment are started through X session. If XDMCP is set to true in the configuration file, the display manager can manage remote X Servers through the XDMCP protocol. When
When x manager is used to log on to Linux/Unix machines, XDMCP is used to log on. The user also enters the user name/password to log on. xdm starts an X session, however, this time X server is on a remote machine (compared with X client, that is, windows. X Display Manager has also developed. Previously, it was usually an xdm or xdm-Based Variant. Now, a cross-desktop display manager called lightdm is trying to become a standard display manager for X servers.
For a variety of purposes, some people want to make the Linux look the same as windows or Mac OS X. The initial purpose of doing so may be to be fun. The final goal is often due to the pursuit of perfection. If you want the desktop to look like windows, there is a software called Win2-7 pack that can be done (applied to Gnome), and if you want to be similar to Mac OS X, macbuntu can be applied to Ubuntu.
Interestingly, the recent * nix revolution has seen an explosive trend. It may be an inevitable phenomenon when technology develops to a certain extent. Even the authoritative position of the X Window System has also been challenged and threatened by latecomers. Wayland (http://wayland.freedesktop.org) is such a latecomer.