4

我遇到了一个问题。我有一台服务器安装了redhat enterprise 5.5。一个 Qt 程序正在这台服务器上运行。所以我应该做的是打开我的服务器,服务器将自动启动 Gui 并且 Qt 程序将自动启动。我在桌面上完成了所有工作。但是当我在没有监视器的情况下启动这个服务器时,我们知道服务器在没有监视器的情况下运行,X 服务器坏了。上帝,我该怎么办?

这是 xorg 日志:

[root@localhost grub]# tail -n 30 /var/log/Xorg.0.log
ABI class: X.Org Video Driver, version 1.0
(II) Loading sub module "i2c"
(II) LoadModule: "i2c"
(II) Loading /usr/lib/xorg/modules/libi2c.so
(II) Module i2c: vendor="X.Org Foundation"
compiled for 7.1.1, module version = 1.2.0
ABI class: X.Org Video Driver, version 1.0
(II) intel(0): Output VGA has no monitor section
(II) intel(0): I2C bus "CRTDDC_A" initialized.
(II) intel(0): EDID for output VGA
(II) intel(0): Output VGA disconnected
(WW) intel(0): No outputs definitely connected, trying again...
(II) intel(0): Output VGA disconnected
(WW) intel(0): Unable to find initial modes
(EE) intel(0): No valid modes.
(II) UnloadModule: "intel"
(II) UnloadModule: "i2c"
(II) Unloading /usr/lib/xorg/modules/libi2c.so
(II) UnloadModule: "ddc"
(II) Unloading /usr/lib/xorg/modules/libddc.so
(II) UnloadModule: "vgahw"
(II) Unloading /usr/lib/xorg/modules/libvgahw.so
(II) UnloadModule: "vbe"
(II) Unloading /usr/lib/xorg/modules/libvbe.so
(II) UnloadModule: "int10"
(II) Unloading /usr/lib/xorg/modules/libint10.so
(EE) Screen(s) found, but none have a usable configuration.
Fatal server error:
no screens found

我在互联网上搜索,有人告诉我应该在 /boot/grub/grub.conf 的内核行末尾添加 nomodeset。我做到了,但没有任何改变。谁能告诉我我该怎么办?

smarthand123@163.com

4

3 回答 3

6

您的问题是 X 服务器检查是否真的连接了监视器。您的选择:

  1. 连接显示器。简单但浪费。

  2. 请改用 Xvnc。这就像 X,但它渲染到内存,所以它不需要显卡(也不需要驱动程序)和显示器。您甚至可以通过 VNC 协议远程连接到它。

第二个选项实际上很容易实现:只需调用vncserver :42

之后export DISPLAY=:42,您可以运行您的 Qt 应用程序,它将连接到在虚拟显示器 42 上运行的虚拟 Xvnc 服务器(默认为 0)。

于 2012-03-14T10:28:54.783 回答
1

重新启动 X 服务器,打开一个 tty 窗口 (alt + f1) 或 (alt+f2) 然后登录终端并运行“startx”。否则尝试 ssh-ing 到服务器并尝试 startx 或重新启动机器。

于 2012-03-14T10:26:42.963 回答
1

尝试使用Xvfb (x server with virtual framebuffer)

于 2012-03-14T23:55:39.727 回答