Linux系统中xorg.conf文件详细介绍

先看一个完整的xorg.conf文件,如下:


代码如下:

# /.../
# SaX generated X11 config file
# Created on: 2009-05-31T19:02:32+0800.
#
# Version: 8.1
# Contact: Marcus Schaefer <sax@suse.de>, 2005
# Contact: SaX-User list <https://lists.berlios.de/mailman/listinfo/sax-users>
#
# Automatically generated by [ISaX] (8.1)
# PLEASE DO NOT EDIT THIS FILE!
#
Section "Files"
  FontPath     "/usr/share/fonts/misc:unscaled"
  FontPath     "/usr/share/fonts/local"
  FontPath     "/usr/share/fonts/75dpi:unscaled"
  FontPath     "/usr/share/fonts/100dpi:unscaled"
  FontPath     "/usr/share/fonts/Type1"
  FontPath     "/usr/share/fonts/URW"
  FontPath     "/usr/share/fonts/Speedo"
  FontPath     "/usr/share/fonts/PEX"
  FontPath     "/usr/share/fonts/cyrillic"
  FontPath     "/usr/share/fonts/latin2/misc:unscaled"
  FontPath     "/usr/share/fonts/latin2/75dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/100dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/Type1"
  FontPath     "/usr/share/fonts/latin7/75dpi:unscaled"
  FontPath     "/usr/share/fonts/baekmuk:unscaled"
  FontPath     "/usr/share/fonts/japanese:unscaled"
  FontPath     "/usr/share/fonts/kwintv"
  FontPath     "/usr/share/fonts/truetype"
  FontPath     "/usr/share/fonts/uni:unscaled"
  FontPath     "/usr/share/fonts/CID"
  FontPath     "/usr/share/fonts/ucs/misc:unscaled"
  FontPath     "/usr/share/fonts/ucs/75dpi:unscaled"
  FontPath     "/usr/share/fonts/ucs/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/misc:unscaled"
  FontPath     "/usr/share/fonts/hellas/75dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/Type1"
  FontPath     "/usr/share/fonts/misc/sgi:unscaled"
  FontPath     "/usr/share/fonts/xtest"
  FontPath     "/opt/kde3/share/fonts"
  FontPath     "unix/:7100"
  InputDevices "/dev/gpmdata"
  InputDevices "/dev/input/mice"
EndSection
Section "ServerFlags"
  Option       "AllowMouseOpenFail" "on"
EndSection
Section "Module"
  Load         "extmod"
  Load         "type1"
  Load         "glx"
  Load         "freetype"
  Load         "dbe"
  Load         "v4l"
EndSection
Section "InputDevice"
  Driver       "kbd"
  Identifier   "Keyboard[0]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "us"
  Option       "XkbModel" "pc104"
  Option       "XkbRules" "xfree86"
EndSection
Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[1]"
  Option       "Buttons" "5"
  Option       "Device" "/dev/input/mice"
  Option       "Name" "ImPS/2 Generic Wheel Mouse"
  Option       "Protocol" "explorerps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
  DisplaySize  305 230
  HorizSync    29-35
  Identifier   "Monitor[0]"
  ModelName    "800X600@56HZ"
  VendorName   "--> VESA"
  VertRefresh  50-60
  UseModes     "Modes[0]"
EndSection
Section "Modes"
  Identifier   "Modes[0]"
  Modeline  "800x600" 35.55 800 832 912 1024 600 601 604 620
  Modeline  "768x576" 33.74 768 792 872 976 576 577 580 596
  Modeline  "640x480" 23.86 640 656 720 800 480 481 484 497
EndSection
Section "Screen"
  DefaultDepth 16
  SubSection "Display"
    Depth      15
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      16
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      24
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      8
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  Device       "Device[0]"
  Identifier   "Screen[0]"
  Monitor      "Monitor[0]"
EndSection
Section "Device"
  BoardName    "VMWARE0405"
  BusID        "0:15:0"
  Driver       "vmware"
  Identifier   "Device[0]"
  Screen       0
  VendorName   "VMWare Inc"
EndSection
Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[1]" "CorePointer"
  Option       "Clone" "off"
  Option       "Xinerama" "off"
  Screen       "Screen[0]"
EndSection
Section "DRI"
    Group      "video"
    Mode       0660
EndSection
Section "Extensions"
EndSection

通过上述代码会发现xorg.conf文件由
Section "xxxx"
.........
EndSection

对组成.下面我们主要解释一下每个节点的含义。

一、输入设备--键盘


代码如下:

Section "InputDevice"
  Driver       "kbd"
  Identifier   "Keyboard[0]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "us"
  Option       "XkbModel" "pc104"
  Option       "XkbRules" "xfree86"
EndSection

