Introduction to the differences of Linux GTK, KDE, gnome and xwindows GUI


I. The implementation of Linux GUI is only the application program under Linux

GUI is not a part of Linux. Linux is just a command-line operating system. The relationship between Linux and XFree is the same as that of dos and windows 3.0. Windows 3.0 is not an independent operating system. It is just an extension of DOS. It is an application level (GUI) system under DOS, not an independent operating system. In the same way, XFree is just an application under Linux, not a part of the system, but the existence of X can facilitate users to use computers. Windows 95 and later versions are different. Their graphical interface is a part of the operating system. The graphical interface is implemented in the system kernel. Without the graphical interface, windows will not become windows, but Linux is different. Without the graphical interface, Linux or Linux, many web servers with Linux will not install X server at all. This is also one of the important differences between windows and Linux

2. X is a protocol, not a specific software

X is the protocol, just like HTTP protocol and IP protocol. Because the input device and the display device are not the same device, and they need to cooperate with each other for screen display, so an interaction protocol is needed to establish their direct communication bridge.

X protocol is mainly composed of X application program and X server. For example, I need to draw a circle. X application program tells X server where to draw a circle with what color on the screen, and specific “drawing” actions, such as how to generate the circle, what drive program of video card is used to command the completion of video card and so on, are completed by X server

X server is also responsible for capturing the actions of keyboard and mouse. Suppose X server catches that the left mouse button is pressed, he will tell x application: Dear Mr. application, I found that the mouse is pressed. Do you have any instructions? If x application is designed to press the left mouse button and draw a square on the screen, X application will say to X server: Please draw another square. Of course, he will tell the server where to draw the square with what color, but he doesn’t care how to draw it – that’s the server’s business.

III. relationship between X and XFree86

With the agreement, we need specific software to implement this agreement, just like we need traffic police to maintain traffic order according to the regulations when we have traffic regulations. XFree86 is such a “traffic policeman” who implements the protocol according to the regulations. He completes the task of displaying on the screen submitted by the X application program according to the regulations of the X protocol. Of course, it is not only a specific traffic policeman who can maintain and implement the regulations, for example, it can also be implemented by the traffic coordinator, and the police can intervene when necessary, provided that they We all need to know the traffic laws and regulations, that is, we need to know the protocol, so the software to implement the X protocol is not only XFree86, XFree86 is just a free X server software to implement the X protocol. In business, motif is commonly used. Now there is xorg. There are many small X server software written by fans. You can even run X server on windows. In this way, you can run an X application on Linux and display it on another windows system. How amazing! You can use Google to find such X server software, but the most commonly used one on Linux is XFree86 (now the Linux distribution uses xorg). By the way, Apple’s graphical interface uses X protocol, and is considered to be the best x protocol graphical interface, and its implementation of X protocol is done in the system kernel, so the performance is obviously much better, which is That’s why a lot of large-scale 3D graphic design software is on the apple platform.

To make it easier to understand and compare the HTTP protocol:
1)The protocol is HTTP (Hyper Text Transmission Protocol)
The common servers to implement this protocol are: apacheiis, etc
The clients who request these servers to transfer files are: ie, Mozilla, Netscape, etc

2)The agreement is X.
The common servers to implement this protocol are: XFree86, xorg, xnest, etc
Clients requesting these servers to complete the display task: all x applications

But the server and client of HTTP protocol are usually implemented between two different computers (server and client), so it is easy for ordinary people to understand. The server and client programs of X protocol are usually on the same computer, so many users find it difficult to understand. Since it is a protocol, it is certainly not related to the platform, so x application can be displayed on any remote computer with X server, even on the windows system with xnest server. However, in most cases, X applications use the native X server, and then the X server outputs the display results to the native display, which is why many people don’t understand that x is a protocol

IV. what is the relationship between X, X11 and X11R6?

