Magellan Linux

Diff of /alx-src/branches/alxconf-060/functions/config_x11.sh

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

alx-src/branches/alxconf_20060908/functions/config_x11.sh revision 545 by niro, Wed Feb 4 20:07:30 2009 UTC alx-src/branches/alxconf-060/functions/config_x11.sh revision 2004 by niro, Mon May 9 14:57:16 2011 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_x11.sh,v 1.9 2005-10-09 21:31:54 niro Exp $  # $Id$
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     # autodetect
8   # autodetect or not ?   all=$(mysqldo "select module,
9   if [ $(mysqldo "select monitorid from cfg_graphic where serial='${ALX_SERIAL}'") -gt 0 ]   resolution,
10   then   depth,
11   # settings from db   refresh_rate
12     from cfg_graphic where serial='${ALX_SERIAL}'")
13   all=$(mysqldo "select cfg_graphic.module,  
14   cfg_graphic.resolution,   # split'em up and put 'em in an array
15   cfg_graphic.depth,   declare -i i=0
16   list_monitors.vendor,   for x in ${all}
17   list_monitors.model,   do
18   list_monitors.hsync,   DB_X11SETTINGS[${i}]="${x}"
19   list_monitors.vrefresh   ((i++))
20   from list_monitors   done
21   inner join cfg_graphic  
22   on cfg_graphic.monitorid=list_monitors.id   # and now put them in usable var names and export them systemwide
23   and cfg_graphic.serial='${ALX_SERIAL}';")   export ALX_MODULE="${DB_X11SETTINGS[0]:=NULL}"
24     export ALX_RESOLUTION="${DB_X11SETTINGS[1]:=NULL}"
25   # split'em up and put 'em in an array   export ALX_DEPTH="${DB_X11SETTINGS[2]:=NULL}"
26   declare -i i=0   export ALX_REFRESH_RATE="${DB_X11SETTINGS[3]:=NULL}"
  for x in ${all}  
  do  
  DB_X11SETTINGS[${i}]="${x}"  
  ((i++))  
  done  
   
  # and now put them in usable var names and export them systemwide  
  export ALX_MODULE="${DB_X11SETTINGS[0]:=NULL}"  
  export ALX_RESOLUTION="${DB_X11SETTINGS[1]:=NULL}"  
  export ALX_DEPTH="${DB_X11SETTINGS[2]:=NULL}"  
  export ALX_VENDOR="${DB_X11SETTINGS[3]:=NULL}"  
  export ALX_MODEL="${DB_X11SETTINGS[4]:=NULL}"  
  export ALX_HSYNC="${DB_X11SETTINGS[5]:=NULL}"  
  export ALX_VREF="${DB_X11SETTINGS[6]:=NULL}"  
  else  
  # autodetect  
  all=$(mysqldo "select module,  
  resolution,  
  depth  
  from cfg_graphic where serial='${ALX_SERIAL}'")  
   
  # split'em up and put 'em in an array  
  declare -i i=0  
  for x in ${all}  
  do  
  DB_X11SETTINGS[${i}]="${x}"  
  ((i++))  
  done  
   
  # and now put them in usable var names and export them systemwide  
  export ALX_MODULE="${DB_X11SETTINGS[0]:=NULL}"  
  export ALX_RESOLUTION="${DB_X11SETTINGS[1]:=NULL}"  
  export ALX_DEPTH="${DB_X11SETTINGS[2]:=NULL}"  
  export ALX_VENDOR="Autodetected"  
  export ALX_MODEL="Monitor"  
  export ALX_HSYNC="auto"  
  export ALX_VREF="auto"  
  fi  
27    
28   # which input devices are we using ?   # which input devices are we using ?
29   ALX_MOUSE=$(mysqldo "select mouse from cfg_input where serial='${ALX_SERIAL}'")   ALX_MOUSE=$(mysqldo "select mouse from cfg_input where serial='${ALX_SERIAL}'")
30     ALX_MOUSE_RESOLUTION=$(mysqldo "select mouse_resolution from cfg_input where serial='${ALX_SERIAL}'")
31   export ALX_MOUSE   export ALX_MOUSE
32  }  }
33    
34    config_display_manager()
35    {
36     # setup slim
37     cat ${ALX_SKELETONS}/slim/slim.conf > /etc/slim.conf
38     sed -i "s:@@USERNAME@@:${ALX_UNPRIV_USER}:" /etc/slim.conf
39    
40     # setup xession
41     sed -i "s:\(^GLOGIN=\).*:\1slim:" /etc/rc.config
42    
43     # windowmanager
44     echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc
45    }
46    
47    clearconfig()
48    {
49     local xfconfig="/etc/X11/xorg.conf"
50     :> ${xfconfig}
51    }
52    
53    addconfig()
54    {
55     local value="$@"
56     local xfconfig="/etc/X11/xorg.conf"
57    
58     echo "${value}" >> ${xfconfig}
59    }
60    
61  config_x11()  config_x11()
62  {  {
63   # get our settings from the db   # get our settings from the db
64   get_x11_settings   get_x11_settings
   
  local xserver  
  local xfconfig  
  local HAS_VNC  
  local HAS_REALVNC  
   
  # xfree or xorg ?  
  xserver="$(readlink /usr/X11R6/bin/X)"  
   
  case ${xserver} in  
  Xorg)  
  xfconfig=/etc/X11/xorg.conf  
  ;;  
  XFree86)  
  xfconfig=/etc/X11/XF86Config  
  ;;  
  *)  
  echo "    Unkown xserver. aborting."  
  exit 1  
  ;;  
  esac  
