[CentOS] Xorg on CentOS

Tue Mar 17 14:11:14 UTC 2020
James Pearson <james-p at moving-picture.com>

Jerry Geis wrote:
> 
> I am trying to find a way to tell the ORDER of X drivers.
> 
> I have a VM image of CentOS 7.  If I boot the image  I want the generic
> driver to load. But if I put that image on hardware I want the Intel driver
> to load.
> 
> So if I specific the /etc/X11/xorg.conf.d/20-intel.conf and specify Intel -
> this is great for the physical device.  But booting my image it fails cause
> there is not Intel hardware.
> 
> How can have ONE X config that specifies Intel first and if not present
> load generic VGA stuff.
> Thanks,

You could write a display-manager.service ExecStartPre script that 
copies/removes the required file(s) to/from /etc/X11/xorg.conf.d/ 
depending on the hardware it finds?

i.e. create a file like 
/etc/systemd/system/display-manager.service.d/hardware.conf containing:

  [Service]
  ExecStartPre=-/path/to/my/custom/hardware/script

I do something similar - which works fine

James Pearson