I don’t know if beginners have noticed the directory / usr / X11R6, which is the default installation directory of XFree
X11R6 is actually xprotocol version 11 release 6, which means that the current x protocol is version 11, and then it has been modified six times. Different versions of X protocol can’t communicate, just like we can’t communicate with IPv4 and IPv6 now, but don’t worry, the current X server software and X application program follow X11R6
In addition, XFree86 3.3.6, XFree86 4.3.6 and other versions are the version numbers of XFree86 software, which implements the X protocol. This is a frequently confusing concept for beginners
The protocol version and the software version that implements the protocol – do you know the difference between the two concepts?

V. WM (window manager) window manager

The function of window manager is to maximize, minimize, move and close windows, which are not completed by X server. Without the window manager, the X application can still start, but it’s in the middle of the screen, can’t move, can’t minimize, can’t maximize, and has no borders.

XFree86 comes with a simple window manager: TWM, which also includes gnome and KDE. In order to understand the function of window manager more conveniently, we can do the following tests (because I use Ubuntu, I can’t confirm the correctness of the following operations and commands, please have conditional friends to test the following and give correction).

1. After the system (Linux with interface) is started, enter the graphics interface. We can open an xterm and input init3 to return to the character interface safely

2. Input “startx” again and return to the GUI. What you see is a complete GUI operating environment as usual. You can maximize, minimize, move, close windows, etc.

3. Let’s enter the character interface again, press Ctrl + Alt + backspace to return to the character interface, and input: “xinit” (Note: different from the command of the second step, startx). Start the graphical interface again, what you see, you see an xterm. And you can’t move it. But you can enter the command in this xterm to open the X application, if I input: “Mozilla”. When you open the browser, what’s the difference between the browser and the normal browser? It’s in the middle of the screen, and it can’t be moved, minimized, maximized, or framed.
Why is the same X application so different? Because when we start the GUI with startx, we also start a default WM (window manager). If you start KDE with KDE, if you start Gnome with gnome, but you start the GUI with xinit, you don’t start WM.
4. If you use xinit to start the graphical interface and input TWM in xterm, what can you see? Xterm is added with a border, through which you can move, maximize and minimize the xterm. TWM is the window manager in XFree86, which is the simplest window manager. But it has all the features of window manager
5. If you input Gnome session instead of TWM, you can start Gnome or start KDE

Through the above experiments, you can clearly understand the relationship between them. Other small window managers are:

Windows maker, after step, blackbox, FVWM, fvwm2 and so on are all commonly used excellent window managers. RedHat 9 has windows maker, but it is not installed by default. You can try it. Just xinit and wmaker can use windows maker

 Vi. who implements the client side of X protocol sometimes?

XFree86 is the server software of X protocol (note implemented in the form of software), but the client side is more convenient for programmers to use x protocol to interact with XFree86 on the server side, so an Xlib library is generated to encapsulate the content of X protocol. If you still find it inconvenient to use Xlib directly, then QT and GTK are generated, which further encapsulates Xlib and provides many controls It is more convenient for programmers to use x protocol visually.

The direct relationships among Xlib, QT and GTK are as follows:

QT uses Xlib library directly. GTK cannot use Xlib directly, but uses lower level function libraries GDk and glib. This structure makes GTK more convenient to be transplanted to other systems, or to use graphics libraries unrelated to the xwindows system.


7. Direct relationship between KDE, gnome, QT and GTK

KDE and gnome are window managers. After launching them, we enter into visual operation (graphical interface). Since we need to display graphics, we naturally have to deal with the server software of X protocol. Since QT and GTK further encapsulate x protocol, and they provide richer windows and control mechanisms, the window manager implemented on the basis of QT is called KDE, which is implemented on the basis of GTK The current window manager is gnome

Again: KDE and gnome are not just window managers, but also provide desktops, menus, and so on.

KDE and gnome are one of the desktop environments. They use different libraries. They can be KDE, gnome, xfce, lxde, etc

Qt library used by KDE, but Qt library is not free. There will be some problems in software copyright based on QT. So someone developed gnome, using GTK library, which has no copyright problem of Qt library.
(Qt library and GTK library are equivalent to MFC library under Windows)
There are different versions of desktops for the same Linux. You can try them all, and you can feel the difference between KDE and gnome. For example, Ubuntu is GNOME desktop, and Kubuntu is KDE desktop


Appreciation of four Linux graphical interfaces: KDE, gnome, xfce, lxde

