选择显示字体大小

xf86config文件导读

提到 x 自然就不能不提到 xf86config 这个档案。xfree86 就是利用 xf86config 来作一些 x 的初始设定。在你看完这篇文章时,你或许或感到无助,因为这麽大一篇设定档 打到完不就挂了,还谈什麽设定。其实你不用担心,因为在 x 中已经提供了几个相当不错的x 设定程式给你使用了,其中最基本的就是xf86config 这个档,在redhat中附了 xconfigurator 也不错,而最新的就是 xf86setup,提供了图形的介面,更酷,更方便 ,更好用,这些後面我会再介绍。当始启动 x 时,它会在下列的路径中寻找这个档案:

/etc/xf86config
xroot/lib/x11/xf86config.hostname
xroot/lib/x11/xf86config

xroot表示x11的路径.

xf86config是经由许多区段所组成的。每个区段都有一个固定格式如下:

section "sectionname"
sectionentry
...
endsection

而 section names 可为:

files (file pathnames)
serverflags (server flags)
keyboard (keyboard configuration)
pointer (pointer configuration)
monitor (monitor description)
device (graphics device description)
screen (screen configuration)

其中档案区段(file section)是用来指定内定的字形路径和 rgb 资料路径。当然这些路 径也是可由命令列的方式设定。至於entry的设定如下:

fontpath "path"

fontpath可以是多个的,分别列在不同行中。x11r6 也允许 x 从 font server 下
设定字形,如 fontpath "/usr/x11r6/lib/x11/fonts/misc/,tcp/zok:7100" 就是用来告知 x server 在本端的 /usr/x11r6/lib/x11/fonts/misc 路径中,tcp/zok 这个主 机,port 为 7100 的地方找字形

rgbpath "path"

设定 rgb色彩资料库的路径.





serverflags section 中, 可以设定一些x server的杂项.如下:

notrapsignals
这个可以防止x server因为不当的错误而自动离开。相对的, 它会结束 x ,然後在发生错误的地方产生core这个档. 一般来说, 除非是x 的除错人员, 否则我们 是用不到这个选项的.

dontzap
这个选项可以取消经由 ctrl+alt+backspace 离开x 的功能.
dontzoom
我们可利用ctrl+alt+keypad-plus和ctrl+alt+keypad-minus来调整x 的解析度, 开启dontzoom选项後就会取消这个功能. keyboard section 当然就是用来设定一些keyboard的设定了.

protocol "kbd-protocol"
kbd-protocol可以是standard 或 xqueue.

autorepeat delay rate
更改keyboard 重覆的速度. 但并非所有的平都可以使用.

servernumlock
让x server控制 numlock键. 如此可使应用程式使用number pad.

leftalt mapping
rightalt mapping
altgr mapping
scrolllock mapping
rightctl mapping
允许内定值设定到上列的key中.mapping 的值可为:
meta
compose
modeshift
modelock
scrolllock
control

xleds led
允许client ap应用这3 个led 键(scroll lock, caps lock & num lock). led的值为1 至3 .

vtsysreq
可以让非sysv但支援vt switching的系统使用sysv-style vt switch
sequence.





pointer section 用来指定游标的装置和参数.

protocol "protocol-type"
指定游标装置的协定, protocol-type 如下:
busmouse
logitech
microsoft
mmseries
mouseman
mousesystems
ps/2
mmhittab
xqueue
osmouse

device "pointer-dev"
设定x server应用那个装置(如/dev/tty00 或 /dev/mouse), 但若是用
xqueue 或 osmouse则不须指定.

baudrate rate
设定序列滑鼠的鲍率. 有些mouse可以自行设定速率, 其它的则是经由 电脑来设定.内定值是1200.

emulate3buttons
可以让两键的mouse模拟三键的mouse. 模拟的方式是利用同时按下两个键.

emulate3timeout timeout
模拟三键时, server等待两键同时按下的时间. 内定值是 50ms
(milliseconds).

chordmiddle
当middle键按下时, 送出left+right的事件.

samplerate rate
cleardtr
clearrts
这三个entry只适用在某些mouse中(logitech和mousesystem).





monitor sections 用来定义显示器的规格和它可使用的模式. 在xf86config中可以有多 个monitor-section存在.

