X Sever —— Xorg

 发表于 2020-03-20 分类于 系统服务 , Xorg 阅读次数:39 阅读次数:48
 本文字数: 7k 阅读时长 ≈ 6 分钟

Xorg:基于X11协议的服务端。管理硬件设备(驱动),键盘鼠标显示器等

Xorg配置文件

生成配置文件

  1. 1
  1. # Xorg -configure :2
 

:2显示窗口,在Xorg启动的情况下,无法获取当前的Xorg配置文件

xorg.conf

具体参数说明:man xorg.conf

  1. 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
  1. Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    Screen 1 "Screen1" RightOf "Screen0"
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    EndSection

    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/X11/misc"
    FontPath "/usr/share/fonts/X11/cyrillic"
    FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/Type1"
    FontPath "/usr/share/fonts/X11/100dpi"
    FontPath "/usr/share/fonts/X11/75dpi"
    FontPath "built-ins"
    EndSection

    Section "Module"
    Load "glx"
    EndSection

    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection

    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection

    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection

    Section "Monitor"
    Identifier "Monitor1"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection

    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
    ### <percent>: "<f>%"
    ### [arg]: arg optional
    #Option "Accel" # [<bool>]
    #Option "SWcursor" # [<bool>]
    #Option "EnablePageFlip" # [<bool>]
    #Option "SubPixelOrder" # [<str>]
    #Option "ZaphodHeads" # <str>
    #Option "AccelMethod" # <str>
    #Option "DRI3" # [<bool>]
    #Option "DRI" # <i>
    #Option "ShadowPrimary" # [<bool>]
    #Option "TearFree" # [<bool>]
    #Option "DeleteUnusedDP12Displays" # [<bool>]
    Identifier "Card0"
    Driver "amdgpu"
    BusID "PCI:1:0:0"
    EndSection

    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
    ### <percent>: "<f>%"
    ### [arg]: arg optional
    #Option "Accel" # [<bool>]
    #Option "SWcursor" # [<bool>]
    #Option "EnablePageFlip" # [<bool>]
    #Option "SubPixelOrder" # [<str>]
    #Option "ZaphodHeads" # <str>
    #Option "AccelMethod" # <str>
    #Option "DRI3" # [<bool>]
    #Option "DRI" # <i>
    #Option "ShadowPrimary" # [<bool>]
    #Option "TearFree" # [<bool>]
    #Option "DeleteUnusedDP12Displays" # [<bool>]
    Identifier "Card1"
    Driver "amdgpu"
    BusID "PCI:1:0:1"
    EndSection

    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection

    Section "Screen"
    Identifier "Screen1"
    Device "Card1"
    Monitor "Monitor1"
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection
 

注意:在xorg.conf中配置显卡总线地址BusID时,必须以十进制表示,比如lspci总线地址(以十六进制显示)为91:00.0,将其转换为十进制145:00:0(16x9+1)配置在xorg.conf中。

  • Driver的选择必须根据使用的显卡和系统的支持情况配置,在系统不支持的情况下可以使用modesetting代替测试,不一定配置成功

    • centos系统支持的驱动在/lib64/xorg/modules/drivers/

      1. 1
        2
      1. # ls /lib64/xorg/modules/drivers/
        ati_drv.so dummy_drv.so fbdev_drv.so modesetting_drv.so nouveau_drv.so qxl_drv.so radeon_drv.so v4l_drv.so
       
    • ubuntu系统支持的驱动在/usr/lib/xorg/modules/drivers/

      1. 1
        2
      1. ls /usr/lib/xorg/modules/drivers/
        amdgpu_drv.so ati_drv.so fbdev_drv.so intel_drv.so modesetting_drv.so nouveau_drv.so qxl_drv.so radeon_drv.so vesa_drv.so vmware_drv.so
       

参数

应用示例

  1. 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
  1. # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings: version 440.82

    Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Mouse0" "CorePointer"
    Option "Xinerama" "0"
    EndSection

    Section "Files"
    EndSection

    Section "InputDevice"
    # generated from default
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "Emulate3Buttons" "no"
    Option "ZAxisMapping" "4 5"
    EndSection

    Section "InputDevice"
    # generated from default
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection

    Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "Philips PHL 237E7"
    HorizSync 30.0 - 83.0
    VertRefresh 56.0 - 76.0
    Option "DPMS"
    EndSection

    Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "Quadro P6000"
    EndSection

    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option "Stereo" "0"
    Option "nvidiaXineramaInfoOrder" "DFP-8"
    Option "metamodes" "DP-5: nvidia-auto-select +1920+0, DP-7: nvidia-auto-select +0+0"
    Option "SLI" "Off"
    Option "MultiGPU" "Off"
    Option "BaseMosaic" "off"
    SubSection "Display"
    Depth 24
    EndSection
 

启动

  1. 1
  1. startx -- -layout seat0 -seat seat0 -novtswitch -sharevts
 

参数详解: man Xorg

  • -novtswitch: 如果操作系统支持,请禁用自动启动服务器时将X服务器重置和关机自动切换到激活的VT的功能
  • -sharevts: 如果操作系统支持,则与另一个X服务器共享虚拟终端。

参考

 

