summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/xconfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/xconfig.sh')
-rwxr-xr-xabs/core/LinHES-config/xconfig.sh47
1 files changed, 41 insertions, 6 deletions
diff --git a/abs/core/LinHES-config/xconfig.sh b/abs/core/LinHES-config/xconfig.sh
index 73e4a5e..f832e66 100755
--- a/abs/core/LinHES-config/xconfig.sh
+++ b/abs/core/LinHES-config/xconfig.sh
@@ -144,6 +144,22 @@ function intel_driver_install {
# Xres="${Xres} 720x480_60"
# fi
+function set_res {
+ echo " Setting modeline to ${Xres}"
+ echo " Setting modeline to ${Xres}" >> $LOGFILE 2>&1
+ cat > /etc/X11/xorg.conf.d/30-screen.conf <<EOF
+ Section "Screen"
+ Identifier "Screen0" #Collapse Monitor and Device section to Screen section
+ Device "Device0"
+ Monitor "Monitor0"
+ DefaultDepth 24 #Choose the depth (16||24)
+ SubSection "Display"
+ Depth 24
+ Modes "${Xres}" #Choose the resolution
+ EndSubSection
+ EndSection
+EOF
+}
function setupX {
@@ -153,6 +169,12 @@ function setupX {
case $VGACARDTYPE in
NVIDIA|nVidia|nvidia)
nvidia_driver_install
+ if [ ${Xres} != "Auto" ]
+ then
+ set_res
+ else
+ rm -f /etc/X11/xorg.conf.d/30-screen.conf
+ fi
;;
VMware)
@@ -163,22 +185,35 @@ function setupX {
echo "#!/bin/bash" > /etc/X11/autostart/vmware.sh
echo "/usr/bin/vmware-user-suid-wrapper" >> /etc/X11/autostart/vmware.sh
chmod 755 /etc/X11/autostart/vmware.sh
+ if [ ${Xres} != "Auto" ]
+ then
+ set_res
+ else
+ rm -f /etc/X11/xorg.conf.d/30-screen.conf
+ fi
;;
Intel|intel)
intel_driver_install
cp $TEMPLATES/xorg/xorg.intel /etc/X11/xorg.conf.d/20-automv.conf
+ if [ ${Xres} != "Auto" ]
+ then
+ set_res
+ else
+ rm -f /etc/X11/xorg.conf.d/30-screen.conf
+ fi
;;
vesa|InnoTek|*) #leaving this as * and vesa for no real reason other then it's explicit to catch vesa
vesa_driver_install
cp $TEMPLATES/xorg/xorg.vesa /etc/X11/xorg.conf.d/20-automv.conf
-# if [ ${Xres} = Auto ]
-# then
-# sed -e "/^.*Modes.*$/d" "$TEMPLATES/xorg/xorg.conf.vesa" > "$XORG_CONF"
-# else
-# sed -e "s/^.*Modes.*$/\t Modes \"${Xres}\"/" "$TEMPLATES/xorg/xorg.conf.vesa" > "$XORG_CONF"
-# fi
+ if [ ${Xres} != "Auto" ]
+ then
+ set_res
+ else
+ rm -f /etc/X11/xorg.conf.d/30-screen.conf
+ fi
+
;;
esac