LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1211|回复: 8

打造最小的X配置文件[原创]

[复制链接]
发表于 2003-12-9 18:17:03 | 显示全部楼层 |阅读模式
#打造最小的X配置文件
#(也许没有必要)

#前言:
#相信一般的用户设置X很烦恼吧?为什么我设置的分辨率和刷新率都不附和我都要求?
#我想,Linux现在已经是非常都易用了。不象以前一样我用xf86cfg一样的设置X就象是
#一场冒险一样。说实话我运气好,没有因为设置X而烧坏过一块显卡,但是我对于设置
#错的X运行起来,显示器滋滋的发响,还是心有余悸。现在的X设置就很“傻瓜”了,
#听说红旗Linux下面的X设置可以和Windows一样用鼠标了。呵呵。但是这些程序生成的
#配置文件(主要是XF86Config和XF86Config-4)非常的大,常常有没有必要的模块加入,
#影响了我的情绪。呵呵,也会影响X的启动速度的嘛~~(虽然不怎么的明显)。所以我说了
#那么多,就是想让大家知道,其实有时候自己配置一下配置文件,可以让爱机更好好的
#运行。我现在是这样做的--用xf86cfg配置好了X以后,用xvidtune调整屏幕。然后再自
#己手工的修改配置文件。这样出来的X配置文件很小,之有一个配置文件XF86Config但是
#包含了需要启动X的一切东西听着不错,下面看看我的XF86Config,也许能找到你想要的
#(由于本人的文采和技术不足,写不出大堆理论堆东西。所以我就把重要的段加了说明,
#有任何问题的,请跟贴子好了。我会帮忙解释的。
# K6 敬上

############################################################

Section        "ServerLayout"
        Identifier        "Default Layout"
        Screen                0 "Screen0" 0 0
        InputDevice        "Mouse0"        "CorePointer"
        InputDevice        "Keyboard0"        "CoreKeyboard"
EndSection

#设置系统字体的路径
Section        "Files"
        FontPath        "/usr/share/Fonts"
        FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/extra/:unscaled"
        FontPath        "/usr/X11R6/lib/X11/fonts/local/"
        FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
        FontPath        "/usr/X11R6/lib/X11/fonts/latin2/75dpi/"
        FontPath        "/usr/X11R6/lib/X11/fonts/latin2/100dpi/"
        FontPath        "/usr/X11R6/lib/X11/fonts/latin2/misc/"
        FontPath        "/usr/X11R6/lib/X11/fonts/Type1/"
        FontPath        "/usr/X11R6/lib/X11/fonts/Speedo/"
        FontPath        "/usr/X11R6/lib/X11/fonts/CID/"
        FontPath        "/usr/X11R6/lib/X11/fonts/unicode/"
EndSection

#载入系统模块,其中xtt模块是中文字体解释模块,可以汉化X
Section        "Module"
        Load                "dbe"
        Load                "extmod"
        SubSection        "extmod"
        #Option        "omit xfree86-dga"
        EndSubSection
        Load                "type1"
        #Load                "freetype"
        Load                "bitmap"
        Load                "speedo"
        Load                "pex5"
        Load                "GLcore"
        Load                "glx"
        #Load                "dri"
        Load                "xtt"
        Load                "record"
        Load                "xie"
EndSection

#下面的是设置输入设备的安装,键盘和鼠标
#上面一段是键盘的设置
#下面一段是鼠标的设置
Section        "InputDevice"
        Identifier        "Keyboard0"
        Driver                "keyboard"
        Option                "AutoRepeat"        "500 30"
        Option                "XkbRules"        "xfree86"
        Option                "XkbModel"        "pc104"
        Option                "XkbLayout"        "us"
EndSection

Section        "InputDevice"
        Identifier        "Mouse0"
        Driver                "mouse"
        Option                "rotocol"        "MouseManPlusPS/2"
        Option                "Device"        "/dev/psaux"
        Option                "Emulate3Buttons"        "yes"
        #MouseName        "Logitech - MouseMan+/FirstMouse+ (PS/2)"
        Option                "Buttons"        "5"
        Option                "ZAxisMapping"        "4 5"
EndSection