identifier "id string"
指定这个显示器的名称. 每个monitor section只能有一个唯一的显示器名称.

vendorname "vendor"
设定显示器制造公司名称.

modelname "model"
显示器的model.

horizsync horizsync-range
显示器的水平扫描□围.其值可用逗号分开, 如果是□围则可用减号相 连.单位是khz.

vertrefresh vertrefresh-range
显示器的垂直覆新值. 其值可用逗号分开, 如果是□围则可用减号相连.单位是khz.

gamma gamma-value(s)
gamma的颜色调整值. 可以为单一值或是三个分开的 rgb值. 但并非所
有的x server
都可以使用这个功能.

mode "name"
video mode设定的启始, endmode为其结束. 其中的内容如下:
dotclock clock
htimings hdisp hsyncstart hsyncend htotal
vtimings vdisp vsyncstart vsyncend vtotal
flags "flag" ...
flag的选项有 :
"interlace" : 显示器是交错式的
"doublescan": 双重扫描式的
"+hsync"和"-hsync": 调整hsync信号
"+vsync"和"-vsync": 调整vsync信号
"composite" : 指定显示器所提供的composite sync
"+sync"和"-vsync": 调整vsync信号
modeline "name" mode-description
可以将上述功能合并在一行.



device sections 可以设定图形装置(显示卡). 在xf86config中可以有多个 device
section.
identifier "id string"
设定名称, 以便screen section中可以辩认.每个device section中只能有一个名称.

vendorname "vendor"
显示卡制造商的名称

boardname "model"
显示卡型号

chipset "chipset-type"
指定显示卡的chipset. 但通通是不用我们去设定的, 因为
x server会自动侦测.

ramdac "ramdac-type"
指定ramdac, 但和上一个理由一样, 通通我们也是不用去设
定它.

dacspeed speed
除非要指定的速率和ramdac上印的不一, 否则也是不用理它.

clocks clock ...
设定显示卡的clock. 建议一定要设.

videoram mem
显示卡的记忆体大小. x 会自动去侦测.

screen sections用於设定x server所使用的显示卡和显示器.
driver "driver-name"
每个screen section必须由driver entry开始, driver-name也必须是唯一的.driver-name如下:
accel
mono
svga
vga2
vga16

accel是用於加速卡.mono单色. vga2和vga16分别是使用2 bits和4bits颜色.
device "device-id"
使用的device
monitor "monitor-id"
使用的monitor
screenno scrnum
screen的number.
blanktime time
萤幕保护. time分钟不动後萤幕就不显示.内定10分钟.
suspendtime time
省电时间. time分钟不动後萤幕进入省电模式.内定15分钟.
offtime time
停电时间. time分钟不动後萤幕进入停电模式.内定30分钟.
subsection "display"
设定色彩bit数, 虚拟萤幕大小, 解析度,和其它.

# file generated by xf86config.
# 我的xf86config档
#
# copyright (c) 1994 by the xfree86 project, inc.
#
#
# **********************************************************************
# refer to the xf86config(4/5) man page for details about the format of
# this file.---------------- 这是重点.
# **********************************************************************
# files section. 在此设定rgb档和字形的路径
# **********************************************************************
section "files"
# 在这特别提到你不用加上附档名, 因为内定值它会自行辨认
rgbpath "/usr/x11r6/lib/x11/rgb"
# 接著加上字形路径
fontpath "/usr/x11r6/lib/x11/fonts/misc/"
fontpath "/usr/x11r6/lib/x11/fonts/type1/"
fontpath "/usr/x11r6/lib/x11/fonts/speedo/"
fontpath "/usr/x11r6/lib/x11/fonts/75dpi/"
fontpath "/usr/x11r6/lib/x11/fonts/100dpi/"
fontpath "/usr/x11r6/lib/x11/fonts/chinese/" ------> 如果你有使用
xcin+crxvt或
cxwin的话, 中
文字形都摆在
此, 当然别忘
了自己加上这
个路径, 否则
是无法执行的
endsection

# **********************************************************************
# server flags section. 可以在此设定一些 x server的参数(期标)
# **********************************************************************

section "serverflags"

