(或重用配置了 Xinerama 的 XFree)
可能存在一些不使用 DRI 的原因
据我所知,一个系统中只有一块显卡可以使用 DRI。
Nvidia 闭源驱动程序不支持 DRI。
如果这些原因之一适用于您的系统,则您不需要为不同的显示器使用不同的 XFree 配置文件。
您可以使用您的发行版提供的工具配置您的系统以使用 Xinerama,并阅读 Xinerama-HOWTO,这样当系统被单个用户使用时,他/她可以切换到 Xinerama 桌面并使用所有可用的显示器来获得更大的桌面。
一旦配置了 Xinerama,只需要少量添加即可实现多个独立的桌面。您所要做的就是添加使用单屏幕定义并具有独立输入设备的新布局(实际上,这仅对于鼠标设备是必需的,因为键盘是通过vt[n]选项管理的)。
如果您以下列方式配置了 Xinerama
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 2"
Screen "Screen 1" RightOf "Screen 2"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection |
要实现多个独立的桌面,您只需要为单个屏幕添加布局定义
Section "ServerLayout"
Identifier "first-Xserver"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "second-Xserver"
Screen "Screen 2"
InputDevice "Mouse2" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection |
这将产生以下布局定义
Section "ServerLayout"
Identifier "Xinerama"
Screen "Screen 2"
Screen "Screen 1" RightOf "Screen 2"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "first-Xserver"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "second-Xserver"
Screen "Screen 2"
InputDevice "Mouse2" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection |
现在您可以使用以下选项启动单个 X 服务器-layout Xinerama并享受 Xinerama 桌面,或者
您可以使用以下命令启动 2 个独立的 X 服务器-layout first-Xserver对于第一个,以及-layout second-Xserver对于第二个。
由于您将为所有 X 服务器使用单个 XFree 配置文件,
为了使用独立的键盘,您必须使用以下命令
对于使用第 1 个键盘的第 1 个 X 服务器
$ startx -- /usr/X11R6/bin/X0 :0 -layout first-Xserver vt7
对于使用第 2 个键盘的第 2 个 X 服务器
$ startx -- /usr/X11R6/bin/X1 :1 -layout second-Xserver vt17
并且如果您想使用 Xinerama
$ startx -- /usr/X11R6/bin/X -layout Xinerama vt7
![]() | 注意 |
|---|---|
对于旧版本的 Backstreet Ruby,您必须使用 对于使用第 1 个键盘的第 1 个 X 服务器 $ startx -- /usr/X11R6/bin/X0 :0 -layout first-Xserver vt7 对于使用第 2 个键盘的第 2 个 X 服务器 $ startx -- /usr/X11R6/bin/X1 :1 -layout second-Xserver vt8 |
此外,鼠标必须具有不同的标识符
------------------------------------------------------------------------------------------------
# **********************************************************************
# Pointer section
# **********************************************************************
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "4 5"
# ChordMiddle is an option for some 3-button Logitech mice
Option "Emulate3Buttons"
# Option "ChordMiddle"
EndSection
Section "InputDevice"
Identifier "Mouse2"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1"
Option "ZAxisMapping" "4 5"
# ChordMiddle is an option for some 3-button Logitech mice
Option "Emulate3Buttons"
# Option "ChordMiddle"
EndSection
----------------------------------------------------------------------------------------------- |