#设置显示器的频率其中Modeline是我自己加进去的。用xvidtune可以设置
Section        "Monitor"
        Identifier        "Monitor0"
        HorizSync        31.5-48.5
        VertRefresh        50-90
        Modeline "800x600"  49.50    800  836  916 1056    600  601  604  625 +hsync +vsync
EndSection

#显卡的配置,我用的是GeForce2MX,32M的显存
Section        "Device"
        Identifier        "Card0"
        Driver                "nv"
        VendorName        "NVidia"
        BoardName        "GeForce2 MX 100/200"
        BusID                "CI:1:0:0"
        VideoRam        32768
EndSection

#这个是显示模式的设置,我设置的是800x600 16bit 颜色
Section        "Screen"
        Identifier        "Screen0"
        Device                "Card0"
        Monitor                "Monitor0"
        DefaultDepth        24
        SubSection        "Display"
                Depth        8
        EndSubSection
        SubSection        "Display"
                Depth        15
        EndSubSection
        SubSection        "Display"
                Depth        16
        EndSubSection
        SubSection        "Display"
                Depth        24
                Modes        "800x600"
        EndSubSection
EndSection

Section        "DRI"
EndSection
 楼主| 发表于 2003-12-9 19:00:19 | 显示全部楼层
怎么没有人理我?
发表于 2003-12-9 19:25:39 | 显示全部楼层
Modeline "800x600" 49.50 800 836 916 1056 600 601 604 625 +hsync +vsync
这一行是什么意思呀
 楼主| 发表于 2003-12-9 21:03:29 | 显示全部楼层
最初由 gnn77 发表
Modeline "800x600" 49.50 800 836 916 1056 600 601 604 625 +hsync +vsync
这一行是什么意思呀


这个是用xvidtune测出来的,目的是调整显示器的聚焦。具体的你可以看看这个:

http://www.linuxsir.cn/forum.php ... ;highlight=xvidtune

http://www.linuxsir.cn/forum.php ... ;highlight=xvidtune

http://www.linuxsir.cn/forum.php ... ;highlight=xvidtune
发表于 2003-12-11 10:42:24 | 显示全部楼层
最初由 AMD-K6 发表
怎么没有人理我?

哥哥你整了这么一大堆怎么可能是最小的呢?
一般人1个就够了,最多2个。
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 8
EndSubSection
SubSection "Display"
Depth 15
EndSubSection
SubSection "Display"
Depth 16
EndSubSection
SubSection "Display"
Depth 24
Modes "800x600"
EndSubSection
EndSection
发表于 2003-12-11 11:13:52 | 显示全部楼层
红旗的有两个东东偶一直想用,一个就是那个网上邻居,对中文支持最好。另外一个就是显示设置的那个,跟WIN一样可以设刷新率,那位哥哥把它给移过来就好啦。
 楼主| 发表于 2003-12-11 13:39:11 | 显示全部楼层
好的,我再试试看

看能不能再小! :)
发表于 2003-12-11 14:49:03 | 显示全部楼层

自带驱动?这样够了

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
FontPath "/usr/share/Fonts"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/extra/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "glx"
Load "xtt"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "rotocol" "MouseManPlusPS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
Identifier "Monitor0"
HorizSync 31.5-48.5
VertRefresh 50-90
Modeline "800x600" 49.50 800 836 916 1056 600 601 604 625 +hsync +vsync
EndSection

Section "Device"
Identifier "Card0"
Driver "nv"
VendorName "NVidia"
BoardName "GeForce2 MX 100/200"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"
Depth 16
EndSubSection
Modes "800x600"
EndSubSection
EndSection
 楼主| 发表于 2003-12-11 18:28:52 | 显示全部楼层

回复: 自带驱动?这样够了

最初由 nbxmedia 发表
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
FontPath "/usr/share/Fonts"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/extra/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "glx"
Load "xtt"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "rotocol" "MouseManPlusPS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
Identifier "Monitor0"
HorizSync 31.5-48.5
VertRefresh 50-90
Modeline "800x600" 49.50 800 836 916 1056 600 601 604 625 +hsync +vsync
EndSection

Section "Device"
Identifier "Card0"
Driver "nv"
VendorName "NVidia"
BoardName "GeForce2 MX 100/200"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"
Depth 16
EndSubSection
Modes "800x600"
EndSubSection
EndSection


强!兄弟贴出来的内容和我的差不多,那我就不贴了。呵呵。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表