# server 不当离开时, 自动产生core
# notrapsignals

# 可以将ctrl+alt+bs退出 server 的功能取消
# dontzap
# 可将ctrl+alt++ or +- 更换解析度的功能取消
# dontzoom
endsection

# **********************************************************************
# keyboard section
# **********************************************************************

section "keyboard"

protocol "standard"

# 如果是用xqueue的方式就可以将上一行comment掉, 保留下一行, 否则则comment掉下一行, 保留上一行

# protocol "xqueue"
# 设定keyboard的重覆速度
autorepeat 500 5
# servernumlock

# 指定那几个led 可以让client 自行控制
# xleds 1 2 3

# 设定下列键
# leftalt meta
# rightalt modeshift
# rightctl compose
# scrolllock modelock
endsection

# **********************************************************************
# pointer section. 设定滑鼠
# **********************************************************************

section "pointer"
protocol "microsoft"
device "/dev/mouse"

# 如果是用xqueue的方式就可以将上一行comment掉, 保留下一行, 否则则comment掉下一行, 保留上一行
# protocol "xqueue"
# 对某些特定的logitech滑鼠的鲍率

# baudrate 9600
# samplerate 150

# 给两键mouse模拟三键mouse
# 模拟三键时两键同时按下的时间

emulate3buttons
emulate3timeout 50

# 给一些logitech三键mouse用的
# chordmiddle
endsection

# **********************************************************************
# monitor section 显示器的设定
# **********************************************************************

section "monitor"

identifier "generic multisync"
vendorname "unknown"
modelname "unknown"

# horizsync 的单位是 khz
# 请自行更改设定值
horizsync 30-64

# vertrefresh 的单位是 hz
# 也请自行更改设定值
vertrefresh 50-100

# modes 可以有两种方式设定, 1.都设在同一行 2.分行设定
# 以下两种模式是相同的

# modeline "1024x768i" 45 1024 1048 1208 1264 768 776 784 817 interlace

# mode "1024x768i"
# dotclock 45
# htimings 1024 1048 1208 1264
# vtimings 768 776 784 817
# flags "interlace"
# endmode

# xf86config会自动设定一些标准的mode. 如果模式不合显示器的规格, 则x 会自动删除
# 所以你不用事先将它删除(除非有的模式会造成你的显示器无法显示)
# 在这些模式中, x 自然会找出最合适的来使用

# 640x400 @ 70 hz, 31.5 khz hsync
modeline "640x400" 25.175 640 664 760 800 400 409 411 450
# 640x480 @ 60 hz, 31.5 khz hsync
modeline "640x480" 25.175 640 664 760 800 480 491 493 525
# 800x600 @ 56 hz, 35.15 khz hsync
modeline "800x600" 36 800 824 896 1024 600 601 603 625
# 1024x768 @ 87 hz interlaced, 35.5 khz hsync
modeline "1024x768" 44.9 1024 1048 1208 1264 768 776 784 817 interlace

# 640x480 @ 72 hz, 36.5 khz hsync
modeline "640x480" 31.5 640 680 720 864 480 488 491 521
# 800x600 @ 60 hz, 37.8 khz hsync
modeline "800x600" 40 800 840 968 1056 600 601 605 628 +hsync +vsync

# 800x600 @ 72 hz, 48.0 khz hsync
modeline "800x600" 50 800 856 976 1040 600 637 643 666 +hsync +vsync
# 1024x768 @ 60 hz, 48.4 khz hsync
modeline "1024x768" 65 1024 1032 1176 1344 768 771 777 806 -hsync -vsync

# 1024x768 @ 70 hz, 56.5 khz hsync
modeline "1024x768" 75 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
# 1280x1024 @ 87 hz interlaced, 51 khz hsync
modeline "1280x1024" 80 1280 1296 1512 1568 1024 1025 1037 1165 interlace

# 1024x768 @ 76 hz, 62.5 khz hsync
modeline "1024x768" 85 1024 1032 1152 1360 768 784 787 823
# 1280x1024 @ 61 hz, 64.2 khz hsync
modeline "1280x1024" 110 1280 1328 1512 1712 1024 1025 1028 1054