If Microsoft didn’t join the graphical interface, windows series operating system would not successfully occupy the highland of computer desktop. This graphical interface of human-computer exchange makes the interface more intuitive, simple, and more human-oriented, and also greatly reduces the cognitive burden of users. Ordinary users can operate without remembering the command of “labor” and dragging directly.

At this point, Microsoft does make the graphical operation interface more thorough and specific. Although people have been complaining about the lack of security and stability of windows system, Microsoft still wins the favor of most ordinary users in terms of application and entertainment, because these are enough in their work and life.

Graphical interface sets up a bridge for users to move towards Linux

In contrast, Linux system has always adhered to its own professional line. In the field of server operating system, Linux has always been the absolute main force of enterprises with its security and stability characteristics. However, although Linux is a leader in the field of server operating system, and many linux systems are open-source software, most people who know and know them are concentrated in the community and professionals.

Now, however, the situation is constantly changing. With the various unpleasant events of windows system in recent years, people wake up to realize that they can not be limited to a product at any time, otherwise, no matter individuals or enterprises are in danger of being controlled.

At the same time, with the continuous progress of Linux / unix system itself and the continuous maturity and development of various graphical interface products, more and more ordinary users find that this combination can radiate a unique attraction through trial, and many enterprises and individuals have given up windows to switch to Linux / Unix in this process.

Many problems may be raised. Under the Linux system, there are still many applications and entertainment that cannot be used, even some drivers, but this situation is gradually being solved. More and more software and hardware manufacturers are supporting or preparing to support the Linux / unix system.

In fact, many years ago, we Linux developers have paid attention to the development of graphical interface environment for ordinary users. The editor of this article introduces you to the graphic desktop environment that attracts ordinary users to enter the Linux system world.

Before the introduction, the editor did a survey and found out what kind of graphic desktop environment they used on, the top 10 operating system in June 2010.

It can be seen from the partial investigation of the editor that gnome and KDE are the current mainstream environments, while xfce, lxde, OPENBOX and fluxbox have also been highly applied.

Next, the editor further analyzes the above graphic desktop environment.


KDE (Kool desktop environment) project was built in October 1996, earlier than gnome. The KDE project is initiated by the developer of lyx, a graphic typesetting tool, and a German named Matthias etrich. The purpose is to meet the needs of ordinary users who can manage various applications and complete various tasks on UNIX workstations through a simple and easy-to-use desktop.


In the aspect of application development, KDE project has developed the first-class composite document application framework, realized the most advanced framework technology, and therefore put itself directly in the position of competing with popular development frameworks such as Microsoft’s MFC / COM / ActiveX technology. KDE’s kparts composite document technology enables developers to quickly create state-of-the-art applications to implement state-of-the-art technologies.

In terms of application, KDE also has the office application suite KOffice, which is comparable to Microsoft office. It is composed of spreadsheet, slide production program, organizer, news client and other applications. It also integrates common web browser, e-mail client, office suite, graphics and image processing software, desktop theme function, configuration function, KDE help center and other management tools. At the same time, it supports translation in more than 60 languages.

In fact, from the installation process of the system, you can experience the convenience brought to you by KDE. Various languages, time zones, installation disks, user settings, network settings, etc. do not need to consider what commands to enter, just click with the mouse.

At present, the latest version of KDE is 4.5.0, which further improves the stability and performance. We can experience that KDE’s operation habits are more and more similar to Win9x. It supports mouse drag and drop and similar shortcuts. Even if you are a new Linux user, you can get started quickly.


Gnome was launched in August 1997, so you can see the word 1997 on gnome’s logo. The initiators are Miguel de icaza and Federico MENA. The original goal of Gnome plan is to build a desktop environment with complete functions, simple operation and friendly interface based on free software, hoping to take an international path and use it as much as possible for people in various countries. At present, Gnome has basically become a replacement for KDE.


Gnome not only provides an attractive desktop environment, but also provides a development platform, an extensible framework that can integrate the developed application with other parts of the desktop.