65    
66   # got we vnc support ?   # setup displaymanager
67   if [ -f /usr/X11R6/lib/modules/vnc.so ]   config_display_manager
  then  
  HAS_VNC="yes"  
  else  
  HAS_VNC="no"  
  fi  
68    
69   if [ -f /usr/X11R6/lib/modules/extensions/vnc.so ]   local xserver=Xorg
70     local HAS_TIGERVNC
71    
72     # got we vnc support ?
73     if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ]
74   then   then
75   HAS_REALVNC="yes"   HAS_TIGERVNC="yes"
76   else   else
77   HAS_REALVNC="no"   HAS_TIGERVNC="no"
78   fi   fi
79    
80   # show which server we use   # show which server we use
81   echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server "   echo -en ${COLOREDSTAR}"Configuring Xorg x11-server "
82    
83   # show if we have vnc   # show if we have vnc
84   if [[ ${HAS_VNC} = yes ]]   if [[ ${HAS_TIGERVNC} = yes ]]
85   then   then
86   echo "with vnc enabled ..."   echo "with tigervnc enabled ..."
  elif [[ ${HAS_REALVNC} = yes ]]  
  then  
  echo "with realvnc enabled ..."  
87   else   else
88   echo "..."   echo "..."
89   fi   fi
90    
91   # create a new clear xfconfig file   # create a new clear xfconfig file
92   echo '# Generated with hwdetect, part of Magellan-Linux initscripts.' > ${xfconfig}   clearconfig
93   echo '' >> ${xfconfig}   addconfig '# Generated with alxconfig-ng.'
94     addconfig
95    
96   # write modules   # write modules
97   echo '' >> ${xfconfig}   addconfig
98   echo 'Section "Module"' >> ${xfconfig}   addconfig 'Section "Module"'
99   echo '    Load        "dbe"' >> ${xfconfig}   addconfig '    Load        "dbe"'
100   echo '    SubSection  "extmod"' >> ${xfconfig}   addconfig '    SubSection  "extmod"'
101   echo '      Option    "omit xfree86-dga"' >> ${xfconfig}   addconfig '      Option    "omit xfree86-dga"'
102   echo '    EndSubSection' >> ${xfconfig}   addconfig '    EndSubSection'
103   echo '    Load        "type1"' >> ${xfconfig}   addconfig '    Load        "freetype"'
104   echo '    Load        "speedo"' >> ${xfconfig}   addconfig '#    Load       "glx"'
105   echo '    Load        "freetype"' >> ${xfconfig}   addconfig '    Load       "dri"'
  echo '#    Load        "xtt"' >> ${xfconfig}  
  echo '#    Load       "glx"' >> ${xfconfig}  
  echo '    Load       "dri"' >> ${xfconfig}  
