# Auto detecting video hardware and setting up accordingly

## pratty70

Apologies if this is covered elsewhere, but I have looked and been unable to find anything that might fit the bill.

Trying to generate a minimal embedded system which will auto detect the video hardware and set up for 3D acceleration.  It is only likely to be Nvidia or Intel.  Is there a simple way to achieve this.  I suppose something like the live cd would do, although I suspect that doesn't set up for 3D acceleration.

Any thoughts or pointers in the right direction greatly appreciated.

Cheers

----------

## krinn

something simple like that ?

```
#/bin/bash

videocard=`lspci | grep VGA`

if [[ "$videocard" =~ nVidia ]]

   then echo nvidia card, so something like cp nvidia.cfg xorg.cfg here

   fi;

```

----------

## pratty70

Thanks Krinn,

If it's as simple as using a different xorg.conf then it'll be straight forward.

Thanks for that, I'll give it a shot.

Cheers

Chris

----------