# 1280x1024 @ 74 hz, 78.85 khz hsync
modeline "1280x1024" 135 1280 1312 1456 1712 1024 1027 1030 1064

# 1280x1024 @ 76 hz, 81.13 khz hsync
modeline "1280x1024" 135 1280 1312 1416 1664 1024 1027 1030 1064

# low-res doublescan modes
# if your chipset does not support doublescan, you get a 'squashed'
# resolution like 320x400.

# 320x200 @ 70 hz, 31.5 khz hsync, 8:5 aspect ratio
modeline "320x200" 12.588 320 336 384 400 200 204 205 225 doublescan
# 320x240 @ 60 hz, 31.5 khz hsync, 4:3 aspect ratio
modeline "320x240" 12.588 320 336 384 400 240 245 246 262 doublescan
# 320x240 @ 72 hz, 36.5 khz hsync
modeline "320x240" 15.750 320 336 384 400 240 244 246 262 doublescan
# 400x300 @ 56 hz, 35.2 khz hsync, 4:3 aspect ratio
modeline "400x300" 18 400 416 448 512 300 301 602 312 doublescan
# 400x300 @ 60 hz, 37.8 khz hsync
modeline "400x300" 20 400 416 480 528 300 301 303 314 doublescan
# 400x300 @ 72 hz, 48.0 khz hsync
modeline "400x300" 25 400 424 488 520 300 319 322 333 doublescan
# 480x300 @ 56 hz, 35.2 khz hsync, 8:5 aspect ratio
modeline "480x300" 21.656 480 496 536 616 300 301 302 312 doublescan
# 480x300 @ 60 hz, 37.8 khz hsync
modeline "480x300" 23.890 480 496 576 632 300 301 303 314 doublescan
# 480x300 @ 63 hz, 39.6 khz hsync
modeline "480x300" 25 480 496 576 632 300 301 303 314 doublescan
# 480x300 @ 72 hz, 48.0 khz hsync
modeline "480x300" 29.952 480 504 584 624 300 319 322 333 doublescan

endsection

# **********************************************************************
# graphics device section. 显示卡设定
# **********************************************************************

# standard vga device: 标准的vga设定

section "device"
identifier "generic vga"
vendorname "unknown"
boardname "unknown"
chipset "generic"

# videoram 256

# clocks 25.2 28.3

endsection

# sample device for accelerated server: 加速卡的□例设定

# section "device"
# identifier "actix ge32+ 2mb"
# vendorname "actix"
# boardname "ge32+"
# ramdac "att20c490"
# dacspeed 110
# option "dac_8_bit"
# clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0
# clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0
# endsection

section "device"
identifier "my video card"
vendorname "unknown"
boardname "unknown"
#videoram 1024
# insert clocks lines here if appropriate
endsection


# **********************************************************************
# screen sections 萤幕设定
# **********************************************************************

# the colour svga server 对svga的设定

section "screen"
driver "svga"
device "generic vga"
#device "my video card"
monitor "generic multisync"
subsection "display"
depth 8
#modes "640x480" "800x600" "1024x768"
viewport 0 0
virtual 320 200
#virtual 1024 768
endsubsection
endsection

# the 16-color vga server 16色vga的设定

section "screen"
driver "vga16"
device "generic vga"
monitor "generic multisync"
subsection "display"
modes "640x480" "800x600"
viewport 0 0
virtual 800 600
endsubsection
endsection

# the mono server 黑白设定

section "screen"
driver "vga2"
device "generic vga"
monitor "generic multisync"
subsection "display"
modes "640x480" "800x600"
viewport 0 0
virtual 800 600
endsubsection
endsection

# the accelerated servers (s3, mach32, mach8, 8514, p9000, agx, w32, mach64) 加速卡的设定
section "screen"
driver "accel"
device "my video card"
monitor "generic multisync"
subsection "display"
depth 8
modes "800x600" "1024x768" "640x480"
viewport 0 0
virtual 1024 900
endsubsection
subsection "display"
depth 16
modes "640x480" "800x600"
viewport 0 0
virtual 800 600
endsubsection
subsection "display"
depth 32
modes "640x400"
viewport 0 0
virtual 640 400
endsubsection
endsection   


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons