From: http://hi.baidu.com/johnman/blog/item/69a11a4f2c7b2634aec3ab30.html
X Server and WM (Window Manager
Window Manager.
How do you start the graphic interface?
It would be a pity if you enter the graphic interface as soon as you start. You should have missed a good time to understand the Startup Process of X server. But it doesn't matter. Open an xterm input:
Init
3
You can safely return to the character interface.
Now, after completing the following experiments, you will fully understand X and WM (window manager ).
Window Manager.
Enter the following command:
# Startx
Starting the graphic interface, you can see a complete graphic interface operating environment that is used in the same scenario.
You can maximize, minimize, move, and close the window.
Press CTRL + ALT + backspace to return to the character interface.
Input:
# Xinit
Start the graphic interface again. What do you see? You can see an xterm. It cannot be moved. But you can enter the command in this xterm to open the X application. If I enter:
# Mozilla
Open the browser. What is the difference between the browser and the normal one? He is in the middle of the screen, cannot move, cannot minimize, cannot maximize, no border.
Why is the same X application so different? Because we also started a WM (Window Manager) when we started the graphic interface with startx. If you use Kde, we started KDE. If you use gnome, we started gnome. however, you didn't start WM when you started the graphic interface with xinit.
Do you understand the function of window manager? Its role is to maximize, minimize, move, close the window, and so on. These are not done by X server.
If you use xinit to start the graphic interface and input TWM in xterm, what will happen?
Xterm is added with a border. You can move the border to maximize and minimize this xterm. TWM is the self-contained window manager in xfree86. It is a simple and simple window manager, however, it has all the features of the window manager.
If you do not enter TWM and enter gnome-session, you can start gnome.
Or enter startkde to start KDE.
Through the above experiments, you can clearly understand the relationship between them.