我正在尝试添加一个额外的无头座位/会话,以允许LightDM为VNC用户提供无头登录页面,而不会干扰使用桌面的人。 我尝试了几种配置(日志中没有明显的错误(,类似于以下nVidia卡和另一个适配器的教程:
https://techoverflow.net/2019/02/23/how-to-run-x-server-using-xserver-xorg-video-dummy-driver-on-ubuntu/
https://wiki.archlinux.org/index.php/Xorg_multiseat
https://wiki.ubuntu.com/MultiseatTeam/Instructions
但是,到目前为止,较新的systemd相关 Xorg 配置过程忽略了示例中的 Xorg">虚拟"驱动程序(对于单独用户登录下的分离 VNC 桌面(。值得注意的是,为检测到的 nVidia [Seat:card0] 设置加载了 lightDM 设置,但由于 [Seat:seat4] 从未被登录轮询,因此在 LightDM 中永远不会应用 conf。
$ls -l /tmp/.X11-unix/
srwxrwxrwx 1 root root 0 Jun 16 23:09 X0
$loginctl list-seats
SEAT
seat0
1 seats listed.
$loginctl
SESSION UID USER SEAT TTY
2 1000 pi
c1 118 lightdm seat0
$ps aux | grep X
root 6732 5.1 0.2 263360 48232 ? Sl 23:09 0:01 /usr/lib/xorg/Xorg -s 0 -dpms -keeptty :0 -config /etc/X11/xorg.conf -layout Layout0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
$ls -l /sys/class/graphics
lrwxrwxrwx 1 root root 0 Jun 16 23:09 fb0 -> ../../devices/platform/vesa-framebuffer.0/graphics/fb0
lrwxrwxrwx 1 root root 0 Jun 16 23:09 fbcon -> ../../devices/virtual/graphics/fbcon
手动设置:
$sudo nvidia-xconfig
$sudo nano /usr/share/X11/xorg.conf.d/10-Dummy.conf
Section "Device"
Identifier "Card4"
Driver "dummy"
VideoRam 32768
Option "NoDDC" "true"
Option "IgnoreEDID" "true"
EndSection
Section "Monitor"
Identifier "Monitor4"
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -hsync +vsync
Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
Modeline "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
Option "Primary" "true"
EndSection
Section "Screen"
Identifier "Screen4"
Device "Card4"
Monitor "Monitor4"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080_60.00" "1280x1024_60.00" "1024x768_60.00"
EndSubSection
EndSection
$sudo nano /usr/share/X11/xorg.conf.d/10-Dummy-seat4.conf
Section "ServerLayout"
Identifier "Dummy4"
Screen 4 "Screen4"
Option "Seat" "seat4"
Option "Xinerama" "0"
Option "SingleCard" "on"
EndSection
我通过使用带有新座椅 udev 规则的电源开关来解决此问题: TAG=="seat", ENV{ID_FOR_SEAT}=="input-acpi-LNXPWRBN_00", ENV{ID_SEAT}="seat-9",TAG+="master-of-seat">