106    
107   [[ ${HAS_VNC} = yes ]] && echo '    Load       "vnc"' >> ${xfconfig}   [[ ${HAS_TIGERVNC} = yes ]] && addconfig '    Load       "vnc"'
  [[ ${HAS_REALVNC} = yes ]] && echo '    Load       "vnc"' >> ${xfconfig}  
108    
109   echo 'EndSection' >> ${xfconfig}   addconfig 'EndSection'
110    
111   # fonts   # fonts
112   echo '' >> ${xfconfig}   addconfig
113   echo 'Section "Files"' >> ${xfconfig}   addconfig 'Section "Files"'
114   echo '    RgbPath "/usr/X11R6/lib/X11/rgb"' >> ${xfconfig}   # only add existing font pathes
115     [[ -f /usr/share/fonts/local/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/local/"'
116   case ${xserver} in   [[ -f /usr/share/fonts/misc/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/misc/"'
117   Xorg)   [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/75dpi/:unscaled"'
118   echo '    FontPath   "/usr/share/fonts/local/"' >> ${xfconfig}   [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/100dpi/:unscaled"'
119   echo '    FontPath   "/usr/share/fonts/misc/"' >> ${xfconfig}   [[ -f /usr/share/fonts/TrueType/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/TrueType/"'
120   echo '    FontPath   "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig}   [[ -f /usr/share/fonts/freefont/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/freefont/"'
121   echo '    FontPath   "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig}   [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/75dpi/"'
122   echo '    #prevents slow startup when disabled -> speedo, type1' >> ${xfconfig}   [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && addconfig '    FontPath   "/usr/share/fonts/100dpi/"'
123   echo '    #FontPath   "/usr/share/fonts/Speedo/"' >> ${xfconfig}   addconfig 'EndSection'
  echo '    #FontPath   "/usr/share/fonts/Type1/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/share/fonts/TrueType/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/share/fonts/freefont/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/share/fonts/75dpi/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/share/fonts/100dpi/"' >> ${xfconfig}  
  ;;  
  XFree86)  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"' >> ${xfconfig}  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"' >> ${xfconfig}  
  echo '    #prevents slow startup when disabled -> speedo, type1' >> ${xfconfig}  
  echo '    #FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"' >> ${xfconfig}  
  echo '    #FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/TrueType/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/freefont/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"' >> ${xfconfig}  
  ;;  
  esac  
   
  echo '#    ModulePath "/usr/X11R6/lib/modules"' >> ${xfconfig}  
  echo 'EndSection' >> ${xfconfig}  
124    
125   # server flags   # server flags
126   echo '' >> ${xfconfig}   addconfig
127   echo 'Section "ServerFlags"' >> ${xfconfig}   addconfig 'Section "ServerFlags"'
128   echo '#    Option "DontVTSwitch"' >> ${xfconfig}   addconfig '#    Option "DontVTSwitch"'
129   echo '#    Option "DontZap"' >> ${xfconfig}   addconfig '#    Option "DontZap"'
130   echo '#    Option "Dont Zoom"' >> ${xfconfig}   addconfig '#    Option "Dont Zoom"'
131   echo 'EndSection' >> ${xfconfig}   addconfig 'EndSection'
132    
133   # keyboard   # keyboard
134   echo '' >> ${xfconfig}   addconfig
135   echo 'Section "InputDevice"' >> ${xfconfig}   addconfig 'Section "InputDevice"'
136   echo '    Identifier "Keyboard1"' >> ${xfconfig}   addconfig '    Identifier "Keyboard1"'
137     addconfig '    Driver "kbd"'
138   case ${xserver} in   addconfig '    Option "AutoRepeat" "500 30"'
139   Xorg)   addconfig '#    Option "Xleds"      "1 2 3"'
140   echo '    Driver "kbd"' >> ${xfconfig}   addconfig '    Option "XkbRules" "xorg"'
141   ;;   addconfig '    Option "XkbModel" "pc105"'
142   XFree86)   addconfig '    Option "XkbLayout" "de"'
143   echo '    Driver "Keyboard"' >> ${xfconfig}   addconfig 'EndSection'
  ;;  
  esac  
   
  echo '    Option "AutoRepeat" "500 30"' >> ${xfconfig}  
  echo '#    Option "Xleds"      "1 2 3"' >> ${xfconfig}  
   
  case ${xserver} in  
  Xorg)  
  echo '    Option "XkbRules" "xorg"' >> ${xfconfig}  
  ;;  
  XFree86)  
  echo '    Option "XkbRules" "xfree86"' >> ${xfconfig}  
  ;;  
  esac  
   
  echo '    Option "XkbModel" "pc105"' >> ${xfconfig}  
  echo '    Option "XkbLayout" "de"' >> ${xfconfig}  
  echo 'EndSection' >> ${xfconfig}  
144    
145   # mouse   # mouse
146   echo '' >> ${xfconfig}   addconfig
147   echo 'Section "InputDevice"' >> ${xfconfig}   addconfig 'Section "InputDevice"'
148   echo '    Identifier "Mouse1"' >> ${xfconfig}   addconfig '    Identifier "Mouse1"'
149   echo '    Driver "mouse"' >> ${xfconfig}   addconfig '    Driver "mouse"'
150   echo "    Option \"Protocol\"    \"${ALX_MOUSE}\"" >> ${xfconfig}   addconfig "    Option \"Protocol\"    \"${ALX_MOUSE}\""
   
151   local device   local device
152   case ${ALX_MOUSE} in   case ${ALX_MOUSE} in
153   IMPS/2|PS/2) device=/dev/psaux;;   IMPS/2|PS/2) device=/dev/psaux;;
154   Auto) device=/dev/mouse;;   Auto) device=/dev/mouse;;
155   *) device=/dev/mouse;;   *) device=/dev/mouse;;
156   esac   esac
157   echo "    Option \"Device\"      \"${device}\"" >> ${xfconfig}   addconfig "    Option \"Device\"      \"${device}\""
158   echo '    Option "Resolution" "1200"' >> ${xfconfig}   [[ -z ${ALX_MOUSE_RESOLUTION} ]] && ALX_MOUSE_RESOLUTION="1200"
159     addconfig "    Option \"Resolution\" \"${ALX_MOUSE_RESOLUTION}\""
160   [[ ${ALX_MOUSE} = IMPS/2 ]] && echo '    Option "ZAxisMapping" "4 5"' >> ${xfconfig}   [[ ${ALX_MOUSE} = IMPS/2 ]] && addconfig '    Option "ZAxisMapping" "4 5"'
161     addconfig 'EndSection' >> ${xfconfig}
  echo 'EndSection' >> ${xfconfig}  
   
  # vnc keyboard && mouse  
  if [[ ${HAS_VNC} = yes ]]  
  then  
  echo '' >> ${xfconfig}  
  echo 'Section "InputDevice"' >> ${xfconfig}  
  echo '    Identifier "vncKeyboard"' >> ${xfconfig}  
  echo '    Driver "rfbkeyb"' >> ${xfconfig}  
  echo 'EndSection' >> ${xfconfig}  
   
  echo '' >> ${xfconfig}  
  echo 'Section "InputDevice"' >> ${xfconfig}  
  echo '    Identifier "vncMouse"' >> ${xfconfig}  
  echo '    Driver "rfbmouse"' >> ${xfconfig}  
  echo 'EndSection' >> ${xfconfig}  
  fi  
162    
163   # monitor   # monitor
164   if [ -x "/sbin/ddcxinfo-knoppix" ] &&   addconfig
165     [[ ${ALX_HSYNC} = auto ]] ||   addconfig 'Section "Monitor"'
166     [[ ${ALX_VREF} = auto ]]   addconfig '    Identifier  "Monitor0"'
167     addconfig '    Option      "DPMS"'
168    
169     # add hsync, vrefresh
170     if [[ -x /sbin/ddcxinfo-knoppix ]]
171     then
172     local hsync="$(ddcxinfo-knoppix -hsync)"
173     local vsync="$(ddcxinfo-knoppix -vsync)"
174     # fallback
175     [[ ${hsync} = 0-0 ]] && hsync="28-96"
176     [[ ${vsync} = 0-0 ]] && vsync="50-60"
177    
178     addconfig
179     addconfig "    HorizSync ${hsync}"
180     addconfig "    VertRefresh ${vsync}"
181     fi
182    
183     # add cvt modelines
184     addconfig
185     local cvt="/usr/X11R6/bin/cvt"
186     local modeline
187     modeline=$("${cvt}" "${ALX_RESOLUTION%x*}" "${ALX_RESOLUTION#*x}" "${ALX_REFRESH_RATE}" | sed -e 's:^:\t:g' -e 's:_.*\":\":')
188     addconfig "${modeline}"
189     # add ddcxinfo-knoppix modelines (fallback)
190     if [[ -x /sbin/ddcxinfo-knoppix ]]
191   then   then
192   ddcxinfo-knoppix -monitor >> ${xfconfig}   addconfig
193   else   addconfig $(ddcxinfo-knoppix -modelines)
  echo '' >> ${xfconfig}  
  echo "# Monitor: ${ALX_VENDOR} ${ALX_MODEL}" >> ${xfconfig}  
  echo 'Section "Monitor"' >> ${xfconfig}  
  echo '    Identifier  "Monitor0"' >> ${xfconfig}  
  echo "    HorizSync   ${ALX_HSYNC}" >> ${xfconfig}  
  echo "    VertRefresh ${ALX_VREF}" >> ${xfconfig}  
  echo '    Option      "DPMS"' >> ${xfconfig}  
  echo 'EndSection' >> ${xfconfig}  
