LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1959|回复: 18

双显示出来了, 但是双鼠标没搞定

[复制链接]
发表于 2009-4-25 19:40:47 | 显示全部楼层 |阅读模式
显卡 AMD ATI HD 3450

现在双显示出来了, 可以配上不同的桌面,用"env DISPLAY=:0.1 xterm"能把xterm放到副显示器。但是两个鼠标控制的是同一个指针, 两个键盘往同一个窗口里输入字符。

我想配成一个鼠标在Screen0,另一个在Screen1. 键盘也是  
但因为换成HAL, xorg.conf里的InputDevice都删了, 应该怎么配回来?

两个鼠标的驱动分别是什么? 设备又是什么?
键盘呢?



  1. Section "ServerLayout"
  2.         Identifier     "Layout-A"
  3.         Screen      0  "Screen-0" 0 0
  4.         Screen      1  "Screen-1" 0 0 # 这样写对吗?
  5. EndSection

  6. Section "Files"
  7. ...
  8. EndSection

  9. Section "Module"
  10. ...
  11. EndSection

  12. Section "ServerFlags"
  13.         Option            "DontZap" "false"
  14. EndSection

  15. Section "Monitor"
  16.         Identifier   "AOC-LCD-on-Screen-0"
  17.         Option            "VendorName" "AOC"
  18.         Option            "ModelName" "Generic Autodetecting Monitor"
  19.         Option            "DPMS" "true"
  20. EndSection

  21. Section "Monitor"
  22.         Identifier   "Lenovo-LCD-on-Screen-1"
  23.         Option            "VendorName" "Lenovo"
  24.         Option            "ModelName" "Generic Autodetecting Monitor"
  25.         Option            "DPMS" "true"
  26. EndSection

  27. Section "Device"
  28.         Identifier  "HD3450-0"
  29.         Driver      "fglrx"
  30.         #Option            "OverlayOnCRTC2" "1" // 这个有什么用?
  31.         BusID       "PCI:1:0:0"
  32.         Screen      0
  33. EndSection

  34. Section "Device"
  35.         Identifier  "HD3450-1"
  36.         Driver      "fglrx"
  37.         BusID       "PCI:1:0:0"
  38.         Screen      1
  39. EndSection

  40. Section "Screen"
  41.         Identifier "Screen-0"
  42.         Device     "HD3450-0"
  43.         Monitor    "AOC-LCD-on-Screen-0"
  44.         DefaultDepth     24
  45.         SubSection "Display"
  46.                 Viewport   0 0
  47.                 Depth     24
  48.                 Modes    "1680x1050"
  49.         EndSubSection
  50. EndSection

  51. Section "Screen"
  52.         Identifier "Screen-1"
  53.         Device     "HD3450-1"
  54.         Monitor    "Lenovo-LCD-on-Screen-1"
  55.         DefaultDepth     24
  56.         SubSection "Display"
  57.                 Viewport   0 0
  58.                 Depth     24
  59.                 Modes    "1920x1080"
  60.         EndSubSection
  61. EndSection
复制代码
发表于 2009-4-25 20:44:37 | 显示全部楼层
您可能需要同时运行两个 X 进程,并使用各自的配置文件。

默认的 鼠标 键盘 屏幕,使用默认的配置 /etc/X11/xorg.conf
第二套 鼠标 键盘 屏幕,使用第二套配置 /etc/X11/xorg-2nd.conf (用 X -config /etc/X11/xorg-2nd.conf 运行)


仅使用一个 X 进程的情况,
如果给一个 xorg.conf 配置分离的两组 ServerLayout 小节,应可同时启动,如:
  1. Section "ServerLayout"
  2.         Identifier        "Default Layout"
  3.         Screen                "Default Screen"
  4.         InputDevice        "Default Mouse" "CorePointer"
  5.         InputDevice        "Default Keyboard" "CoreKeyboard"
  6. EndSection
  7. Section "ServerLayout"
  8.         Identifier        "2nd Layout"
  9.         Screen                "2nd Screen"
  10.         InputDevice        "2nd Mouse"
  11.         InputDevice        "2nd Keyboard"
  12. EndSection
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-25 21:16:17 | 显示全部楼层
现谢了,一会我去试一下, 但据我理解, 两个进程不可能同时独占同一个硬件吧?
回复 支持 反对

使用道具 举报

发表于 2009-4-25 22:48:01 | 显示全部楼层
是的,所以你必须在配置中指明使用的设备文件,必须使用传统方式设置,不能使用 evdev 驱动 和 hal。
man kbd:
       Option "Device" "string"
              Specify the keyboard device.  Default: the OS's default  console
              keyboard input source.
man mousedrv:
       Option "Device" "string"
              Specifies the device through which the mouse can be accessed.  A
              common setting is "/dev/mouse", which is often a  symbolic  link
              to  the  real device.  This option is mandatory, and there is no
              default setting. The server may however attempt  to  probe  some
              default devices if this option is missing.

虚拟控制台 和 X 使用的默认键盘设备文件请参考
man console
man 4 tty
man vcs
总之,您第二个键盘应能通过设备文件访问才行,/dev/input/* 也许有合适的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-26 02:34:42 | 显示全部楼层
折腾了半天,看到的资料都是说xorg只支持一个指针, 我又没有双显卡, 看来只能用单个鼠标了。
回复 支持 反对

使用道具 举报

发表于 2009-4-26 07:09:30 | 显示全部楼层
Post by cteddy;1979617
折腾了半天,看到的资料都是说xorg只支持一个指针, 我又没有双显卡, 看来只能用单个鼠标了。


双显卡就可以支持两套指针?!
回复 支持 反对

使用道具 举报

发表于 2009-4-26 15:31:27 | 显示全部楼层
只有一个显卡,且多头支持已配置好。
可以考虑使用类似 Xnest 或 Xephyr 作为 第二 X-server。

这个也许有帮助。
http://netpatia.blogspot.com/200 ... dev-and-xephyr.html

看来对 evdev 有些误解,等您好消息啦。
回复 支持 反对

使用道具 举报

发表于 2009-4-26 15:34:48 | 显示全部楼层
http://ubuntuforums.org/showthread.php?t=638620 附件是其效果图

http://netpatia.blogspot.com/200 ... er-with-ubuntu.html

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2009-4-26 15:48:35 | 显示全部楼层
这种用法叫 Multiseat。

google Multiseat
可以得到一大堆资料。

以此为起点也不错
http://en.wikipedia.org/wiki/Multiseat
回复 支持 反对

使用道具 举报

发表于 2009-4-26 16:12:02 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表