I met a problem. I had a server which is installed redhat enterprise 5.5. And one Qt program was running on this server. So what I should do is to turn on my server, the server will start automaticly with Gui and that Qt program will start automaticly. I finished all on my desktop. But while I start this server without monitor, we know server was running without monitor,the X server go bad.God, what should I do?
Here is the xorg log:
[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
I searched on internet,somebody told me that I should add nomodeset in the end of the kernel line in /boot/grub/grub.conf.I did it but nothing changed. Can anybody tell me what should I do?
smarthand123@163.com
Your problem is that the X server checks whether there is really a monitor attached. Your options:
Attach a monitor. Simple but wasteful.
Use Xvnc instead. This is like X but it renders to memory, so it doesn't need a graphics card (and no drivers) and no monitor. You can even connect to it remotely via the VNC protocol.
The second option is actually pretty simple to implement: Just call vncserver :42
After export DISPLAY=:42
, you can run your Qt application and it will connect to the virtual Xvnc server running on the virtual display 42 (0 is the default).
Restart the X server, open a tty window (alt + f1) or (alt+f2) then login on the terminal and run 'startx'. Otherwise try ssh-ing to the server and either attempt startx or reboot the machine.
Try to use Xvfb (x server with virtual framebuffer)
来源:https://stackoverflow.com/questions/9699992/how-to-start-linux-with-gui-without-monitor