Relationship of Linux client, server, window Manager

Source: Internet
Author: User

Embedded Linux Chinese station found many Linux beginners in learning the knowledge of Linux graphics will encounter some concepts, such as: X, X11, Xfree86, WM, KDE, GNOME, QT, qt/e, Qtopia, DIRECTFB, Framebuffer, graphics acceleration drivers, and more. It is very important for us to understand what is the relationship between them. The purpose of writing this article is to make people clear about these concepts and their relationship.

I. The relationship between Linux operating system and graphics

Linux itself does not have an image interface, and the implementation of Linux's current image interface is only implemented by Linux applications. The image interface is not part of Linux, but Linux is a command-line based operating system. The Linux kernel provides a display device driver for graphical interfaces in Linux systems.

second, the concept of x

X is the protocol, just like the HTTP protocol, IP protocol. This concept many beginners even learn Linux for a certain time people are confused, an X-based application needs to run and display content, he joined to the X server, began to talk with the X protocol and the server. Like an x application (x Client) to output a circle on the screen, he says to the X server using the X protocol: Hey! I need to draw a circle on the screen. The X application is only responsible for telling the X server where to draw a large circle in what color on the screen, and the specific "picture" action, such as how the circle is generated, what graphics card driver to command the graphics card to complete, etc. work is done by the X server. The X server is also responsible for capturing keyboard and mouse actions. Assuming that the X server captures the left mouse button is pressed, he tells the X application: Dear application, I found the mouse was pressed, do you have any instructions? If the X application is designed to draw a square on the screen when the mouse Zuojian is pressed, x application on the x server said: Please draw another square, of course, he will tell the server where to draw a square with what color, but do not care about how to draw-that is the server thing.

Three, the concept of X11 and X11R6

X11 represents the 16th edition of the X protocol. X11R6 is the sixth release of the 11th edition of the X protocol.

Iv. what is XFREE86?

XFree86 is the X11R6 execution program for x Windows server. With the agreement, specific software is required to implement this Protocol. Xfree86 is a task that is displayed on the screen in accordance with the X protocol to complete the X application submission. The software that implements the X protocol is not only XFREE86, XFree86 is just a free x server software that implements the X protocol. Some can even have an X server running on Windows, so you can run an X application on a Linux system and then display it on another Windows system. Just the most commonly used on Linux is XFree86. However, most of the Linux distributions now use Xorg.

XFREE86 content includes x server, font, an X Terminal program (xterm), a simple window manager (TWM), a lot of useful gadgets, display output drivers and many input modules including keyboard and mouse.

v. WM (Window manager manager)

In Red Hat system, you can set the boot Level 3, go to the command line terminal, and then run:

#startx

Starting the image interface, you see a peaceful time using the same full image interface operating environment. Ability to maximize, minimize, move, close windows and more. Press Ctrl+alt+backspace to reverse the character interface. Input:

#xinit

Start the image screen again and you see what you see in a xterm (a terminal program running under x). and can't move. However, you can enter a command in this xterm to open the X application, if you enter:

#mozill

Open the browser, you see the browser and usually what is different? He is in the middle of the screen, cannot be moved, cannot be minimized, cannot be maximized, has no border.

Why is the same x application different? Because when we start the image interface with the STARTX, we also launch a WM (IE window manager), if you use KDE to start KDE, if you use Gnome to start gnome. But you don't start the WM when you start the image interface with Xinit.

The role of the window manager is to maximize, minimize, move, close windows, and so on. And these are not X servers that are responsible for the completion. If you use Xinit to start the image interface and enter TWM in xterm, see what happens?

Xterm is added with a border that allows you to move, maximize, and minimize this xterm. TWM is the window manager that comes with XFree86, and is a simple window manager, but he has all the features of the window manager.

vi. KDE and Gnome

KDE and Gnome are the most commonly used image interface operating environment in Linux, they are not only a window manager so simple, KDE is the abbreviation of K Desktop Environment, he is not only a window manager, but also a lot of supporting application software and convenient desktop environment, such as taskbar, Start menu, desktop icon and so on. Gnome is the GNU Network Object Model environment abbreviation, same as KDE, is also a powerful integrated environment.

Vii. QT, qt/e, Qtopia

Trolltec (funny) QT products have many, such as: Qt, qt/e, Qtopia and so on. Currently owned by Nokia.

QT refers to all desktop versions of QT, such as: Qt/x11,qt WINDOWS,QT mac, etc. Since QT was the first to be popular with KDE in Linux, it was generally thought that Qt was based on Linux qt/x11. QT is a complete framework for C + + application development. It contains a class library, and tools for cross-platform development and internationalization. The QT API is the same on all supported platforms, and the QT tools are used consistently on these platforms, so the development and deployment of QT applications is platform agnostic. In desktop systems, the QT program is typically an X protocol-compliant application that requires X-server support.