The structure of Gnome includes a panel, desktop, a series of standard desktop tools and many powerful applications. These applications include file manager, spreadsheet processing software, word processing software, spreadsheet software, email reader, MP3 player, simple editor and image processing software comparable to Photoshop.

At the same time, Gnome also integrates software update and management tools, web-based software release and automatic upgrade tools, which can smoothly and safely run the latest open resources and download the latest patches.

If you have experienced gnome, you will know how these applications of Gnome make Linux system more operable, such as mouse drag and right key functions, document editing, drawing pictures, email, audio and video playback, instant messaging tool chat… These use experiences are almost the same as you in windows.

Although Gnome was originally the desktop of GNU / Linux, it is now running on most UNIX like systems (such as * BSD variants, AIX, IRIX, HP-UX) and almost all Linux systems. At present, shows that the latest version of gnome is 2.3, and the experience of Gnome 3, which will be released in 2011, is said to be comparable to Windows 7, and we will wait and see.


Xfce (XForms common environment) was founded in July 2007, similar to CDE, which is a lightweight desktop environment running under all kinds of UNIX. Original author Olivier fourdan first designed xfce based on XForms 3D graphics library. Xfce is designed to improve the efficiency of the system. It can save system resources and load and execute applications quickly.

LOGO of Xfce

The main feature of xfce is that it is easy to configure, and the whole process can be completed with the mouse without modifying the configuration file code. The latest version of xfce also supports mouse drag and drop, system task management, multibyte and other features.

Mint’s interface

At the same time, the structure of xfce desktop environment includes: a window manager called xfwm, main panel, file manager, background manager, sound manager, Gnome compatible module, etc. In addition, there are many third-party applications: text editor, file manager, calendar program, CD and DVD burning program, media player, browser, etc.

From the perspective of experience process, although it is not as high as the application of gnome and KDE, the simple and efficient characteristics of xfce still win a lot of users’ favor. Currently, the latest version of xfce is 4.6.2.


Lxde (lightweight X11 desktop environment) was founded in 2006. It mainly provides a lightweight and fast desktop environment for UNIX and POSIX compatible platforms such as Linux and BSD. The developers are mainly PCMan, Fred Chien, the famous open source programmers in Taiwan, and other active developers such as Paul Liu, Andrew Lee and jserv.


Lxde is a small and exquisite desktop environment compared to gnome and KDE. Lxde pays more attention to practicability and lightness, and tries to reduce the system resources it consumes. Different from other desktop environments, its components have little dependence. Instead, each component can operate independently, and most components can be executed independently without relying on other packages.

Lxde uses OPENBOX as its default window manager, and hopes to provide a lightweight and fast desktop built on independent packages. In addition, lxde also integrates some applications and tools: picture browser, appearance, font, scenery theme management tool, music player, screen setting tool, panel management tool, editing tool, system resource monitoring, work administrator and light file and desktop management program.

From the experience process, lxde really has low requirements on the system hardware, and even the computers produced in 1999 can execute normally. So, if you have a computer that is about to be eliminated to install Linux system, lxde will be a good choice for you.

Here, we choose only four kinds of experience for many graphic desktop environments, which is also because many people compare Gnome with KDE, and xfce with lxde respectively.

From the perspective of effect, Windows does not have many advantages in front of Linux system. The powerful functions and colorful interfaces of KDE and gnome are not inferior to, or even better than, windows. Meanwhile, in terms of special effects display, such as translucent and three-dimensional interfaces, what windows can do depends on powerful KDE and gnome. And, more recently, the next version of Ubuntu will also support multi touch.

Of course, if your computer hardware configuration is not high, or in mobile devices, the lightweight desktop environment will play an important role.

Therefore, we can see that through the involvement of various graphical desktop environments, the Linux system is entering a stage of rapid development, and the popularity of Linux desktop applications has gradually opened up a new world.

Recommended Today

Monkey patch monkey patch programming method and its application in Ruby

What ismonkey patch (Monkey Patch)? In a dynamic language, functions are added and changed without modifying the source code. Purpose of using monkey patch:1. Additional function2. Function change3. Fix program errors4. Add a hook to execute some other processing while executing a method, such as printing logs, realizing AOP, etc,5. Cache, when the amount of […]