194   fi   fi
195     addconfig 'EndSection'
196    
197   # vga   # vga
198   echo '' >> ${xfconfig}   addconfig
199   echo 'Section "Device"' >> ${xfconfig}   addconfig 'Section "Device"'
200   echo '    Identifier  "vga0"' >> ${xfconfig}   addconfig '    Identifier  "vga0"'
201   echo "    Driver      \"${ALX_MODULE}\"" >> ${xfconfig}   # check for openchrome and use it if available
202     if [[ ${ALX_MODULE} = via ]] && [ -f /usr/X11R6/lib/xorg/modules/drivers/openchrome_drv.so ]
  # vnc server options  
  if [[ ${HAS_VNC} = yes ]]  
203   then   then
204   echo '' >> ${xfconfig}   ALX_MODULE="openchrome"
  echo '    # rfb options' >> ${xfconfig}  
  echo '    Option "rfbauth"     "/root/.vnc/passwd"' >> ${xfconfig}  
  echo '    Option "rfbport"     "5900"' >> ${xfconfig}  
  echo '    #Option "nevershared"' >> ${xfconfig}  
  echo '    Option "alwaysshared"' >> ${xfconfig}  
  echo '    Option "dontdisconnect"' >> ${xfconfig}  
  echo '    Option "httpdir"     "/usr/share/vnc/classes"' >> ${xfconfig}  
  echo '    Option "httpport"    "5800"' >> ${xfconfig}  
  echo '    # Option "useraccept"' >> ${xfconfig}  
  echo '    Option "usevnc"' >> ${xfconfig}  
  echo '    # Option "localhost"' >> ${xfconfig}  
  echo '    # Option "interface" "192.168.0.1"' >> ${xfconfig}  
  echo '    # Option "viewonly"' >> ${xfconfig}  
  echo '    # Option "loginauth"' >> ${xfconfig}  
  echo '' >> ${xfconfig}  
