diff options
author | Dirk von Suchodoletz | 2008-08-11 23:54:43 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2008-08-11 23:54:43 +0200 |
commit | eaf89cb615693b1b7b59f2b968286f04867d0f61 (patch) | |
tree | 7fb18c426db3d214762dd3ea659cbd6a1f62d110 /os-plugins | |
parent | * added more results (diff) | |
download | core-eaf89cb615693b1b7b59f2b968286f04867d0f61.tar.gz core-eaf89cb615693b1b7b59f2b968286f04867d0f61.tar.xz core-eaf89cb615693b1b7b59f2b968286f04867d0f61.zip |
Making sense of the xserver::ddcinfo attribute (if the screen
resolution is not properly set automatically, use the detected
settings).
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2028 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/plugins/xserver/XX_xserver.sh | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh index 7019c324..4bd33610 100644 --- a/os-plugins/plugins/xserver/XX_xserver.sh +++ b/os-plugins/plugins/xserver/XX_xserver.sh @@ -107,6 +107,10 @@ EndSection Section "Monitor" Identifier "Generic Display" Option "DPMS" +# Horizsync could be enabled via xserver::ddcinfo attribute +# Vertrefresh ... +# DisplaySize ... +# Model ... EndSection Section "Screen" Identifier "Default Screen" @@ -153,19 +157,31 @@ Section "InputDevice"\ Option "SendCoreEvents" "true" }' -e '/Device "Generic Mouse"/ { a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents" -}' -i $xfc +}' -i $xfc fi [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..."; # run distro specific generated stage3 script [ -e /mnt/opt/openslx/plugin-repo/xserver/xserver.sh ] && \ . /mnt/opt/openslx/plugin-repo/xserver/xserver.sh if [ $xserver_ddcinfo -ne 0 ] ; then - # read /etc/hwinfo.monitor started at "runinithook '00-started'" + # read /etc/hwinfo.display started at "runinithook '00-started'" # and add - # Horizsync 28.0-65.0?? - # Vertrefresh 57.0-63.0?? - # in Monitor section - : + # Horizsync M-N + # Vertrefresh O-P in Monitor section + vert=$(grep -m 1 "Vert.*Range:" /etc/hwinfo.display | \ + sed 's|.*Range:\ ||;s|\ Hz||') + horz=$(grep -m 1 "Hor.*Range:" /etc/hwinfo.display | \ + sed 's|.*Range:\ ||;s|\ kHz||') + modl=$(grep -m 1 " Model: " /etc/hwinfo.display | \ + sed 's|.*Model:\ ||;s|"||g') + size="0 0" + size="$(grep -m 1 " Size: " /etc/hwinfo.display | \ + sed 's|.*ize:\ ||;s|\ mm||;s|x|\ |')" + [ -n "$vert" -a -n "$horz" ] && \ + sed -e "s|# Horizsync.*| Horizsync $horz|;\ + s|# Vertrefre.*| Vertrefresh $vert|;\ + s|# DisplaySi.*| DisplaySize $size|;\ + s|# Modelname.*| Modelname \"$modl\"|" -i $xfc fi fi fi |