+ -
当前位置:首页 → 问答吧 → 双显示出来了, 但是双鼠标没搞定

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

时间:2009-04-25

来源:互联网

显卡 AMD ATI HD 3450

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

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

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

代码:
Section "ServerLayout"
        Identifier "Layout-A"
        Screen 0 "Screen-0" 0 0
        Screen 1 "Screen-1" 0 0 # 这样写对吗?
EndSection

Section "Files"
 ...
EndSection

Section "Module"
 ...
EndSection

Section "ServerFlags"
        Option "DontZap" "false"
EndSection

Section "Monitor"
        Identifier "AOC-LCD-on-Screen-0"
        Option "VendorName" "AOC"
        Option "ModelName" "Generic Autodetecting Monitor"
        Option "DPMS" "true"
EndSection

Section "Monitor"
        Identifier "Lenovo-LCD-on-Screen-1"
        Option "VendorName" "Lenovo"
        Option "ModelName" "Generic Autodetecting Monitor"
        Option "DPMS" "true"
EndSection

Section "Device"
        Identifier "HD3450-0"
        Driver "fglrx"
        #Option "OverlayOnCRTC2" "1" // 这个有什么用?
        BusID "PCI:1:0:0"
        Screen 0
EndSection

Section "Device"
        Identifier "HD3450-1"
        Driver "fglrx"
        BusID "PCI:1:0:0"
        Screen 1
EndSection

Section "Screen"
        Identifier "Screen-0"
        Device "HD3450-0"
        Monitor "AOC-LCD-on-Screen-0"
        DefaultDepth 24
        SubSection "Display"
 Viewport 0 0
 Depth 24
 Modes "1680x1050"
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen-1"
        Device "HD3450-1"
        Monitor "Lenovo-LCD-on-Screen-1"
        DefaultDepth 24
        SubSection "Display"
 Viewport 0 0
 Depth 24
 Modes "1920x1080"
        EndSubSection
EndSection

作者: cteddy   发布时间: 2009-04-25

您可能需要同时运行两个 X 进程,并使用各自的配置文件。

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


仅使用一个 X 进程的情况,
如果给一个 xorg.conf 配置分离的两组 ServerLayout 小节,应可同时启动,如:
代码:
Section "ServerLayout"
        Identifier      "Default Layout"
        Screen "Default Screen"
        InputDevice     "Default Mouse" "CorePointer"
        InputDevice     "Default Keyboard" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier      "2nd Layout"
        Screen "2nd Screen"
        InputDevice     "2nd Mouse"
        InputDevice     "2nd Keyboard"
EndSection

作者: 聚焦深空   发布时间: 2009-04-26

现谢了,一会我去试一下, 但据我理解, 两个进程不可能同时独占同一个硬件吧?

作者: cteddy   发布时间: 2009-04-26

是的,所以你必须在配置中指明使用的设备文件,必须使用传统方式设置,不能使用 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-04-26

折腾了半天,看到的资料都是说xorg只支持一个指针, 我又没有双显卡, 看来只能用单个鼠标了。

作者: cteddy   发布时间: 2009-04-26

引用:
作者: cteddy
折腾了半天,看到的资料都是说xorg只支持一个指针, 我又没有双显卡, 看来只能用单个鼠标了。
双显卡就可以支持两套指针?!

作者: qiang_liu8183   发布时间: 2009-04-26

只有一个显卡,且多头支持已配置好。
可以考虑使用类似 Xnest 或 Xephyr 作为 第二 X-server。

这个也许有帮助。
http://netpatia.blogspot.com/2006/09...nd-xephyr.html

看来对 evdev 有些误解,等您好消息啦。

作者: 聚焦深空   发布时间: 2009-04-26

http://ubuntuforums.org/showthread.php?t=638620 附件是其效果图

http://netpatia.blogspot.com/2006/09...th-ubuntu.html
上传的图像
dualseat_1024.jpg (111.5 KB, 26 次查看)

作者: 聚焦深空   发布时间: 2009-04-26

这种用法叫 Multiseat。

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

以此为起点也不错
http://en.wikipedia.org/wiki/Multiseat

作者: 聚焦深空   发布时间: 2009-04-26

http://wiki.x.org/wiki/Development/D...tion/Multiseat

下面的工具可以自动配置,不知 arch 有没有。
http://wiki.c3sl.ufpr.br/multiseat/index.php/Mdm

作者: 聚焦深空   发布时间: 2009-04-26

其他方案
http://en.wikibooks.org/wiki/Multiterminal_with_evdev
http://research.edm.uhasselt.be/~jor...Misc.DualSeatX
http://en.wikibooks.org/wiki/Multiterminal_with_faketty
http://en.wikibooks.org/wiki/Multiterminal_with_Xnest

作者: 聚焦深空   发布时间: 2009-04-26

... four mice and two dual or four single output video cards.

我的大概也算双头显卡, 也许真能配成功。

作者: cteddy   发布时间: 2009-04-26

看来 sir 上已经有人这样玩过
http://www.linuxsir.org/bbs/post1712178-3.html

作者: 聚焦深空   发布时间: 2009-04-27

xephyr 的方案看似简单, 轻松就新开一个X服务, 但我现在还是没能把鼠标/键盘配上.

archlinux里的xephyr似乎不支持endev, 我又没找到xephyr的文档, man里什么也没有, 自带的命令行说明只有一句, 看不出怎么用, 也不确定能不能用:
-mouse driver [,n,,options] Specify the pointer driver and its options (n is the number of buttons。

我现在正找xephyr的endev补丁,以及源代码,希望能编译成功。

作者: cteddy   发布时间: 2009-04-27

有点头疼, 下载了xorg-server的PKGBUILD, 说要卸载catalyst才能编, 我突然不想搞了。 就算能配出来,也不想每次升级都要这么折腾。

我一会试装xbox, 印象中它是支持usb设备的, 如果可以的话,就凑合用vbox了。

作者: cteddy   发布时间: 2009-04-27

我决定暂时用vbox。

谢谢聚焦深空,虽然我按你的方法没配置成功, 但也算是学会了。

我在找资料时发现ubuntu下的文档比较多, 据说有现成的包, 有条件的不妨试一下。
不需要双显示, 有双鼠标就可以了,用Xephyr的方式, 屏幕切为两半,另一个人只用鼠标。

作者: cteddy   发布时间: 2009-04-27

/usr/lib/xorg/modules/extensions/libglx.so 是现在各家驱动都不同的。。

作者: wheel   发布时间: 2010-04-20

围观。
我的笔记本也有双输出,只是我没有其他显示器了。

作者: dickeny   发布时间: 2010-04-20

上张图片说明效果。
上传的图像
ms.jpg (36.2 KB, 12 次查看)

作者: 没本   发布时间: 2010-04-20