QT/E is the QT version for embedded Linux systems. Qt/e the dependence of X Lib and works directly on frame buffer, so the application process is more efficient. It runs as long as the framebuffer device is available and does not require X-server support. But its own operation also has the concept of server and client. To run the QT/E program before the server starts, you need to "-QWS" to start the server. Such as:

#./hello–qws

After QT4, qt/e renamed Qtopia Core, and integrated into the Qtopia finished product.

The qt/e is run by the frame buffer device. With simple, efficient and other characteristics. However, engineers who understand the frame buffer device will find that the frame buffer device does not implement hardware acceleration capabilities. This also limits the development of graphics solutions based on framebuffer devices. In fact, the XFREE86 on the desktop is not supported by default for Framebuffer devices, and XFREE86 directly operates the graphics card, taking full advantage of the Graphics acceleration feature (the next topic will cover graphics acceleration). Xserver compatible with the most types of display cards, in general, now more than 80% of the market display card can be supported by this server. Sometimes, however, some video cards cannot be set incorrectly, and you can use frame buffer mode to support the display. The main use of the XFree86 frame buffer Server (xf86_fbdev). You need to modify the XFree86 configuration file/etc/x11/xf86config and add the Vga=xxx function to the/etc/grub.conf.

Qtopia is a full-fledged application development platform for Embedded Linux, as well as a user interface for Linux-based PDAs (personal digital assistants), Smartphones (Smartphone), and other mobile devices.

Eight, DIRECTFB, graphics accelerated drive

First DIRECTFB is similar to the XFREE86 in the desktop. The XFREE86 in the desktop does not require a frame buffer device, and DIRECTFB needs it.

Graphics acceleration requires multi-graphics functionality in the embedded GUI, including drawing and copying. Many of these features require a large amount of data transfer (form-copy), or a large number of numerical operations (such as a spline curve) are required. If these functions are implemented by pure software, they can consume a lot of CPU time and need to pass a lot of data, which can affect the graphics performance. Many graphics cards have graphics processors that enable some of the graphics functionality from the hardware. Graphics libraries that support hardware acceleration can implement these graphics functions through a graphics processor, which reduces the burden on the CPU and reduces the transmission time of data on the bus, improving graphics performance.

The DIRECTFB project is part of the open source program, driven by the German convergence company, which is a small, powerful, flexible and easy-to-use graphics system developed specifically to meet the requirements of embedded devices, and is attempting to become a Linux A new graphic standard on top of Framebuffer device. It provides the function of graphics acceleration, input device processing extraction, transparent window and multi-display layer on the basis of framebuffer, and it can support the GUI of embedded system better. Compared with the common embedded GUI system, it has a very simple and efficient architecture and hardware graphics acceleration function.

DIRECTFB relies on an existing kernel interface, the framebuffer device (/DEV/FB), to access the graphics processor, meaning that DIREETFB requires a working framebuffer driver. The Linux kernel has a dedicated frame buffer driver to support some graphics processors. For unsupported graphics processors, the kernel provides VE-SA frame buffering (Some limitations of this framebuffer). DIRECTFB uses a frame buffer device to do the following:

Set the graphics operating mode (resolution, color depth, timing)

Mapping video Memory

If a video card is supported by DIRECFB and has a frame buffer drive for the graphics processor in the Linux kernel, DIRECTFB uses the framebuffer device to do the following additional work:

Mapping the Memory IO port (if the acceleration drive is implemented in user space, this step is required.) If implemented in kernel space, no mapping is required, but a corresponding driver interface is required. You can also re-write a driver to specifically implement the acceleration function)

Turn off the acceleration feature in the frame buffer drive

The graphics processor I/O port that accesses the memory map for specific graphics operations (example copy, area fill, region copy, draw line, graphics stretch, etc.), DIRECTFB-speed driver (for control register access mapped to user space), submits commands to graphics processors, which are implemented by video cards. This means that real hardware acceleration is completely implemented in user space. This allows the DIRECTFB to provide maximum hardware graphics acceleration for the graphics processor it supports. These acceleration features require the support of the graphics controller. Some embedded display controllers do not have the corresponding functions. Requires an external video card to implement.

The upper APL supports DIRECTFB: XDIRECTFB, DIRECTFBGL, GTK +, Dfbterm, Dfbsee, Dfbpoint, MythTV, Qt on DIRECTFB, SDL, etc.

DIRECTFB also requires a window manager. DIRECTFB is modular in design, it does not depend on a specific window manager, as long as the specific window manager implementation interface DIRECTFB in the Corewmfuncs defined in the function, you can hang into the DIRECTFB run. DIRECTFB comes with two window managers: Default and unique, you can use WM=XXX in the configuration file to choose which one to use as the current window manager.

Through the above 8 aspects, introduced the X, X11, Xfree86, WM, KDE, GNOME, QT, qt/e, Qtopia, DIRECTFB, Framebuffer, graphics card acceleration and other concepts and some of their relationship.

Reprinted from: http://www.embeddedlinux.org.cn/emb-linux/graphic-interface/201111/08-1822.html

Relationship of Linux client, server, window Manager

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.