Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start linux with gui without monitor? [closed]

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?

[email protected]

like image 550
smarthand Avatar asked Feb 21 '23 04:02

smarthand


2 Answers

Your problem is that the X server checks whether there is really a monitor attached. Your options:

  1. Attach a monitor. Simple but wasteful.

  2. 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).

like image 199
Aaron Digulla Avatar answered Feb 23 '23 18:02

Aaron Digulla


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.

like image 35
Lie Ryan Avatar answered Feb 23 '23 16:02

Lie Ryan