205   fi   fi
206     addconfig "    Driver      \"${ALX_MODULE}\""
207   echo 'EndSection' >> ${xfconfig}   addconfig 'EndSection'
208    
209   # screens   # screens
210   echo '' >> ${xfconfig}   addconfig
211   echo 'Section "Screen"' >> ${xfconfig}   addconfig 'Section "Screen"'
212   echo '    Identifier  "Screen 1"' >> ${xfconfig}   addconfig '    Identifier  "Screen 1"'
213   echo '    Device      "vga0"' >> ${xfconfig}   addconfig '    Device      "vga0"'
214   echo '    Monitor     "Monitor0"' >> ${xfconfig}   addconfig '    Monitor     "Monitor0"'
215   echo "    DefaultDepth ${ALX_DEPTH}" >> ${xfconfig}   addconfig "    DefaultDepth ${ALX_DEPTH}"
216   echo '    Subsection "Display"' >> ${xfconfig}   addconfig '    Subsection "Display"'
217   echo "        Depth       ${ALX_DEPTH}" >> ${xfconfig}   addconfig "        Depth       ${ALX_DEPTH}"
218   echo "        Modes       \"${ALX_RESOLUTION}\"" >> ${xfconfig}   addconfig "        Modes       \"${ALX_RESOLUTION}\""
219   echo '        ViewPort    0 0' >> ${xfconfig}   addconfig '        ViewPort    0 0'
220   echo '    EndSubsection' >> ${xfconfig}   addconfig '    EndSubsection'
221     if [[ ${HAS_TIGERVNC} = yes ]]
222   if [[ ${HAS_REALVNC} = yes ]]   then
223   then   addconfig '    Option "SecurityTypes" "VncAuth"'
224   echo '    Option "SecurityTypes" "VncAuth"' >> ${xfconfig}   addconfig '    Option "UserPasswdVerifier" "VncAuth"'
225   echo '    Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig}   addconfig '    Option "PasswordFile" "/root/.vnc/passwd"'
  echo '    Option "PasswordFile" "/root/.vnc/passwd"' >> ${xfconfig}  
226   fi   fi
227   echo 'EndSection' >> ${xfconfig}   addconfig 'EndSection'
228    
229   # server layout   # server layout
230   echo '' >> ${xfconfig}   addconfig
231   echo 'Section "ServerLayout"' >> ${xfconfig}   addconfig 'Section "ServerLayout"' >> ${xfconfig}
232   echo '    Identifier  "Simple Layout"' >> ${xfconfig}   addconfig '    Identifier  "Simple Layout"' >> ${xfconfig}
233   echo '    Screen "Screen 1"' >> ${xfconfig}   addconfig '    Screen "Screen 1"' >> ${xfconfig}
234   echo '    InputDevice "Mouse1" "CorePointer"' >> ${xfconfig}   addconfig '    InputDevice "Mouse1" "CorePointer"' >> ${xfconfig}
235   echo '    InputDevice "Keyboard1" "CoreKeyboard"' >> ${xfconfig}   addconfig '    InputDevice "Keyboard1" "CoreKeyboard"' >> ${xfconfig}
236     addconfig 'EndSection' >> ${xfconfig}
237   # load vnc keyboard && mouse  
238   if [[ ${HAS_VNC} = yes ]]   # dri
239   then   addconfig
240   echo '    InputDevice "vncMouse"    "ExtraPointer"' >> ${xfconfig}   addconfig 'Section "DRI"' >> ${xfconfig}
241   echo '    InputDevice "vncKeyboard" "ExtraKeyboard"' >> ${xfconfig}   addconfig '    Mode 0666' >> ${xfconfig}
242   fi   addconfig 'EndSection' >> ${xfconfig}
   
  echo 'EndSection' >> ${xfconfig}  
   
  # dri (here disabled, use default of xserver)  
  echo '' >> ${xfconfig}  
  echo '# Section "DRI"' >> ${xfconfig}  
  echo '#    Mode 0666' >> ${xfconfig}  
  echo '# EndSection' >> ${xfconfig}  
243  }  }
   

Legend:
Removed from v.545  
changed lines
  Added in v.2004