autodetect_vga_driver.sh
#!/bin/bash
/bin/cp /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf -f
lspci | grep VGA | grep -q nVidia
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf -f
fi
lspci | grep VGA | grep -q Intel
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.intel /etc/X11/xorg.conf -f
fi
lspci | grep VGA | grep Intel | grep -q 82845
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.intel845 /etc/X11/xorg.conf -f
fi
lspci | grep VGA | grep -q ATI
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.ati /etc/X11/xorg.conf -f
fi
lspci | grep VGA| grep -q SiS
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.sis /etc/X11/xorg.conf -f
fi
lspci | grep VGA| grep -q VIA
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.via /etc/X11/xorg.conf -f
fi
lspci | grep VGA| grep -q S3
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.via /etc/X11/xorg.conf -f
fi
lspci | grep VGA| grep -q AMD
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.amd /etc/X11/xorg.conf -f
fi
################################################## ###########33
################################################## ###########33
lspci -n | grep -q -s 1002:5a33
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf -f
fi
################################################## #########
lspci -n | grep -q -s 8086:29c2
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf -f
fi
################################################## #######
lspci -n | grep -q -s 8086:29b2
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf -f
fi
################################################## #######
lspci -n | grep -q -s 1039:6351
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf -f
fi
################################################## #######
lspci -n | grep -q -s 1106:3343
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf -f
fi
################################################## ###########
lspci -n | grep -q -s 1002:791e
if [ $? = 0 ];then
/bin/cp /etc/X11/xorg.conf.vesa /etc/X11/xorg.conf -f
fi
################################################## ###########
Bookmarks