尝试使用以下命令从 Centos 7 计算机上的 ssh 会话以非 root 用户身份启动无头 X 服务器(驱动程序“Dummy”,来自包 xorg-x11-drv-dummy)
$ nohup Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile /my/log/file -config /my/config/file :9 >> /my/log/x.out 2>&1 &
...除了非根条件之外一切正常 - 在这种情况下我在日志文件中找到
(EE) Fatal server error: (EE) PAM authentication failed, cannot start X server. Perhaps you do not have console ownership? (EE)
...这个无头X服务器仅用于运行selenium测试,实际上不需要“控制台”(也不需要窗口管理器)
你知道这样的配置有什么问题吗?
添加当前使用的配置文件:
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 31.5-48.5
VertRefresh 50-70
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x800"
EndSubSection
EndSection