?
X11R7
X11R7其實就是目前Ubuntu使用的X Server,它于2005年12月被釋出,與之前的X11R6.9其實具有相同的源代碼(Source Code)。不過X11R7的模塊化設計,可提高開發時的容易度。
X11R 重要目錄
與X11R7有關的軟件,大多放在/usr及其子目錄中。以下是較為重要的目錄的說明:
/usr/bin:存放X Server和不同的X Clients。
/usr/include:開發X Client和圖形所需的文件路徑。
/usr/lib:X Server和X Clients所需的函數庫目錄。
/usr/lib/xorg/modules:包含驅動程序與多種X Server模塊。
/usr/X11/man:保存X11程序編寫時的手冊說明頁。
/etc/X11/xorg.conf 文件
在安裝時如果沒有設置X Window系統,之后必須先行設置鼠標、鍵盤、顯示器以及顯示卡等,這樣才能成功啟用X Window系統,而這些設置都記錄在/etc/X11/xorg.conf文件中。這個文件的重要性可見一斑。
這個文件由數個Section/EndSection的區塊組成,而每個區塊的格式如下:
Section "Section名稱"
選項名稱???? "選項值"
選項名稱???? "選項值"
選項名稱???? "選項值"
…
EndSection
下面將說明/etc/X11/xorg.conf文件中使用的Section類型及每個類型可用的選項名稱和選項值。
ServerLayout
“ServerLayout”Section主要用于建立X Server啟動時的外觀,如果文件中包含多個ServerLayout Section,則默認會使用第一個ServerLayout Section的設置。
以下是此區塊的系統默認值,以及可供使用的選項說明:
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指定的名稱,此名稱左側的數字表示在Multi-head環境下的屏幕數量,如果使用標準的Single-head顯示卡,則此值為0。在此名稱右側的數字分別代表屏幕左上角的X與Y絕對坐標,默認值為“0 0”。
InputDevice:在X Server中的“InputDevice”Section名稱。通常在此僅有兩行設置,即Mouse0和Keyboard0,也就是系統中的第一個鼠標和鍵盤,而其他的設備大多可以忽略。
Files
“Files”Section用于設置X Server服務的路徑,如字體和顏色。以下是此區塊的系統默認值,以及可供使用的選項說明:
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數據庫的路徑。這個文件定義在X中所有有效顏色的名稱,并且指定數值。
FontPath:設置X Server尋找字體時的路徑。可以同時使用多個路徑,但需用逗號隔開。
Module
“Module”Section主要用來告訴X Server應加載哪些模塊。這些模塊可以提供額外的服務功能,一般并不需要更改此處的值。此處使用的惟一選項為“Load”,它可用來加載模塊。以下是此區塊的系統默認值:
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用于設置鼠標或鍵盤等輸入設備,以便通過X Server提供信息給Linux系統,多數系統至少都存在兩個InputDevice Section(鼠標和鍵盤)。
以下是此區塊的系統默認值,以及可供使用的選項說明:
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:設置設備的名稱。通常這些名稱后面都會加上一個數字,第一個設備的數字為0。例如,第一個鍵盤的Identifier為Keyboard0。
在大多數的InputDevice Section中,尚有為數不等以“Option”為首的選項,并且包含特定的選項值。如果要啟用這些選項功能,只要將每行開頭的注釋符號“#”去除即可。
Monitor
“Monitor”Section用于設置系統使用的顯示器類型,設置此處選項時應特別留意,因為不適當的設置可能會給顯示器造成損害。
以下是此區塊的系統默認值,以及可供使用的選項說明:
Section "Monitor"
?? Identifier??? "Generic Monitor"
?? Option??????????????????????????? "DPMS"
?? HorizSync???????????? 28-51
?? VertRefresh????????????????????? 43-60
EndSection
Identifier:顯示器的惟一名稱。在這些名稱后面都會加上一個數字,而第一個顯示器的代表數字為0(Monitor0)。
HorizSync:與顯示器兼容的水平刷新頻率范圍,其單位為kHz。這個設置值會同時指出是否在此顯示器中使用特定的Modeline值。
VertRefresh:與顯示器兼容的垂直刷新頻率范圍,其單位為kHz。這個設置值會同時指出是否在此顯示器中使用特定的Modeline值。
Device
“Device”Section用于設置顯示卡的信息內容,在此文件中至少需要包含一個以上的Device Section。如果系統中包含多張顯示卡,或一張顯示卡上有多種設置值,則可以使用多個Device Section設置。
以下是此區塊的系統默認值,以及可供使用的選項說明:
Section "Device"
??????? Identifier??????????????????? "VMWare Inc [VMware SVGA II] PCI Display Adapter"
??????? Driver??????????????????????? "vmware"
??????? BusID??????????????????????? "PCI:0:15:0"
EndSection
Driver:用來告訴X Server應從何處加載顯示卡的驅動程序。
Screen
“Screen”Section合并了Device和Monitor的部分,以便能夠形成成對的設置內容。在此文件中至少需要包含一個以上的Screen Section。
以下是此區塊的系統默認值,以及可供使用的選項說明:
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:定義一個“Screen”名稱,以便在“ServerLayout”Section中進行參照。
Monitor:指定“Monitor”Section中的名稱。
DefaultDepth:默認的色深(Color Depth)位數。
DRI
Direct Rendering Infrastructure(DRI)是一種接口,它讓3D軟件可以使用新型顯示設備的3D硬件加速功能。除此之外,DRI也能改善2D硬件加速的性能。但通常并不使用這個選項功能,除非在“Module”Section中打開DRI設置。以下是此區塊的系統默認值:
Section "DRI"
?? Mode???? 0666
EndSection
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

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