How to manually set and modify the display mode of X-Window

Source: Internet
Author: User
Article Title: How to manually set and modify the display mode of X-Window. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   I. a brief discussion on the working method of X Window
  
(If you are concerned about setting X Widow, you can skip this section. It is helpful to understand the knowledge in this section)
  
The working method of X Window is essentially different from that of Microsoft Windows. MS Windows graphical user interface (GUI) is closely linked with the system. X Window is not. It is actually an application running on the kernel.
  
The operation of X Window is divided into four layers. the bottom layer is X Server, which provides a graphical interface driver to provide services for X Window. the above layer is the network protocol used for online communication-the X network protocol. this part makes it possible to remotely run X Window. you only need to run an X Server on the Server, while the Client can run a program at a higher level to remotely run X Widow. the next layer is the low-level function interface called Xlib, which is between the network and the underlying system in the upper-level program. applications are implemented by calling functions at this layer.
  
The top layer is the Window Manager of the Management Window, which is generally referred to as WM (Window Manager ). software on this layer is frequently used by users, such as fvwm, AfterStep, Enlightment, and WindowMaker.
  
From the above introduction, the operation of X Window is a Client/Server mode. The Server is used to Display the passenger application, also known as the Display Server) the display server is located between the hardware and the client. It tracks all input actions from the input device, such as the keyboard and mouse, and sends them back to the client after processing. in this way, the user can even run X Client on the MS Windows machine, capture and transmit user input, just display the X Window Screen output on the user's screen. the communication between the input and output systems of the client and the X server complies with the X protocol.
  
Since this document mainly aims to introduce how to set up windows, we will not further introduce X Windows. For more details, refer to the relevant HOWTO and man pages.
  
   Ii. settings of X Window
  
1. X Server
  
In Linux, the programs on these servers are stored under/usr/X11R6/bin/and all are headers of XF86 _. In general, Mono is provided in a single-display mode, the drivers for standard VGA and SVGA are named XF86_Mono, XF86_VGA16, and XF86_SVGA. In addition, S3 and other graphics card drivers with graphic acceleration functions may be available. the X Server Driver contained in RedHat Linux 6.1 running on my machine is as follows:
  
XF86_3DLabs XF86_Mono XF86_I128 XF86_VGA16
  
XF86_P9000 XF86_8514 XF86_Mach32 XF86_S3
  
XF86_W32 XF86_AGX XF86_Mach64 XF86_S3V
  
XF86_FBDev XF86_Mach8 XF86_SVGA
  
If your/usr/X11R6/bin file does not exist or you have an additional file, you don't have to worry about it. This depends on the hardware of your machine. in fact, you only need to configure the driver with your own hardware.
  
For example, the computer on which the author is using the display card of the 3D Lab Permedia II chip, so only XF86_3DLabs works.
  
For so many types of display adapter drivers, the system certainly needs a fixed and unified method to access it. Generally, the system uses a symbol named X to connect to access the specific X Server.
  
This X also exists in the/usr/X11R6/bin/directory. You can run the following command to print its pointed point:
  
Ls-l/usr/X11R6/bin/X
  
The result is as follows:
  
Lrwxrwxrwx 1 root 8 Dec 14
  
/Usr/X11R6/bin/X-> XF86_3DLab
  
In the previous attribute "lrwxrwxrwx", the first letter "l" indicates that it is a connection. At last, the arrow points to the specific target. (The line feed here is for ease of reading)
  
After understanding this, you can change the connection to change X Server later. The specific command is as follows:
  
Ln-sf/usr/X11R6/bin/X ??????? /Usr/X11R6/bin/X
  
The question mark represents the letter according to the specific situation. sometimes, the X Window cannot be run because of the incorrect connection. In this case, you can point it to XF86_VGA16 and use the 16-color VGA mode to enter the X Window, note: If you need to run the XF86Setup Program (X Window Configuration tool for a graphical interface), The XF86_VGA16 driver must exist because of the display mode provided by the driver.
  
It is generally supported by the display card and display, so this configuration program uses this X Server as the driver. when your video card is of a special model, you need to install a specific driver.
  
There are multiple ways to obtain drivers. Generally, Linux releases provide a wide range of drivers to meet most of the requirements. Special drivers can be obtained online. of course, the support for hardware in Linux is not perfect yet, but it is beyond the access of this document and is not described in more.
  
2. Display Mode
  
The display mode includes resolution, scan frequency, and color depth. this is one of the most frequently asked questions about display. for the current display card and display, generally 1024x768x16 bit color display mode can be used. of course, when you use the methods described below to set your display mode, make sure that your display card and display can meet the requirements of this mode, otherwise, the hardware may be damaged.
  
In each release version, tools and software for setting X Windows are provided, such as Xconfigurator, XF86Setup, and XF86Config, without exception, these programs provide an easy way to modify the XF86Config configuration file of X Window. of course, it is easy to use, but it is not very suitable for some situations that require flexible adjustment. You need to manually adjust the parameters in the configuration file to achieve the best effect. you do not have to do this. Here we only introduce this method, so that you can solve it easily when you have any questions.
  
Generally, this file exists in the/usr/X11R6/lib/X11/directory and has a symbolic connection in the/etc or/etc/X11 directory. it is a text file and can be modified using vi. the following describes in detail the functions of each part of the file. (if any omission exists, please submit it)
  
This file has the following concepts: Section and Subsection. Different parameters are provided for each Section or Subsection, in the format:
  
Section
  
......
  
Endsection
  
  
  
Section
  
Subsection
  
......
  
Endsubsection
  
Endsection
  
A complete configuration File contains six segments: File, SeverFlag, Keyboard, and Pointer, usually the mouse), Monitor (Monitor), Device (display adapter, that is, graphics card), Screen (Screen settings ).
  
File: This section indicates the location of some files required to run X Window, such as the color File rgb.txt (note that the File extension is not required here). For example:
  
RgbPath "/usr/X11R6/lib/X11/rgb"
  
If you have read/usr/X11R6/lib/X11/rgb.txt, you will easily know what it is. with it, you can use red1 to represent the RGB color value of 255 0 0 and so on.
  
Next is the path of the font file. The settings here will affect the output of the Chinese font. Here, the path can be multiple, for example, the following:
  
FontPath "unix/:-1"
  
FontPath "/usr/share/zhfont/X11: unscaled"
  
FontPath "/usr/share/zhfont/TTF"
  
FontPath "/usr/X11R6/lib/X11/fonts/local"
  
FontPath "/usr/X11R6/lib/X11/fonts/chinese"
  
FontPath "/usr/X11R6/lib/X11/fonts/TTF"
  
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
  
FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
  
FontPath "/usr/X11R6/lib/X11/fonts/misc"
  
FontPath "/usr/X11R6/lib/X11/fonts/75 dpi"
  
FontPath "/usr/X11R6/lib/X11/fonts/ 100 dpi"
  
Before using a font directory, run the mkfontdir command to list the fonts in a path and generate font. dir in the directory as the font index. For example:
  
Mkfontdir/usr/X11Ry/lib/X11/fonts/100 dpi
  
For specific usage of this command, use the man command to view its man page (manual page), or provide detailed instructions in subsequent versions of this document.
  
ServerFlag segment: this segment specifies some specific parameters, as shown below:
  
NoTrapSignals indicates that the debugging signal does not work on X Server. debugging signals will make X Server "dump the Core" and store the information about X Server in the memory to the hard disk, that is, the so-called "Core dump ". this aims to facilitate debugging of X Server.
  
Related Article

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.