系统缺少 xorg.conf

系统缺少 xorg.conf

我在运行 Debian Wheezy 的虚拟机上安装 X 服务器时遇到了不少困难。我基本上只是希望能够使用 X11 转发通过 SSH 连接到该框。

通过 apt 打包系统安装 xserver 后,( apt-get install xorg xserver-xorg) 我无法实际运行服务器:

$ sudo startx

X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.11-2-amd64 x86_64 Debian
Current Operating System: Linux dev 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64
Kernel command line: root=UUID=a6d65598-f93e-498a-a494-5fd5bcdb1aef ro console=hvc0 quiet -- quiet console=hvc0
Build Date: 17 December 2013  07:37:58PM
xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau <[email protected]>) 
Current version of pixman: 0.26.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Nov 10 23:19:43 2014
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Fatal server error:
no screens found

经过一番谷歌搜索,似乎大家一致认为这可能与视频驱动程序有关。

通过检查日志似乎可以验证这一点,如上述错误消息所示。日志的相关部分内容如下:

[788459.523] (II) Module vesa: vendor="X.Org Foundation"
[788459.523]    compiled for 1.12.1, module version = 2.3.1
[788459.523]    Module class: X.Org Video Driver
[788459.523]    ABI class: X.Org Video Driver, version 12.0
[788459.523] (II) LoadModule: "fbdev"
[788459.524] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[788459.524] (II) Module fbdev: vendor="X.Org Foundation"
[788459.524]    compiled for 1.12.1, module version = 0.4.2
[788459.524]    ABI class: X.Org Video Driver, version 12.0
[788459.524] (II) VESA: driver for VESA chipsets: vesa
[788459.524] (II) FBDEV: driver for framebuffer: fbdev
[788459.524] (--) using VT number 7

[788459.524] (WW) Falling back to old probe method for vesa
[788459.524] (WW) Falling back to old probe method for fbdev
[788459.524] (II) Loading sub module "fbdevhw"
[788459.524] (II) LoadModule: "fbdevhw"
[788459.524] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[788459.524] (II) Module fbdevhw: vendor="X.Org Foundation"
[788459.524]    compiled for 1.12.4, module version = 0.0.2
[788459.524]    ABI class: X.Org Video Driver, version 12.1
[788459.524] (EE) open /dev/fb0: No such file or directory
[788459.524] (EE) No devices detected.

因此,看起来,在寻找驱动程序时,startx尝试打开设备/dev/fb0(不确定那是什么 - 帧缓冲区?),失败并中止。

因此,显然我可能需要编辑 中的视频驱动程序设置/etc/X11/xorg.conf。但我的系统没有/etc/X11/xorg.confxorg.conf文件任何地方所以我基本上是走进了死胡同。

有什么提示/建议/解决方案吗?

答案1

为此,您不需要 X 服务器:X 服务器保留在您的本地计算机上(实际上有屏幕的计算机 - 嘿,该错误消息说明了这一点);运行应用程序的系统只需要 X *库。

实际上建立安全连接非常简单:

ssh -X

ForwardX11可以通过在以下位置输入匹配的主机条目来默认为所有 ssh 连接启用此功能~/.ssh/config(请参阅ssh_配置(5))。

这一切都取决于X11Forwarding/etc/ssh/sshd_configsshd_配置(5)),该功能在 vanilla openssh sshd 中是禁用的,但在许多发行版中默认启用。

答案2

您不需要 X 服务器来实现这一点。您需要在隧道连接的机器上启动并运行 X 服务器。您甚至不需要隧道连接任何东西,除非您位于 NAT 或某些棘手的防火墙后面:

export DISPLAY=<IP of machine where you are sitting at:0.0 在你的桌面上:xhost +

这也将提供良好的诊断。

相关内容