summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/xconfig.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-24 00:40:15 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-24 00:40:23 (GMT)
commit3a594ad38241da5087d34584ba70ca06e7be97c4 (patch)
tree617a14e327af8a1fe159a025b5d1afcad2edde19 /abs/core/LinHES-config/xconfig.sh
parent282e9e588e6d8a62a7b1d3f18963e3787fb6f88a (diff)
downloadlinhes_pkgbuild-3a594ad38241da5087d34584ba70ca06e7be97c4.zip
linhes_pkgbuild-3a594ad38241da5087d34584ba70ca06e7be97c4.tar.gz
linhes_pkgbuild-3a594ad38241da5087d34584ba70ca06e7be97c4.tar.bz2
LinHES-config: added print_xorg_res.py this feeds the ui to list valid modelines as X detects them. This provides a consistent interface.
Also updated xconfig.sh todo something with the XRes value and configuring xorg.
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