二、输入设备--鼠标


代码如下:

Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[1]"
  Option       "Buttons" "5"
  Option       "Device" "/dev/input/mice"
  Option       "Name" "ImPS/2 Generic Wheel Mouse"
  Option       "Protocol" "explorerps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection

三、显示器


代码如下:

Section "Monitor"
  DisplaySize  305 230
  HorizSync    29-35
  Identifier   "Monitor[0]"
  ModelName    "800X600@56HZ"
  VendorName   "--> VESA"
  VertRefresh  50-60
  UseModes     "Modes[0]"
EndSection

其中,
Identifier:显示器的惟一名称。在这些名称后面都会加上一个数字,而第一个显示器的代表数字为0(Monitor[0])。

VendorName:显示器制造商名称。

ModelName:显示器类型名称。

HorizSync:与显示器兼容的水平刷新频率范围,其单位为kHz。这个设置值会同时指出是否在此显示器中使用特定的Modeline值。

四、显卡


代码如下:

Section "Device"
  BoardName    "VMWARE0405"
  BusID        "0:15:0"
  Driver       "vmware"
  Identifier   "Device[0]"
  Screen       0
  VendorName   "VMWare Inc"
EndSection

五、Screen
一个显示器和一个显卡组成一个screen,用Section "Screen"描述,如:


代码如下:

Section "Screen"
  DefaultDepth 16
  SubSection "Display"
    Depth      15
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      16
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      24
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      8
    Modes      "800x600" "768x576" "640x480"
  EndSubSection
  Device       "Device[0]"
  Identifier   "Screen[0]"
  Monitor      "Monitor[0]"
EndSection

其中
 Identifier:定义一个“Screen”名称,以便在“ServerLayout”Section中进行参照。

Device:指定“Device”Section中的名称。

Monitor:指定“Monitor”Section中的名称。

DefaultDepth:默认的色深(Color Depth)位数。

Modes "800x600" "768x576" "640x480" 表示系统会默认先按照800x600的分辨率去适配,如果适配失败,则选择768x576的分辨率继续。

六、Modes


代码如下:

Section "Modes"
  Identifier   "Modes[0]"
  Modeline      "800x600" 35.55 800 832 912 1024 600 601 604 620
  Modeline      "768x576" 33.74 768 792 872 976 576 577 580 596
  Modeline      "640x480" 23.86 640 656 720 800 480 481 484 497
EndSection

和screen章节中的Modes对应。

七、ServerLayout


代码如下:

Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[1]" "CorePointer"
  Option       "Clone" "off"
  Option       "Xinerama" "off"
  Screen       "Screen[0]"
EndSection

ServerLayout”Section主要用于建立X Server启动时的外观,其中:

Identifier:此ServerLayout Section的惟一名称。

Screen:“Screen”Section指定的名称

InputDevice:在X Server中的“InputDevice”Section名称。通常在此仅有两行设置,即Mouse[0]和Keyboard[0],也就是系统中的第一个鼠标和键盘,而其他的设备大多可以忽略。

(0)

