This is some discussion about XDM / GDM / KDM. I have read some literature (some literary names and authors don't remember, please forgive), and combine some of your experiences, if some places are wrong, please See quantity.
For some concepts of x winin system, you still look for related literature, my goal is to discuss how to set up and launch your X Windows System. First you have to know how to configure your X-configured file / etc / x11 / xf86config (or XF86config-4), this file configuration and its configuration tool is not discussed.
A lot of days ago, I saw the things in this regard, and I also saw some of the MAN pages. Of course, I also found some information about the relevant information to come to Look, although I still don't know much, but I still know some I took it out to offer ugly. Oh, my principle is: Good things everyone share together.
1, let us discuss these things in XDM / GDM / KDM. Instead, let's take a look at the simplest way to start X. First, I will know two important files, one is the X Window startup file - xinitrc, and the other is the X window resource file --XDefaults.
[1] X Window Startup File - xinitrc
In fact, we generally execute startX to launch X Window System, where startx is the front-end interface of Xinit [Front-End]. If we start X, this instruction will start X Server and execute $ home / .xinitrc file The setting inside. If there is no such file, the system will use the content file / usr / xr116 / lib / x11 / xinit / xinitrc. In fact, the xinitrc file typically only contains the shell script to execute the Clients when starting X, define some instructions and shell script, allowing X to start the shell script inside to launch the necessary applications. For example, my simple and practical $ HOME / .XINITRC is as follows:
Code:
# More .xinitrc
LANG = zh_cn.gb2312
LC_all = zh_cn.gb2312
LC_CTYPE = zh_cn.gb2312
KDE_LANG = zh_cn.gb2312
EXPORT LANG LC_ALL LC_CTYPE KDE_LANG
Export XModifiers = @ im = chinput
/ USR / BIN / CHINPUT &
EXEC KDE3
Killall chinput
#
For more detailed $ home / .xinitrc, you can find a more professional book, the more simple and better. Everyone should be more clear. First set some environment variables, then set some input methods (I use smart five pen), next is to start the window management program KDE3, pay attention: KDE3 is performed with the Exec description of the shell script, which causes the XINIT program. The shell will be replaced by the shell of KDE3. So once the KDE3 program ends, you will jump out of the shell, relatively, XINIT will end, X Server will turn off. This is the way to perform X Window Manager. It must be determined that the last execution in .xinitrc is the command that is starting with Exec as the beginning of X Windows Manager, and should not be added to some background execution, otherwise, those instructions are meaningless. The latter Killall chinput is telling the end of chinput, otherwise it is very likely to cause some problems because of the CHINPUT. This is the most simple desktop settings. If you still have to start more programs and settings, you can add it in front. As long as you add slightly in your $ home / .xinitrc file, you can do it, but remember to add before the X Window Manager executes paragraphs. [2] X Windows Resource File --XDefaults
In the literature of X, Resources has two meaning. The first is something used by Server or establishing a desktop application, for example: window, cursor, font, etc. belong to this meaning. Another method refers to a method of delivering pre-set values, parameters, and other values to applications, for example, can define the size of the window, the foreground color, display font, shortcut, and the like. In the operation application of X Window System, the meaning of RESOURCES is also limited to the second, mainly using the resources function. In XDEFAULTS in X Window System, it is mainly to set up an operation control environment or interface of the application that is appropriate. When X is performed, $ HOME / .XDEFAULTS will be read automatically. The specific content I don't give here, because I feel is not very important. Write this thing in the future.
Oh, in the XTERM window, there is a small trick: you hold the Ctrl mouse button will jump out of some fonts and other settings, press and hold the Ctrl mouse left button to jump out the main menu of the XTERM application. In addition, in addition to .xdefaults resources available, there are some applications that will be generated by themselves.
/ usr / xr116 / lib / x11 / app-default, and name it with the uppercase file name of these programs. For example, the resource file of the XClok clock program is XClock. Others you will understand. You can directly modify the resource files of these applications, as the style of the system's internal application. Not necessarily, it is necessary to modify .xdefaults to complete. Because .xdefaults is usually a thing that is used by personal hobbies and uses the environment.
Some of the individual's little experience, don't know if there is .XSESSION this file without .xinitrc This file is, you will use StartX to start .xSession, but when there is two files, it will Read the .xsinitrc file. Maybe it is a priority reason (knowing it out).
2, start our X Window System
X WINDOW SYSTEM has a lot of startup methods, the most commonly used or STARTX obtained above, in addition, the "X" starts the X window system, or execute xinit boot X. The current release version is generally started with XDM (Xome Display Manager) / KDM (KDE Display Manager), let Linux system enters X Window System immediately, and uses the user with graphics mode Let's log in (huh, like MS Windows, starting like this). If you want to quit X Window Manager, you can execute init 3 to leave Xterm. [1] Start Xinit / StartX
This is a general method: I also often start X in this way in Debain. Is to execute / usr / xr116 / bin / startX. In fact, this method is to perform / usr / x11r6 / bin / xinit or / usr / x11r6 / bin / x is different. Differences in xinit and "x" do not perform read resource files to perform X Window Manager, so the general case you get the X window system is a very simple X-mouse pointer with simple xterm. But xinit is the most standard X boot method, and it is estimated that the vast majority of system X Window System will support. It is the X Window System's core program, and StartX is just a starting of XINIT's shell script, which is also defined in the XINIT command to start the X window system. When STARTX is generally executed, the process of X startup is about these things:
1) XINIT launches the X Server program;
2) X Server will look for a $ home / .xininTrc file, and if you do it, you don't turn to the / etc / x11 / xinit / xinitrc read the system's internal startup file.
3) The next will read $ home / .xdefaults, if not, turn to / usr / x11 / xinit / xcilents. From the file name XClients, this is a file that is used to set the program that executes when the X application is executed. Nature is similar to xinitrc, which is also a shell script. But to note that: .xdefaults are permissions with 755, ready.
4) In normal case, $ Home / .xinInTrc is used to assign an application that allows X Window System to run. And .xdefaults is recommended to load X resource settings and application applications to suit each user's own love level.
5) X Server build a root window (root windows), and set up the background of the window and perform the specified application, showing a large "X" cursor, completes the startup.
6) During the X Server execution, it has always controlled your mouse's keyboard.
This is why you can move the cursor on the screen, but because there is currently no X Client program that requires the keyboard and mouse input. So X Server is only moving with the mouse. Although other keyboards or mouse inputs are handled by X Server, they are considered unpatisfactory (because there is no X CLINET program received). This is also the initial period of X initiation, the reasons why the keyboard or mouse is not reacted. But if you are sending a letter to X Server and x client, this will work. For example: Ctrl Alt BackSpace is a interrupt signal for X Server. When X is started to midway or executed, the X Server immediately ends X Server immediately, jump back to the status of Command Prompt Terminal.
7) Next, after XINITRC arms X Server, XINIT will start the XTERM program. Oh, XTERM is an abbreviation for X Window Terminal. It is a X ClieTn program for X Server. Require X Server to create a window, and will inform X Server In this window's mouse and keyboard input status (Event), the window will execute a shell when starting xterm, and the end is BASH. When the indicator is moved to the window, XTERM is ready to accept the input. The keyboard input will be associated with the shell in xterm, as the real terminal is entered. The output from the shell itself or its sub-program is displayed on the window by xterm, and XTERM also accepts input, so you can set different program operating parameters and some operations for text, such as Copy or Paste. For these operations, You can observe the detailed steps of the system to perform these commands by performing a PS Auxw command in the xterm. [2] Start your X with XDM / GDM.
The above is said to start your X with StartX, or you can start your X by XDM / GDM to launch your X, which is the way to use some other release versions. For example, redhat is GDM, while Mandrake uses KDM. In general, if you want to use Run-Level that adjusts your system. For example, modify your / etc / inittab, change the ID: 3: InitDefault to 5.
When the system is started in XDM / GDM. About the steps are these:
1) Execute / etc / x11 / xdm / xserver boot X The interface appears in the Console login (is generated by execution / etc / x11 / xdm / giveconsole & takeconsole)
2) Execute / etc / x11 / xdm / xsessions to start XDM or GDM. If you start XDM, load the configuration file on the user's directory, .xSession, and .xClients. If it is GDM, load / etc / x11 / gdm / sesseion with .xclients. As so far as, the interface option of the login of the X window will appear.
3) GDM checks the session operation of the / etc / x11 / gdm / session directory. For example, FVWM, WMaker, Default, Failsafe, Gnome, KDE and Default, etc. And will display the user to choose to enter that X Window Manager. In fact, these sessions are Shell Script file. If you choose KDE, enter KDE Desktop Environment, select Gnome, you will go to GNOME Desktop Environment.
4) If you choose Yes, GDM GNOME Session will find GNOMERC Script, $ HOME / .GNOMERC. If there is no file, you will read the system files on the GNOME Resource File: / ETC / X11 / GDM / GNOMERC, and start / usr / bin / gnome-session.
This completes an XDM / GDM process. But careful people will find that StartX will read $ home / .xinitrc, and why XDM / GDM does not read this, how is it set up a root window background and your logo and x window manager. The reason is that XDM / GDM is used to switch to / etc / x11 / xdm / setup_0, for example, my Mandrake90 is approximately as follows:
Code:
# more xsetup_0
#! / bin / sh
# (C) Mandrakesoft
# Chmoul Boudjnah
# $ ID: xsetup_0, v 1.8 2001/09/19 18:49:29 Flepied Exp $
IF [-f /etc/profile.d/kde.sh]; then
. /etc/profile.d/kde.sh
Fi
[-z "$ kdedir"] && kdedir = / usr
IF [-x $ kdedir / bin / kdmdesktop]; then
$ KDEDIR / BIN / KDMDESKTOP
Else
/ usr / x11r6 / bin / xsetroot -solid "# 21449c"
/ usr / x11r6 / bin / xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitonfail
Fi
IF [-x / etc / x11 / xinit / fixkeyboard]; then
/ etc / x11 / xinit / fixkeyboard
Fi
In the detailed content, I don't say it, please find information yourself. Where XSetroot is set the root window color and performs XCONSOLE settings the login location of the system login screen (Geometry).
If you want to modify the Color Depth (color depth of the XDM / GDM), you can modify the contents of / etc / x11 / xdm / xservers. This is this in my mandrake90:
Code:
M # more xservers
# $ Xconsortium: xserv.ws.cpp, v 1.3 93/09/28 14:30:30 Gildea EXP $
#
#
# $ Xfree86: xc / programs / xdm / config / xserv.ws.cpp, v 1.1.1.1.12.2 1998/104 15:23:
14 Hohndel EXP $
#
# Xservers file, Workstation Prototype
#
# This file shop contain an entry to start the server on the
# Local Display; if You Have More Than One Display (Not Screen), DISPLAY (Not Screen),
# you can add entries to the list (one per line). if you also
# Have Some X Terminals Connected Which Do Not Support XDMCP,
# You can add them here as well. Each X Terminal Line Should
# 爱 乐::
# Ximinalname: 0 foreIGN
#
: 0 local / bin / nice -n -10 / usr / x11r6 / bin / x -deferglyphs 16
Obviously I use 16 Bites colors. Of course, you don't have to be so complicated, you can simply, for example, I am sometimes adopted:
Code:
### Using 16 colors
: 0 local / usr / x11r6 / bin / x -bpp 16
### Use 24 colors
: 0 local / usr / x11r6 / bin / x -bpp 24
### Use 32 colors
: 0 local / usr / x11r6 / bin / x -bpp 32
5) For what X Window Manager and the load mode are not within the scope of Display Manager. Display Manager is just responsible for starting a variety of sessions. Total this sentence, X Display Manager only manages Sessins, you want to achieve more outer work, you can let sessions do it yourself. 6) If you like that way Display Manager, you can choose, modify your favorite things. For example, there are / etc / x11 / prefdm in my mandrake90 is the DISK Manager currently used in the system. You see it just a / usr / bin / gdm one connection. You can also define the following, in / etc / inittab file.
Code:
# h,, Run GDM in Runlevel 5
#gdm is now for pk'mandrake Separate Server
X: 5: Respawn: / etc / x11 / prefdm -nodaemon
You have done your own XDM / GDM connections yourself. (However, I used KDM in Mandrake Linux, but did not install it, so it seems that this file is not connected.)
Here is also a matter, if you are using KDM to manage your X startup, he is just sessions. I have written such a post "Configuring KDM". If you want to see, let's find it. The truth is similar.
3. End us x window manager.
Everyone will come. The simplest is to select Exit or Logout in X Window Manager or it is possible.
Oh, I still remember the previously introduced # home / .xinitrc file, just end the .xinitrc file, execute a program called Exec KDE3, this is the end of X-Server when the X-Server is ended. End together. Alternatively, press CRTL Alt Backspace to end your X Window Manager, which is to give the interrupt signal to the end X back to Console Terminal.
The above situation is to start X with StartX. If you use XDM / KDM / GDM to start your X, you press the above method to return to the X-Wind window login interface, X-Server will not end. You can run Init 3 under Console, you will end your X-Server if you are init 5, then the X-Server is back. Cool?
Ok, this is some of my understanding of this, if you know more and more detailed methods, please tell you. Let's share your experience together.