Magellan Linux

Diff of /alx-src/trunk/tinyalxconfig-ng/functions/config_x11.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 400 by niro, Wed Jun 4 18:50:33 2008 UTC revision 517 by niro, Sun Jun 22 22:20:28 2008 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_x11.sh,v 1.3 2008-06-04 18:50:33 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_x11.sh,v 1.8 2008-06-22 22:20:28 niro Exp $
2  # configures the x11 server on the host via mysql db settings  # configures the x11 server on the host via mysql db settings
3    
4  get_x11_settings()  get_x11_settings()
5  {  {
6   local x i all DB_X11SETTINGS   local x i all DB_X11SETTINGS
7    
8   # autodetect or not ?   # autodetect or not ?
9   if [ $(mysqldo "select monitorid from cfg_graphic where serial='${ALX_SERIAL}'") -gt 0 ]   if [ $(mysqldo "select monitorid from cfg_graphic where serial='${ALX_SERIAL}'") -gt 0 ]
10   then   then
# Line 77  config_x11() Line 77  config_x11()
77  {  {
78   # get our settings from the db   # get our settings from the db
79   get_x11_settings   get_x11_settings
80    
81   local xserver   local xserver
82   local xfconfig   local xfconfig
83     local startx
84   local HAS_REALVNC=no   local HAS_REALVNC=no
85    
86   # xfree or xorg ?   # xfree or xorg ?
87   xserver="Xorg"   xserver="Xorg"
88   # todo: maybe kdrive support?   # todo: maybe kdrive support?
89   case ${xserver} in   case ${xserver} in
90   Xorg) xfconfig=/etc/X11/xorg.conf ;;   Xorg) xfconfig=/etc/X11/xorg.conf; startx=startx-xorg ;;
91   esac   esac
92    
93   [ -f /usr/lib/modules/extensions/vnc.so ] && HAS_REALVNC="yes"   [ -f /usr/lib/modules/extensions/vnc.so ] && HAS_REALVNC="yes"
# Line 182  config_x11() Line 183  config_x11()
183   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
184    
185   # monitor   # monitor
186     echo '' >> ${xfconfig}
187   if [ -x /sbin/ddcxinfo-knoppix ] &&   if [ -x /sbin/ddcxinfo-knoppix ] &&
188     [[ ${ALX_HSYNC} = auto ]] ||     [[ ${ALX_HSYNC} = auto ]] ||
189     [[ ${ALX_VREF} = auto ]]     [[ ${ALX_VREF} = auto ]]
190   then   then
191   ddcxinfo-knoppix -monitor >> ${xfconfig}   ddcxinfo-knoppix -monitor >> ${xfconfig}
192   else   else
  echo '' >> ${xfconfig}  
193   echo "# Monitor: ${ALX_VENDOR} ${ALX_MODEL}" >> ${xfconfig}   echo "# Monitor: ${ALX_VENDOR} ${ALX_MODEL}" >> ${xfconfig}
194   echo 'Section "Monitor"' >> ${xfconfig}   echo 'Section "Monitor"' >> ${xfconfig}
195   echo '    Identifier  "Monitor0"' >> ${xfconfig}   echo '    Identifier  "Monitor0"' >> ${xfconfig}
# Line 241  config_x11() Line 242  config_x11()
242   echo '#    Mode 0666' >> ${xfconfig}   echo '#    Mode 0666' >> ${xfconfig}
243   echo '# EndSection' >> ${xfconfig}   echo '# EndSection' >> ${xfconfig}
244    
245     install -d ${SETTINGSPATH}
246   echo "ALX_MOUSE_ACCELERATION=\"${ALX_MOUSE_ACCELERATION}\"" > ${SETTINGSPATH}/mouse   echo "ALX_MOUSE_ACCELERATION=\"${ALX_MOUSE_ACCELERATION}\"" > ${SETTINGSPATH}/mouse
247   echo "ALX_MOUSE_THRESHOLD=\"${ALX_MOUSE_THRESHOLD}\"" >> ${SETTINGSPATH}/mouse   echo "ALX_MOUSE_THRESHOLD=\"${ALX_MOUSE_THRESHOLD}\"" >> ${SETTINGSPATH}/mouse
 }  
248    
249     # setup startx
250     ln -snf ${xserver} /usr/bin/X
251     ln -snf ${startx} /usr/bin/startx
252    }

Legend:
Removed from v.400  
changed lines
  Added in v.517