今天在测试服务器上启用图形化界面时,遇到以下问题:

X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux 2.6.18-53.el5 x86_64 Red Hat, Inc.
Current Operating System: Linux ST-Server 2.6.18-274.7.1.el5 #1 SMP Thu Oct 20 16:21:01 EDT 2011 x86_64
Build Date: 22 February 2012
Build ID: xorg-x11-server 1.1.1-48.90.el5
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Module Loader present
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: Thu May 17 11:56:32 2012
(==) Using config file: "/etc/X11/xorg.conf"

(EE) intel(0): No valid modes.
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found
XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"
      after 0 requests (0 known processed) with 0 events remaining.
xauth: (argv):1:  bad display name "ST-Server:0" in "remove" command

开始以为是显卡驱动问题,后来编辑/etc/X11/xorg.conf更改Driver      "intel"为“vesa”(标准驱动),再用startx启动图形界面还是不行。后经查询,通过以下方法处理掉:

用一下命令测试:

CODE:

#Xorg -configure
#Xorg -config /root/xorg.conf.new
如果能起来,Ctrl-Alt-Backspace来终止X服务器后就把在/root/下自动生成的配置文件xorg..conf.new拷到/etc/X11下替换原来的xoeg.conf。
替换前别忘了将原来的xorg.conf做个备份。

OK!搞定!