相关推荐

  • linux系统下实现mysql热备份详细步骤(mysql主从复制)

    主从的作用: 1.可以当做一种备份方式 2.用来实现读写分离,缓解一个数据库的压力 MySQL主从备份原理: Mysql的主从复制至少是需要两个Mysql的服务,当然Mysql的服务是可以分布在不同的服务器上,也可以在一台服务器上启动多个服务. 如果想配置成为同一台上的话,注意安装的时候,选择两个不同的prefix=路径,同时开启服务器的时候,端口不能相同. (1)首先确保主从服务器上的Mysql版本相同(做主从服务器的原则是,MYSQL版本要相同,如果不能满足,最起码从服务器的MYSQL的版本

  • linux系统获取硬盘使用信息

    1.df命令 Linux下可以用df命令获取硬盘的使用情况,通过man可以获取df命令的详细情况.df命令经常用的参数为: a:显示全部的档案系统和各分割区的磁盘使用情形 i:显示i -nodes的使用量 k:大小用k来表示 (默认值) t:显示某一个档案系统的所有分割区磁盘使用量 x:显示不是某一个档案系统的所有分割区磁盘使用量 T:显示每个分割区所属的档案系统名称 常用命令:df -hi 举例截图如下所示 2.du命令 du命令用来查询档案或目录的磁盘使用空间,通过man获取du命令的详细介

  • CentOS(Linux)下的apache服务器配置与管理方法分享

    一.WEB服务器与Apache 1.web服务器与网址 2.Apache的历史 3.补充 http://www.netcraft.com/可以查看apache服务器的市场占有率 同时必须注意的是ngnix,正处于强势增长的上升时期,大有和apache一争天下的感觉,真是后生可畏~~~ 二.Apache服务器的管理命令 1.命令启动:service httpd start/stop/restart/reload/condrestart/status/configtest/graceful/help

  • 使用python获取CPU和内存信息的思路与实现(linux系统)

    大家都知道,linux里一切皆为文件,在linux/unix的根目录下,有个/proc目录,这个/proc 是一种内核和内核模块用来向进程(process)发送信息的机制(所以叫做"/proc"),这个伪文件系统允许与内核内部数据结构交互,获取有关进程的有用信息,在运行中(on the fly)改变设置(通过改变内核参数).与其他文件系统不同,/proc 存在于内存而不是硬盘中.proc 文件系统提供的信息如下: •进程信息:系统中的任何一个进程,在 proc 的子目录中都有一个同名的

  • 浅析linux下apache服务器的配置和管理

    一.两个重要目录:Apache有两个重要的目录:1.配置目录/etc/httpd/conf:2.文档目录/var/www: 二.两种配置模式:Apache在Fedora下的两种配置方式:文本模式(终端命令行)和图形化配置.两者各有优势:图形化下配置,更容易上手,在文本模式下直接编辑httpd.conf文件,自由性更强些.更直接. 三.Apache服务的启动与关闭Apache服务的停止.启动.关闭可以通过两种模式下进行操作:文本(终端)模式下和图形化界面. 四.终端下的操作如果你想用Linux作为

  • linux系统终端修改字体的方法

    1.通过console-tools设置控制台字体 1.1.选用并测试合适的字体和字库文件: 复制代码 代码如下: # ls /usr/share/consolefonts/ 1.2.测试选用喜爱的字库文件: 复制代码 代码如下: # consolechars -f /usr/share/consolefonts/lat9w-16.psf.gz # consolechars -f /usr/share/consolefonts/lat2-16.psf.gz 1.3.保存控制台默认字体配置: 复制代

  • apache服务器全局配置详解(全)

    Apache服务器全局配置之服务器标识配置篇 服务器标识相关指令:ServerNameServerAdminServerSignatureServerTokensUseCanonicalNameUseCanonicalPhysicalPort ServerAdmin和ServerTokens指令控制有关服务器的哪些信息将出现在服务器生成的文档中(如错误消息).ServerTokens指令设置服务器HTTP响应头字段的值.ServerName.UseCanonicalName. UseCanoni

  • linux系统单网卡绑定双IP的具体操作方法

    1. 进入目录:cd /etc/sysconfig/network-scripts/ 2. 使用vi命令编辑ifcfg-eth0,如下:# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]DEVICE=eth0BOOTPROTO=staticBROADCAST=192.168.0.255HWADDR=00:0C:29:25:96:A3#第1个IPIPADDR=192.168.0.2NETMASK=255.255.255.0NETWORK=19

  • LAMP服务器性能优化技巧之Apache服务器优化

    1.Zend Performance Suite简介 对于Apache要把 PHP 编译其中,或者采用 DSO (动态共享对象)模式,不要采用 CGI 方式.采用DSO最重要的原因是效率.Apache是模块化设计的,所以它可以加载各种各样的服务器端脚本解释器来支持动态的网页.但是随着页面访问量的增大,CGI已经不看重负,为了提高效率.所以选择把最常调用的模块编译成动态共享对象(DSO).zend出品的ZendPerformanceSuite,这是一个Apache服务器的性能测试和优化的工具.可以

  • shell监控linux系统进程创建脚本分享

    复制代码 代码如下: #!/bin/shwhile truedo ps ax -o command | sort | uniq > 1.txt usleep 100000 ps ax -o command | sort | uniq > 2.txt diff  1.txt 2.txt | grep '^\+[^\+]' | while read a do  a=`echo ${a#*+}`  if [[ "$a" != "uniq" ]] &&a

  • linux系统使用python监控apache服务器进程脚本分享

    crtrl.py监控Apache服务器进程的Python 脚本 复制代码 代码如下: !/usr/bin/env Python import os, sys, time while True: time.sleep(4) try: ret = os.popen('ps -C apache -o pid,cmd').readlines() if len(ret) < 2: print "apache 进程异常退出, 4 秒后重新启动" time.sleep(3) os.system

  • Apache服务器无法使用的解决方法

    原因一:80端口占用例如IIS,另外就是迅雷.我的apache服务器就是被迅雷害得无法启用! 原因二:软件冲突装了某些软件会使apache无法启动如Dr.com 你打开网络连接->TcpIp属性->高级->WINS标签把netbios的lmhosts对勾去掉,禁用tcp/ip的netbios. 然后再启动应该就可以了. 原因三:httpd.conf配置错误如果apache的配置文件httpd.conf搞错了,在windows里启动它,会提示the requested operation

随机推荐