红联Linux门户
Linux帮助

XFree86配置

发布时间:2008-01-05 00:40:25来源:红联作者:oniprbl
在XFree86中的配置文件是XF86Config-4,下面介绍几种配置的工具:

xf86config是一个基于文本的配置工具。在控制台运行该命令后按提示配置就可以了。

reconfig用以把旧版的配置文件转换成4.0.1版的配置文件格式。

可 以用$ XFree86 -configure命令由系统自动生成一个叫XF86Config.new的配置文件,可基于这个文件再修改。最后用$ XFree86 -xf86config XF86Config.new进行测试。如果成功将出现一个带“X”的窗口。最后把正确的配置文件拷贝成/etc/X11/XF86Config-4。

在XFree86 4.0.1后,还可通过xf86cfg这个图形化程序来进行配置。

在各linux的发行版中,还包含有各自开发的配置工具,redhat有Xconfigurator;Mandrake 有DrakConf;SuSE 有SaX。


下面是一个完整的配置文件例子:

引用:
Section "ServerLayout" ==============配置标识区
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
# PS/2 Mouse not detected
InputDevice "Serial Mouse" "CorePointer"
# USB Mouse not detected
EndSection

Section "ServerFlags" =================X 选项配置区
Option "AllowMouseOpenFail" "true" ====允许在鼠标配置失败的情况下启动X
Option "DontZap" "true" ====不能使用Ctrl+Alt+Backspace组合键退出X
Option "DontZoom" "true" ====不能使用Ctrl+Alt+小键盘+-来切换显示模式


EndSection

Section "Files" =========================字体配置区
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
# Additional fonts: Locale, Gimp, TTF...
# FontPath "/usr/X11R6/lib/X11/fonts/latin2/75dpi"
# FontPath "/usr/X11R6/lib/X11/fonts/latin2/100dpi"
# True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/PEX"
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic"
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
EndSection

Section "Module"
Load "ddc" # ddc probing of monitor
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "record"
Load "xtt"
EndSection

Section "InputDevice" ================键盘配置区
Identifier "Keyboard0"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"

EndSection

Section "InputDevice" =================串口鼠标配置区
Identifier "Serial Mouse"
Driver "mouse"
Option "Protocol" "Microsoft"
Option "Device" "/dev/ttyS0"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "70"
Option "SendCoreEvents" "true"
EndSection

Section "InputDevice" =================ps/2鼠标配置区
Identifier "PS/2 Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "70"
Option "SendCoreEvents" "true"
EndSection

Section "InputDevice" =================usb鼠标配置区
Identifier "USB Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "SendCoreEvents" "true"
Option "Protocol" "IMPS/2"
Option "ZAxisMapping" "4 5"
Option "Buttons" "5"
EndSection

Section "Monitor" ==================显示器配置区
Identifier "Monitor0"
Option "DPMS" "true"
VendorName "MAG"
ModelName "MAG9705"
HorizSync 30-86# DDC-probed
VertRefresh 50-160# DDC-probed
# These are the DDC-probed settings reported by your monitor.
# 1600x1200, 65.0Hz; hfreq=81.25, vfreq=65.00
ModeLine "1600x1200" 175.50 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
# 1280x1024, 75.0Hz; hfreq=79.98, vfreq=75.03
ModeLine "1280x1024" 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
# 1280x960, 85.0Hz; hfreq=85.40, vfreq=85.00
ModeLine "1280x960" 148.50 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync
# 1024x768, 85.0Hz; hfreq=68.68, vfreq=85.00
ModeLine "1024x768" 94.50 1024 1072 1168 1376 768 769 772 808 +hsync +vsync
EndSection

Section "Device" ===================显卡配置区
### Available Driver options are:-
# sw_cursor is needed for some ati and radeon cards
Option "sw_cursor"
#Option "hw_cursor"
#Option "NoAccel"
#Option "ShowCache"
#Option "ShadowFB"
#Option "UseFBDev"
#Option "Rotate"
Identifier "Card0"
Driver "nv" =======如果不清楚可选svga或vga
VendorName "NVidia"
BoardName "GeForce2 MX DDR"
# BusID "PCI:1:0:0"
EndSection

Section "Screen" =====================屏幕配置区
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultColorDepth 24 ============用24位色深
SubSection "Display"
Depth 1
Modes "1024x768" "640x480"
Virtual 0 0
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768" "640x480"
Virtual 0 0
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "640x480"
Virtual 0 0
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "640x480"
Virtual 0 0
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
Virtual 0 0
EndSubSection
SubSection "Display"
SubSection "Display"
Depth 24
Modes "1024x768" "640x480"
Virtual 0 0
EndSubSection
SubSection "Display"
Depth 32
Modes "1024x768" "640x480"
Virtual 0 0
EndSubSection
EndSection
文章评论

共有 1 条评论

  1. liaonan 于 2008-01-05 06:53:54发表:

    晕啊 :0w223dc