Configuration of the fourth chapter X
Although the article is not well written, but I still hope that my article for the commune's friends to provide help, and the same as before, this series of articles I only published in the commune, I hope everyone to join.
My article has been delayed for a long time, I am sorry. Some time ago because I have been busy looking for work, and sick one, so the article a push and push, and now finally can dedicate to everyone.
This chapter I mainly introduce the X system with the main configuration file xf86config-4, I used a comparison of methods introduced, while pasting out my xf86config-4 file, while introducing specific content. This article for everyone does not have any pole to see the shadow of help, do not have to let you for X just have a basic understanding.
The xf86config-4 file is the primary configuration file for the X system. In the previous version of Redhat 8 is called xf86config-4, Redhat 8 is no longer called the name.
You need to be cautious about editing this file because your X will not start because of a mistake. It doesn't matter, change back is the best way to learn Linux of course, or turn to the men (man), we have any problem even if you look at the help of Man. If you want to delete the contents of the file, it is best not to delete it directly, but should precede it with a # symbol to make it a comment.
In previous versions of Redhat 8, the Configuration tool for X was xconfigurator, and the mating method for x in Debian was:
Dpkg-reconfigure Xserver-xfree86
Of course you have to run it as root.
You can see the specific tricks in the/usr/share/doc/xfree86-common/faq.gz file.
The first paragraph is the files section, which is used to configure the X system to be able to use the font, each line represents a directory, save the specific font and font configuration information.
Code:
section "Files"
Fontpath "/usr/x11r6/lib/x11/fonts/xp"
Fontpath "/usr/x11r6/lib/x11/fonts/xchinese"
Fontpath "Unix/:7100" # This is the local font server
# If there is a problem with the local font server, we can use the following configuration
Fontpath "/usr/lib/x11/fonts/misc"
Fontpath "/usr/lib/x11/fonts/cyrillic"
Fontpath "/usr/lib/x11/fonts/100dpi/:unscaled"
Fontpath "/usr/lib/x11/fonts/75dpi/:unscaled"
Fontpath "/usr/lib/x11/fonts/type1"
Fontpath "/usr/lib/x11/fonts/speedo"
Fontpath "/usr/lib/x11/fonts/100dpi" #这两个字体是每一个X
Fontpath "/usr/lib/x11/fonts/75dpi" #系统都必需安装的英文字体
Endsection
The following is the module segment, which is used to configure the module that the X system loads.
Code:
section "Module"
Load "Xtt" #gtk1使用的字体引擎, the effect is good, the speed is slightly slow
Load "Glcore" #如果你是用的是Nvidia的显卡, it seems to be a bet to eliminate this line
Load "Bitmap"
Load "DBE"
Load "DDC"
Load "DRI"
Load "Extmod"
# Load "FreeType" #如果你使用了xtt模块, then the FreeType module needs to be eliminated
Load "GLX"
Load "Int10"
Load "Record"
Load "Speedo"
Load "Type1"
Load "VBE"
Endsection
The following section is used to configure your keyboard, which belongs to the "input device"
Code:
section "InputDevice"
Identifier "Generic Keyboard" #这是你的键盘的名字, whatever you want.
Driver "Keyboard" #键盘的驱动 ... Wow, the keyboard also has a drive
Option "Corekeyboard" #如果你有多个键盘, then you need to specify here which keyboard is the main keyboard
Option "Xkbrules" "XFree86"
Option "XkbModel" "pc104" #键盘的分布格式, generally
Option "Xkblayout" "Us" #美国104键盘是大家通用的.
Endsection
Configure your mouse here, of course you can configure two mouse, if you have
Code:
section "InputDevice"
Identifier "Configured Mouse" #鼠标的名字
Driver "Mouse" #鼠标的驱动
Option "Corepointer"
Option "Device" "/dev/input/mice"
#注意, it's important here, this is the device file for the mouse
#我的鼠标是光电鼠标, with the USB interface, the corresponding mouse file is/dev/input/mice
#如果你的鼠标是普通的滚轮鼠标, with the PS2 interface, you should use the
#/dev/mouse or/dev/psaux or/DEV/TTYS0 this device
Option "Rotocol" "IMPS/2"
#这是鼠标的类型, if it's not a wheel mouse, use PS/2
Option "Emulate3buttons" "true"
#在Linux系统中, the third key of the mouse is very useful,
#如果你的鼠标没有第三个键, then we should allow the use of double bond simultaneous click to simulate
Option "Zaxismapping" "4 5"
Endsection
The following device is the video card, this is the most headache device, if your video card is too trendy, it is likely not support OH. Nvidia's GFORCE2 graphics card is required to compile the driver for the video card to use
Code:
section "Device"
Identifier "Generic Video Card"
Driver "ATI" #如果你是Nivida的显卡, this should be "nvidia"
Endsection
This device is a monitor.
Code:
section "Monitor"
Identifier "Generic Monitor" #显示器的名字
Horizsync 30-60 #显示器的频率, half of your monitor
Vertrefresh 50-75 #应该可以达到我的这个水平
#因为我的显示器是15 "The old Monitor.
#大家的电脑都比我的好吧?
Option "DPMS"
Endsection
Here are a variety of display effects that combine the devices above your configuration
Code:
Section "Screen"
Identifier "Default Screen" #效果的名字
Device "Generic Video Card" #你可以指定你的显卡的名字
Monitor "Generic Monitor" #指定你的显示器的名字
Defaultdepth #默认的颜色深度
Subsection "Display"
Depth 1
Modes "1024x768"
Endsubsection
Subsection "Display"
Depth 4
Modes "1024x768"
Endsubsection
Subsection "Display"
Depth 8
Modes "1024x768"
Endsubsection
Subsection "Display"
Depth 16
Modes "1024x768" #在这里你可以指定扫描频率例如
# "1024x768 @ 85" is a 85mhz frequency
Endsubsection
Subsection "Display"
Depth 24
Modes "1024x768"
Endsubsection
Endsection
Finally you have to define the following section to tell the X server which configuration you are using
Code:
section "Serverlayout"
Identifier "Default Layout" #刚才我们给我们的配置取的名字
Screen ' Default screen ' #给我们的效果取的名字
InputDevice "Generic Keyboard" #我们的键盘的名字
InputDevice "Configured Mouse" #我们的鼠标的名字
#这些名字一定要在前面的配置中已经定义
Endsection
section "DRI"
Mode 0666
Endsection
In general, the problems we encounter when we start X are:
1:no Screen found
It is possible that you do not have the correct definition of the desired effect, there may be other parts of your definition error upside down your effect can not be achieved
The conflict between 2:xtt and FreeType, one on the other.
3: Driver not found, if your video card is very trendy, then most of this error, compile your driver ...
Linux operating system Getting Started Basics Tutorial 4