X Sever —— Xorg的更多相关文章

  1. SQL Sever无法打开链接对话框,未将对象引用设置到对象的实例。(AppIDPackage)

    前几天刚做完系统,先装的是SQL Sever2008,装完后还试了一下,OK~没问题,然后就继续装VS2012等一些软件.搞到很晚没有继续试试就睡了,第二天运行SSMS出问题了..(如图 1.0 所示 ...

  2. 3-1创建Sql Sever数据库登录名

    登录名:连接Sql Sever 服务器 数据库用户名: Sql Sever 的使用者 每个用来登录Sql Sever 的账户都是一个用户. 同一个数据库可以拥有多个用户,每一个用户也同时可以访问多个数 ...

  3. 1-03 Sql Sever 的身份验证模式

    身份验证分为: 1:Windows身份验证. 1:Sql Sever身分验证. 每种验证的具体方式: 1Windows的验证方式 点击下拉框,有这两种验证方式,Windows验证只需要启动服务即可. ...

  4. 1-02 启动和停止Sql Sever的服务

    启动Sql  Sever服务的三种方式 1:后台启动服务. 2:Sql Sever配置管理员启动服务. 3:在运行窗口中使用命令启动和停止服务: 启动:net start mssqlsever. 停止 ...

  5. 1-01Sql Sever 2008的安装

    Sql Sever 2008对计算机的配置要求: 1:处理器:最低1.4Ghz的处理器,建议使用2.0GHz或更高的处理器  . 2:内存:最小512MB, 建议使用1GB或更高的处理器. 3:磁盘容 ...

  6. 【SQL Sever】实现SQL Sever的发布。订阅。 双机热备

    实现SQL Sever的发布和订阅  最大的好处就是: 可以实现读写分离,增删改操作在主数据库服务器上进行,查询在备份数据库服务器上进行.一方面提高软件执行效率,另一方面也减轻主库压力. 本次实现发布 ...

  7. 【SQL Sever】将SQL Sever中的一个数据表的数据导出为insert语句

    例如:这SQL   Sever中的一张数据表,想要将这张数据表中的数据  转化成一个一个的insert语句存储在txt的文档中,那么不论走到那里这个insert语句一执行,我们就能将这个数据表中的数据 ...

  8. sql Sever的存储过程转换为mysql的

    总体来说,sql sever和Mysql的存储过程的思路都是一样的,但是在语法和结构上还是有很大的区别的.1. 在mysql中写存储过程所有的dbo都要去掉.2. 每一个sql语句后面都需要加上:否则 ...

  9. SQL Server数据库(SQL Sever语言 CRUD)

    使用SQL Sever语言进行数据库的操作 常用关键字identity 自增长primary key 主键unique 唯一键not null 非空references 外键(引用) 在使用查询操作数 ...

随机推荐

  1. C++并发与多线程学习笔记--atomic

    std::atomic std::async std::atomic 一般atomic原子操作,针对++,--,+=,^=是支持的,其他结果可能不支持. 注意 std::atomic<int&g ...

  2. (十二)struts2的类型转换

    所有的MVC框架,都属于表现层的解决方案,都需要负责收集用户请求参数,并将请求参数传给应用的控制器组件. 这时问题出现了,所有的请求参数都是字符串类型数据,因此MVC框架必须具备将这些字符串请求参数转 ...

  3. 通过Python实现对SQL Server 数据文件大小的监控告警

    1.需求背景 系统程序突然报错,报错信息如下: The transaction log for database '@dbname' is full. To find out why space in ...

  4. java面试系列<4>——IO

    面试系列--javaIO 一.概述 java的IO主要分为以下几类: 磁盘操作:File 字节操作:InputStream 和 OutputStream 字符操作:Reader 和 Writer 对象 ...

  5. Java基础(面试复习整理)

    基础知识和语法 Java语言初识 计算机语言发展 机器语言.汇编.C.C++.Java Java的诞生与发展 1995 JavaSE JavaME Android JavaEE 2006(大数据) H ...

  6. 解决小程序中Data.parse()获取时间戳IOS不兼容

    由于与后台接口必须对比时间戳所以首先得前台获取时间戳.刚开始是获取手机本地时间,但用户改了时间就废了..... 后来就从服务器上获取个时间再转换为时间戳(是不是很操蛋,先从服务器上获取在TM的自己比较 ...

  7. thinkphp5的extend怎么用?

    http://www.newthink.cc/2017/09/13/thinkphp5%E7%9A%84extend%E6%80%8E%E4%B9%88%E7%94%A8%EF%BC%9F/#i-2

  8. hdu4494

    题意:       给你一些任务,每个任务有自己的开始时间和需要多久能干完,还有就是每个任务都需要一些人,这些人有最多五个种类,各种类之间的人不能相互替换,但是某些工人干完这个活后如果可以在另一个任务 ...

  9. hdu 1044 BFS(压缩图)+DFS

    题意:              给你起点,终点,图上有墙有路还有宝物,问你在规定时间内能否能到终点,如果能问最多能捡到多少宝物. 思路:           看完这个题目果断 BFS+三维的mark ...

  10. CTFHub-技能树-SSRF

    SSRF 目录 SSRF 1.内网访问 2.伪协议读取文件 3.端口扫描 4.POST请求 5.上传文件 6.FastCGI协议 7.Redis 8.URL Bypass 9.数字IP Bypass ...