?
X11R7
X11R7其實(shí)就是目前Ubuntu使用的X Server,它于2005年12月被釋出,與之前的X11R6.9其實(shí)具有相同的源代碼(Source Code)。不過X11R7的模塊化設(shè)計(jì),可提高開發(fā)時(shí)的容易度。
X11R 重要目錄
與X11R7有關(guān)的軟件,大多放在/usr及其子目錄中。以下是較為重要的目錄的說明:
/usr/bin:存放X Server和不同的X Clients。
/usr/include:開發(fā)X Client和圖形所需的文件路徑。
/usr/lib:X Server和X Clients所需的函數(shù)庫目錄。
/usr/lib/X11:保存多項(xiàng)資源,如字體和文件等。
/usr/lib/xorg/modules:包含驅(qū)動(dòng)程序與多種X Server模塊。
/usr/X11/man:保存X11程序編寫時(shí)的手冊說明頁。
/etc/X11/xorg.conf 文件
在安裝時(shí)如果沒有設(shè)置X Window系統(tǒng),之后必須先行設(shè)置鼠標(biāo)、鍵盤、顯示器以及顯示卡等,這樣才能成功啟用X Window系統(tǒng),而這些設(shè)置都記錄在/etc/X11/xorg.conf文件中。這個(gè)文件的重要性可見一斑。
這個(gè)文件由數(shù)個(gè)Section/EndSection的區(qū)塊組成,而每個(gè)區(qū)塊的格式如下:
Section "Section名稱"
選項(xiàng)名稱???? "選項(xiàng)值"
選項(xiàng)名稱???? "選項(xiàng)值"
選項(xiàng)名稱???? "選項(xiàng)值"
…
EndSection
下面將說明/etc/X11/xorg.conf文件中使用的Section類型及每個(gè)類型可用的選項(xiàng)名稱和選項(xiàng)值。
ServerLayout
“ServerLayout”Section主要用于建立X Server啟動(dòng)時(shí)的外觀,如果文件中包含多個(gè)ServerLayout Section,則默認(rèn)會(huì)使用第一個(gè)ServerLayout Section的設(shè)置。
以下是此區(qū)塊的系統(tǒng)默認(rèn)值,以及可供使用的選項(xiàng)說明:
Section "ServerLayout"
??????? Identifier??????????????????? "Default Layout"
??????? Screen??????????????????????? "Default Screen"
??????? InputDevice??????????????? "Generic Keyboard"
??????? InputDevice??????????????? "Configured Mouse"
??????? InputDevice??????????????? "stylus" "SendCoreEvents"
??????? InputDevice??????????????? "cursor" "SendCoreEvents"
??????? InputDevice??????????????? "eraser" "SendCoreEvents"
EndSection
Identifier:此ServerLayout Section的惟一名稱。
Screen:“Screen”Section指定的名稱,此名稱左側(cè)的數(shù)字表示在Multi-head環(huán)境下的屏幕數(shù)量,如果使用標(biāo)準(zhǔn)的Single-head顯示卡,則此值為0。在此名稱右側(cè)的數(shù)字分別代表屏幕左上角的X與Y絕對坐標(biāo),默認(rèn)值為“0 0”。
InputDevice:在X Server中的“InputDevice”Section名稱。通常在此僅有兩行設(shè)置,即Mouse0和Keyboard0,也就是系統(tǒng)中的第一個(gè)鼠標(biāo)和鍵盤,而其他的設(shè)備大多可以忽略。
Files
“Files”Section用于設(shè)置X Server服務(wù)的路徑,如字體和顏色。以下是此區(qū)塊的系統(tǒng)默認(rèn)值,以及可供使用的選項(xiàng)說明:
Section "Files"
??????? FontPath???????? "/usr/share/X11/fonts/misc"
??????? FontPath???????? "/usr/share/X11/fonts/cyrillic"
??????? FontPath???????? "/usr/share/X11/fonts/100dpi/:unscaled"
??????? FontPath???????? "/usr/share/X11/fonts/75dpi/:unscaled"
??????? FontPath???????? "/usr/share/X11/fonts/Type1"
??????? FontPath???????? "/usr/share/X11/fonts/100dpi"
??????? FontPath???????? "/usr/share/X11/fonts/75dpi"
??????? FontPath???????? "/usr/share/fonts/X11/misc"
??????? # path to defoma fonts
??????? FontPath???????? "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
RgbPath:RGB數(shù)據(jù)庫的路徑。這個(gè)文件定義在X中所有有效顏色的名稱,并且指定數(shù)值。
FontPath:設(shè)置X Server尋找字體時(shí)的路徑。可以同時(shí)使用多個(gè)路徑,但需用逗號(hào)隔開。
Module
“Module”Section主要用來告訴X Server應(yīng)加載哪些模塊。這些模塊可以提供額外的服務(wù)功能,一般并不需要更改此處的值。此處使用的惟一選項(xiàng)為“Load”,它可用來加載模塊。以下是此區(qū)塊的系統(tǒng)默認(rèn)值:
Section "Module"
??????? Load??? "i2c"
??????? Load??? "bitmap"
??????? Load??? "ddc"
??????? Load??? "dri"
??????? Load??? "extmod"
??????? Load??? "freetype"
??????? Load??? "glx"
??????? Load??? "int10"
??????? Load??? "type1"
??????? Load??? "vbe"
EndSection
InputDevice
“InputDevice”Section用于設(shè)置鼠標(biāo)或鍵盤等輸入設(shè)備,以便通過X Server提供信息給Linux系統(tǒng),多數(shù)系統(tǒng)至少都存在兩個(gè)InputDevice Section(鼠標(biāo)和鍵盤)。
以下是此區(qū)塊的系統(tǒng)默認(rèn)值,以及可供使用的選項(xiàng)說明:
Section "InputDevice"
??????? Identifier???????? "Generic Keyboard"
??????? Driver??????????????????????? "kbd"
??????? Option??????????? "CoreKeyboard"
??????? Option??????????? "XkbRules"???? "xorg"
??????? Option??????????? "XkbModel"??? "pc105"
??????? Option??????????? "XkbLayout"??? "us"
??????? Option??????????? "XkbOptions" "lv3:ralt_switch"
EndSection
Section "InputDevice"
??????? Identifier???????? "Configured Mouse"
??????? Driver??????????????????????? "mouse"
??????? Option??????????? "CorePointer"
??????? Option??????????? "Device"??????????????????? "/dev/input/mice"
??????? Option??????????? "Protocol"????????????????? "ExplorerPS/2"
??????? Option??????????? "ZAxisMapping"??????????????????? "4 5"
??????? Option??????????? "Emulate3Buttons"????? "true"
EndSection
Section "InputDevice"
??? Driver??????? "wacom"
??? Identifier??? "stylus"
??? Option??????? "Device"??????? "/dev/wacom"??? # Change to
????????????????????????????????????????????????? # /dev/input/event
???????????????????????????????????????????????? # for USB
??? Option??????? "Type"????????? "stylus"
??? Option??????? "ForceDevice"?? "ISDV4"???????? # Tablet PC ONLY
EndSection
Section "InputDevice"
??? Driver??????? "wacom"
??? Identifier??? "eraser"
??? Option??????? "Device"??????? "/dev/wacom"??? # Change to
??????????????????????????????????????????????? # /dev/input/event
??????????????????????????????????????????????? # for USB
??? Option??????? "Type"????????? "eraser"
??? Option??????? "ForceDevice"?? "ISDV4"??????? # Tablet PC ONLY
EndSection
Section "InputDevice"
??? Driver??????? "wacom"
??? Identifier??? "cursor"
??? Option??????? "Device"??????? "/dev/wacom"??? # Change to
????????????????????????????????????????????????? # /dev/input/event
???????????????????????????????????????????????? # for USB
??? Option??????? "Type"????????? "cursor"
??? Option??????? "ForceDevice"?? "ISDV4"???????? # Tablet PC ONLY
EndSection
Identifier:設(shè)置設(shè)備的名稱。通常這些名稱后面都會(huì)加上一個(gè)數(shù)字,第一個(gè)設(shè)備的數(shù)字為0。例如,第一個(gè)鍵盤的Identifier為Keyboard0。
Driver:告訴X Server應(yīng)該從哪里加載驅(qū)動(dòng)程序。
在大多數(shù)的InputDevice Section中,尚有為數(shù)不等以“Option”為首的選項(xiàng),并且包含特定的選項(xiàng)值。如果要啟用這些選項(xiàng)功能,只要將每行開頭的注釋符號(hào)“#”去除即可。
Monitor
“Monitor”Section用于設(shè)置系統(tǒng)使用的顯示器類型,設(shè)置此處選項(xiàng)時(shí)應(yīng)特別留意,因?yàn)椴贿m當(dāng)?shù)脑O(shè)置可能會(huì)給顯示器造成損害。
以下是此區(qū)塊的系統(tǒng)默認(rèn)值,以及可供使用的選項(xiàng)說明:
Section "Monitor"
?? Identifier??? "Generic Monitor"
?? Option??????????????????????????? "DPMS"
?? HorizSync???????????? 28-51
?? VertRefresh????????????????????? 43-60
EndSection
Identifier:顯示器的惟一名稱。在這些名稱后面都會(huì)加上一個(gè)數(shù)字,而第一個(gè)顯示器的代表數(shù)字為0(Monitor0)。
HorizSync:與顯示器兼容的水平刷新頻率范圍,其單位為kHz。這個(gè)設(shè)置值會(huì)同時(shí)指出是否在此顯示器中使用特定的Modeline值。
VertRefresh:與顯示器兼容的垂直刷新頻率范圍,其單位為kHz。這個(gè)設(shè)置值會(huì)同時(shí)指出是否在此顯示器中使用特定的Modeline值。
Device
“Device”Section用于設(shè)置顯示卡的信息內(nèi)容,在此文件中至少需要包含一個(gè)以上的Device Section。如果系統(tǒng)中包含多張顯示卡,或一張顯示卡上有多種設(shè)置值,則可以使用多個(gè)Device Section設(shè)置。
以下是此區(qū)塊的系統(tǒng)默認(rèn)值,以及可供使用的選項(xiàng)說明:
Section "Device"
??????? Identifier??????????????????? "VMWare Inc [VMware SVGA II] PCI Display Adapter"
??????? Driver??????????????????????? "vmware"
??????? BusID??????????????????????? "PCI:0:15:0"
EndSection
Driver:用來告訴X Server應(yīng)從何處加載顯示卡的驅(qū)動(dòng)程序。
BusID:顯示卡的總線位置,這個(gè)選項(xiàng)適用于多顯示卡環(huán)境。
Screen
“Screen”Section合并了Device和Monitor的部分,以便能夠形成成對的設(shè)置內(nèi)容。在此文件中至少需要包含一個(gè)以上的Screen Section。
以下是此區(qū)塊的系統(tǒng)默認(rèn)值,以及可供使用的選項(xiàng)說明:
Section "Screen"
?? Identifier?????????? "Default Screen"
?? Device???????????????????????? "VMWare Inc [VMware SVGA II] PCI Display Adapter"
?? Monitor??????????? "Generic Monitor"
?? DefaultDepth???????????????? 24
?? SubSection????????????????? "Display"
???????? Depth???????????????????? 1
???????? Modes??????????????????? "1024×768" "800×600" "640×480"
?? EndSubSection
?? SubSection?????????????????? "Display"
???????? Depth???????????????????????? 4
???????? Modes???????????? "1024×768" "800×600" "640×480"
?? EndSubSection
?? SubSection "??????????????? Display"
???????? Depth???????????????????????? 8
???????? Modes???????????? "1024×768" "800×600" "640×480"
?? EndSubSection
?? SubSection?????????????????????? "Display"
???????? Depth???????????????????????? 15
???????? Modes???????????? "1024×768" "800×600" "640×480"
?? EndSubSection
?? SubSection?????????????????????? "Display"
???????? Depth??????????????????????? 16
???????? Modes???????????? "1024×768" "800×600" "640×480"
?? EndSubSection
?? SubSection?????????????????????? "Display"
???????? Depth???????????????????????? 24
???????? Modes???????????? "1024×768" "800×600" "640×480"
?? EndSubSection
EndSection
Identifier:定義一個(gè)“Screen”名稱,以便在“ServerLayout”Section中進(jìn)行參照。
Monitor:指定“Monitor”Section中的名稱。
DefaultDepth:默認(rèn)的色深(Color Depth)位數(shù)。
DRI
Direct Rendering Infrastructure(DRI)是一種接口,它讓3D軟件可以使用新型顯示設(shè)備的3D硬件加速功能。除此之外,DRI也能改善2D硬件加速的性能。但通常并不使用這個(gè)選項(xiàng)功能,除非在“Module”Section中打開DRI設(shè)置。以下是此區(qū)塊的系統(tǒng)默認(rèn)值:
Section "DRI"
?? Mode???? 0666
EndSection
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
