我的目標是為我的 Ubuntu 機器提供兩個席位。其中一台顯示器是 Mimo 的 USB 觸控螢幕,帶有 Displaylink 晶片。我已經通過重新配置 xorg.conf 使其作為主顯示器工作。甚至觸控介面也能運作。
但對於多人來說,僅僅更改 xorg.conf 還不夠,因為還必須啟動額外的登入畫面。這必須進入 lightdm 配置。
透過為多席位配置 lightdm (lightdm.conf),我成功啟動了兩個 X 實例,每個實例對應一個 ServerLayout (xorg.conf)。一台在虛擬終端 7 (VT7) 上運行,另一台在 VT8 上運行。眾所周知,您可以使用快速鍵 Ctrl + Alt + Fx(其中 x 是終端編號)在虛擬終端之間切換。
現在的問題是這樣的:預設情況下,VT7是啟用的,VT8是停用的。但是當我切換到 VT8 時,它變成啟用狀態,但 VT7 變成停用狀態。
如何使兩個 X Server 終端機/伺服器並行運作?
謝謝。
這是我的 lightdm.conf
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
[Seat:0]
xserver-layout=default
[Seat:1]
xserver-layout=displaylink
這裡僅是我的 xorg.conf 的相關部分:
# Two Server Layouts
Section "ServerLayout"
Identifier "default"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "displaylink"
Screen "DisplayLinkScreen"
InputDevice "Mouse1"
EndSection
# Two Screens
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "DisplayLinkScreen"
Device "DisplayLinkDevice"
Monitor "DisplayLinkMonitor"
SubSection "Display"
Depth 24
Modes "800x480"
EndSubSection
EndSection
# Two Monitors
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "DisplayLinkMonitor"
EndSection
# Two Graphics Cards/Interfaces
Section "Device"
Identifier "Card0"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Device"
Identifier "DisplayLinkDevice"
driver "displaylink"
Option "fbdev" "/dev/fb1"
EndSection
# Three Input Devices (the last is touchscreen of the USB monitor)
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 "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Device" "/dev/input/by-path/pci-0000:00:1d.7-usb-0:1.3:1.0-event"
EndSection
答案1
重讀下面的維基條目https://help.ubuntu.com/community/MultiseatX,我想你應該看看X是如何被調用的;例如,-sharevts
和-novtswitch
命令列選項應該以某種方式傳遞給lightdm.conf
.
如果您處於工作狀態,請考慮將 wiki 條目更新至 11.10。
答案2
謝謝你的提示。 -sharevts 開關是關鍵。 Lightdm 預設不會加入它。我查看了 /var/log/lightdm/lightdm.log 並添加了自訂 xserver-command 選項,現在它終於可以工作了!感謝您的協助。
我的最終 lightdm.conf:
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
[Seat:0]
xserver-layout=default
xserver-command=/usr/bin/X :0 -layout default -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -sharevts
[Seat:1]
xserver-layout=displaylink
xserver-command=/usr/bin/X :1 -layout displaylink -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch -sharevts
答案3
我認為第二個席位應該有一組單獨的 tty,並且第二個 X 伺服器應該在其中一個上運行。但在查看了核心控制台程式碼之後,似乎它是在假設只有一個控制台的情況下編寫的。它使用全域變數將虛擬控制台重複使用到單一顯示器上,並從所有連接的鍵盤讀取鍵盤輸入。
看起來 Linux 控制台程式碼需要大量重構才能支援多個席位。