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/trunk/alxconfig-ng/functions/config_x11.sh revision 221 by niro, Tue Mar 8 20:49:14 2005 UTC alx-src/branches/alxconf_20060908/functions/config_x11.sh revision 1620 by niro, Wed Dec 8 11:39:17 2010 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_x11.sh,v 1.3 2005-03-08 20:44:32 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_x11.sh,v 1.9 2005-10-09 21:31:54 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     # autodetect
8   # autodetect or not ?   all=$(mysqldo "select module,
9   if [ $(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \   resolution,
10   "select monitorid from cfg_graphic where serial='${ALX_SERIAL}") -gt 0 ]   depth,
11   then   refresh_rate
12   # settings from db   from cfg_graphic where serial='${ALX_SERIAL}'")
13    
14   all=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \   # split'em up and put 'em in an array
15   "select cfg_graphic.module,   declare -i i=0
16   cfg_graphic.resolution,   for x in ${all}
17   cfg_graphic.depth,   do
18   list_monitors.vendor,   DB_X11SETTINGS[${i}]="${x}"
19   list_monitors.model,   ((i++))
20   list_monitors.hsync,   done
21   list_monitors.vrefresh  
22   from list_monitors   # and now put them in usable var names and export them systemwide
23   inner join cfg_graphic   export ALX_MODULE="${DB_X11SETTINGS[0]:=NULL}"
24   on cfg_graphic.monitorid=list_monitors.id   export ALX_RESOLUTION="${DB_X11SETTINGS[1]:=NULL}"
25   and cfg_graphic.serial='${ALX_SERIAL}';")   export ALX_DEPTH="${DB_X11SETTINGS[2]:=NULL}"
26     export ALX_REFRESH_RATE="${DB_X11SETTINGS[3]:=NULL}"
  echo "DEBUG: ${all}"  
   
  #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="${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=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \  
  "select module,  
  resolution,  
  depth  
  from cfg_graphic where serial='${ALX_SERIAL}'")  
   
  echo "DEBUG: ${all}"  
   
  #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=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \   ALX_MOUSE=$(mysqldo "select mouse from cfg_input where serial='${ALX_SERIAL}'")
  "select mouse from cfg_input where serial='${ALX_SERIAL}'")  
30   export ALX_MOUSE   export ALX_MOUSE
31  }  }
32    
33  write_x11_config() {  config_x11()
34    {
35   # get our settings from the db   # get our settings from the db
36   get_x11_settings   get_x11_settings
37    
  # DEBUG  
  echo "MODULE:     '${ALX_MODULE}'"  
  echo "RESOLUTION: '${ALX_RESOLUTION}'"  
  echo "DEPTH:      '${ALX_DEPTH=}'"  
  echo "VENDOR:     '${ALX_VENDOR}'"  
  echo "MODEL:      '${ALX_MODEL}'"  
  echo "HSYNC:      '${ALX_HSYNC}'"  
  echo "VREF:       '${ALX_VREF}'"  
  echo "MOUSE:      '${ALX_MOUSE}'"  
   
38   local xserver   local xserver
39   local xfconfig   local xfconfig
40   local HAS_VNC   local HAS_VNC
41     local HAS_REALVNC
42     local HAS_TIGERVNC
43    
44   #xfree or xorg ?   # xfree or xorg ?
45   xserver="$(readlink /usr/X11R6/bin/X)"   xserver="$(readlink /usr/X11R6/bin/X)"
46    
47   case ${xserver} in   case ${xserver} in
48   Xorg)   Xorg) xfconfig=/etc/X11/xorg.conf ;;
49   xfconfig=/etc/X11/xorg.conf   XFree86) xfconfig=/etc/X11/XF86Config ;;
50   ;;   *) echo "    Unkown xserver. aborting."; exit 1 ;;
  XFree86)  
  xfconfig=/etc/X11/XF86Config  
  ;;  
  *)  
  echo "    Unkown xserver. aborting."  
  exit 1  
  ;;  
51   esac   esac
52    
53   #got we vnc support ?   # got we vnc support ?
54   if [ -f /usr/X11R6/lib/modules/vnc.so ]   if [ -f /usr/X11R6/lib/modules/vnc.so ]
55   then   then
56   HAS_VNC="yes"   HAS_VNC="yes"
# Line 119  write_x11_config() { Line 58  write_x11_config() {
58   HAS_VNC="no"   HAS_VNC="no"
59   fi   fi
60    
61   #show which server we use   if [ -f /usr/X11R6/lib/modules/extensions/vnc.so ]
62     then
63     HAS_REALVNC="yes"
64     else
65     HAS_REALVNC="no"
66     fi
67    
68     if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ]
69     then
70     HAS_TIGERVNC="yes"
71     else
72     HAS_TIGERVNC="no"
73     fi
74    
75     # show which server we use
76   echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server "   echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server "
77    
78   #show if we have vnc   # show if we have vnc
79   if [ "${HAS_VNC}" = "yes" ]   if [[ ${HAS_VNC} = yes ]]
80   then   then
81   echo "with vnc enabled ..."   echo "with vnc enabled ..."
82     elif [[ ${HAS_REALVNC} = yes ]]
83     then
84     echo "with realvnc enabled ..."
85     elif [[ ${HAS_TIGERVNC} = yes ]]
86     then
87     echo "with tigervnc enabled ..."
88   else   else
89   echo "..."   echo "..."
90   fi   fi
91    
92   #create a new clear xfconfig file   # create a new clear xfconfig file
93   echo '# Generated with hwdetect, part of Magellan-Linux initscripts.' > ${xfconfig}   echo '# Generated with alxconfig-ng.' > ${xfconfig}
94   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
95    
96   #write modules   # write modules
97   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
98   echo 'Section "Module"' >> ${xfconfig}   echo 'Section "Module"' >> ${xfconfig}
99   echo '    Load        "dbe"' >> ${xfconfig}   echo '    Load        "dbe"' >> ${xfconfig}
100   echo '    SubSection  "extmod"' >> ${xfconfig}   echo '    SubSection  "extmod"' >> ${xfconfig}
101   echo '      Option    "omit xfree86-dga"' >> ${xfconfig}   echo '      Option    "omit xfree86-dga"' >> ${xfconfig}
102   echo '    EndSubSection' >> ${xfconfig}   echo '    EndSubSection' >> ${xfconfig}
  echo '    Load        "type1"' >> ${xfconfig}  
  echo '    Load        "speedo"' >> ${xfconfig}  
103   echo '    Load        "freetype"' >> ${xfconfig}   echo '    Load        "freetype"' >> ${xfconfig}
  echo '#    Load        "xtt"' >> ${xfconfig}  
104   echo '#    Load       "glx"' >> ${xfconfig}   echo '#    Load       "glx"' >> ${xfconfig}
105   echo '    Load       "dri"' >> ${xfconfig}   echo '    Load       "dri"' >> ${xfconfig}
106    
107   [ "${HAS_VNC}" = "yes" ] && echo '    Load       "vnc"' >> ${xfconfig}   [[ ${HAS_VNC} = yes ]] && echo '    Load       "vnc"' >> ${xfconfig}
108     [[ ${HAS_REALVNC} = yes ]] && echo '    Load       "vnc"' >> ${xfconfig}
109     [[ ${HAS_TIGERVNC} = yes ]] && echo '    Load       "vnc"' >> ${xfconfig}
110    
111   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
112    
113   #fonts   # fonts
114   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
115   echo 'Section "Files"' >> ${xfconfig}   echo 'Section "Files"' >> ${xfconfig}
  echo '    RgbPath "/usr/X11R6/lib/X11/rgb"' >> ${xfconfig}  
116    
117   case ${xserver} in   case ${xserver} in
118   Xorg)   Xorg)
119   echo '    FontPath   "/usr/share/fonts/local/"' >> ${xfconfig}   # only add existing font pathes
120   echo '    FontPath   "/usr/share/fonts/misc/"' >> ${xfconfig}   [[ -f /usr/share/fonts/local/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/local/"' >> ${xfconfig}
121   echo '    FontPath   "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig}   [[ -f /usr/share/fonts/misc/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/misc/"' >> ${xfconfig}
122   echo '    FontPath   "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig}   [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig}
123   echo '    #prevents slow startup when disabled -> speedo, type1' >> ${xfconfig}   [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig}
124   echo '    #FontPath   "/usr/share/fonts/Speedo/"' >> ${xfconfig}   [[ -f /usr/share/fonts/TrueType/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/TrueType/"' >> ${xfconfig}
125   echo '    #FontPath   "/usr/share/fonts/Type1/"' >> ${xfconfig}   [[ -f /usr/share/fonts/freefont/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/freefont/"' >> ${xfconfig}
126   echo '    FontPath   "/usr/share/fonts/TrueType/"' >> ${xfconfig}   [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/75dpi/"' >> ${xfconfig}
127   echo '    FontPath   "/usr/share/fonts/freefont/"' >> ${xfconfig}   [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/100dpi/"' >> ${xfconfig}
  echo '    FontPath   "/usr/share/fonts/75dpi/"' >> ${xfconfig}  
  echo '    FontPath   "/usr/share/fonts/100dpi/"' >> ${xfconfig}  
128   ;;   ;;
129   XFree86)   XFree86)
130   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig}   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig}
131   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"' >> ${xfconfig}   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"' >> ${xfconfig}
132   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"' >> ${xfconfig}   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"' >> ${xfconfig}
133   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/: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}  
134   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/TrueType/"' >> ${xfconfig}   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/TrueType/"' >> ${xfconfig}
135   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/freefont/"' >> ${xfconfig}   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/freefont/"' >> ${xfconfig}
136   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"' >> ${xfconfig}   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"' >> ${xfconfig}
# Line 186  write_x11_config() { Line 138  write_x11_config() {
138   ;;   ;;
139   esac   esac
140    
  echo '#    ModulePath "/usr/X11R6/lib/modules"' >> ${xfconfig}  
141   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
142    
143   #server flags   # server flags
144   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
145   echo 'Section "ServerFlags"' >> ${xfconfig}   echo 'Section "ServerFlags"' >> ${xfconfig}
146   echo '#    Option "DontVTSwitch"' >> ${xfconfig}   echo '#    Option "DontVTSwitch"' >> ${xfconfig}
# Line 197  write_x11_config() { Line 148  write_x11_config() {
148   echo '#    Option "Dont Zoom"' >> ${xfconfig}   echo '#    Option "Dont Zoom"' >> ${xfconfig}
149   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
150    
151   #keyboard   # keyboard
152   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
153   echo 'Section "InputDevice"' >> ${xfconfig}   echo 'Section "InputDevice"' >> ${xfconfig}
154   echo '    Identifier "Keyboard1"' >> ${xfconfig}   echo '    Identifier "Keyboard1"' >> ${xfconfig}
155    
156   case ${xserver} in   case ${xserver} in
157   Xorg)   Xorg) echo '    Driver "kbd"' >> ${xfconfig} ;;
158   echo '    Driver "kbd"' >> ${xfconfig}   XFree86) echo '    Driver "Keyboard"' >> ${xfconfig} ;;
  ;;  
  XFree86)  
  echo '    Driver "Keyboard"' >> ${xfconfig}  
  ;;  
159   esac   esac
160    
161   echo '    Option "AutoRepeat" "500 30"' >> ${xfconfig}   echo '    Option "AutoRepeat" "500 30"' >> ${xfconfig}
162   echo '#    Option "Xleds"      "1 2 3"' >> ${xfconfig}   echo '#    Option "Xleds"      "1 2 3"' >> ${xfconfig}
163    
164   case ${xserver} in   case ${xserver} in
165   Xorg)   Xorg) echo '    Option "XkbRules" "xorg"' >> ${xfconfig} ;;
166   echo '    Option "XkbRules" "xorg"' >> ${xfconfig}   XFree86) echo '    Option "XkbRules" "xfree86"' >> ${xfconfig} ;;
  ;;  
  XFree86)  
  echo '    Option "XkbRules" "xfree86"' >> ${xfconfig}  
  ;;  
167   esac   esac
168    
169   echo '    Option "XkbModel" "pc104"' >> ${xfconfig}   echo '    Option "XkbModel" "pc105"' >> ${xfconfig}
170   echo '    Option "XkbLayout" "de"' >> ${xfconfig}   echo '    Option "XkbLayout" "de"' >> ${xfconfig}
171   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
172    
173   #mouse   # mouse
174   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
175   echo 'Section "InputDevice"' >> ${xfconfig}   echo 'Section "InputDevice"' >> ${xfconfig}
176   echo '    Identifier "Mouse1"' >> ${xfconfig}   echo '    Identifier "Mouse1"' >> ${xfconfig}
# Line 240  write_x11_config() { Line 183  write_x11_config() {
183   Auto) device=/dev/mouse;;   Auto) device=/dev/mouse;;
184   *) device=/dev/mouse;;   *) device=/dev/mouse;;
185   esac   esac
186     echo "    Option \"Device\"      \"${device}\"" >> ${xfconfig}
187   echo '    Option "Resolution" "1200"' >> ${xfconfig}   echo '    Option "Resolution" "1200"' >> ${xfconfig}
188    
189   [ "${ALX_MOUSE}" = "IMPS/2" ] && echo '    Option "ZAxisMapping" "4 5"' >> ${xfconfig}   [[ ${ALX_MOUSE} = IMPS/2 ]] && echo '    Option "ZAxisMapping" "4 5"' >> ${xfconfig}
190    
191   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
192    
193   #vnc keyboard && mouse   # vnc keyboard && mouse
194   if [ "${HAS_VNC}" = "yes" ]   if [[ ${HAS_VNC} = yes ]]
195   then   then
196   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
197   echo 'Section "InputDevice"' >> ${xfconfig}   echo 'Section "InputDevice"' >> ${xfconfig}
# Line 263  write_x11_config() { Line 206  write_x11_config() {
206   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
207   fi   fi
208    
209     # monitor
210     echo 'Section "Monitor"' >> ${xfconfig}
211     echo '    Identifier  "Monitor0"' >> ${xfconfig}
212     echo '    Option      "DPMS"' >> ${xfconfig}
213     echo '' >> ${xfconfig}
214     # add cvt modelines
215     local cvt="/usr/X11R6/bin/cvt"
216     local modeline
217     modeline=$("${cvt}" "${ALX_RESOLUTION%x*}" "${ALX_RESOLUTION#*x}" "${ALX_REFRESH_RATE}" | sed -e 's:^:\t:g' -e 's:_.*\":\":')
218     echo "${modeline}" >> ${xfconfig}
219     echo 'EndSection' >> ${xfconfig}
220    
221   #monitor   # vga
  if [ -x "/sbin/ddcxinfo-knoppix" ] &&  
    [ "${ALX_HSYNC}" = "auto" ] ||  
    [ "${ALX_VREF}" = "auto" ]  
  then  
  ddcxinfo-knoppix -monitor >> ${xfconfig}  
  else  
  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}  
  fi  
   
  #vga  
222   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
223   echo 'Section "Device"' >> ${xfconfig}   echo 'Section "Device"' >> ${xfconfig}
224   echo '    Identifier  "vga0"' >> ${xfconfig}   echo '    Identifier  "vga0"' >> ${xfconfig}
225     # check for openchrome and use it if available
226     if [[ ${ALX_MODULE} = via ]] && [ -f /usr/X11R6/lib/xorg/modules/drivers/openchrome_drv.so ]
227     then
228     ALX_MODULE="openchrome"
229     fi
230   echo "    Driver      \"${ALX_MODULE}\"" >> ${xfconfig}   echo "    Driver      \"${ALX_MODULE}\"" >> ${xfconfig}
231    
232   #vnc server options   # vnc server options
233   if [ "${HAS_VNC}" = "yes" ]   if [[ ${HAS_VNC} = yes ]]
234   then   then
235   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
236   echo '    # rfb options' >> ${xfconfig}   echo '    # rfb options' >> ${xfconfig}
# Line 310  write_x11_config() { Line 252  write_x11_config() {
252    
253   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
254    
255   #screens   # screens
256   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
257   echo 'Section "Screen"' >> ${xfconfig}   echo 'Section "Screen"' >> ${xfconfig}
258   echo '    Identifier  "Screen 1"' >> ${xfconfig}   echo '    Identifier  "Screen 1"' >> ${xfconfig}
# Line 322  write_x11_config() { Line 264  write_x11_config() {
264   echo "        Modes       \"${ALX_RESOLUTION}\"" >> ${xfconfig}   echo "        Modes       \"${ALX_RESOLUTION}\"" >> ${xfconfig}
265   echo '        ViewPort    0 0' >> ${xfconfig}   echo '        ViewPort    0 0' >> ${xfconfig}
266   echo '    EndSubsection' >> ${xfconfig}   echo '    EndSubsection' >> ${xfconfig}
267    
268     if [[ ${HAS_REALVNC} = yes ]] || [[ ${HAS_TIGERVNC} = yes ]]
269     then
270     echo '    Option "SecurityTypes" "VncAuth"' >> ${xfconfig}
271     echo '    Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig}
272     echo '    Option "PasswordFile" "/root/.vnc/passwd"' >> ${xfconfig}
273     fi
274   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
275    
276   #server layout   # server layout
277   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
278   echo 'Section "ServerLayout"' >> ${xfconfig}   echo 'Section "ServerLayout"' >> ${xfconfig}
279   echo '    Identifier  "Simple Layout"' >> ${xfconfig}   echo '    Identifier  "Simple Layout"' >> ${xfconfig}
# Line 332  write_x11_config() { Line 281  write_x11_config() {
281   echo '    InputDevice "Mouse1" "CorePointer"' >> ${xfconfig}   echo '    InputDevice "Mouse1" "CorePointer"' >> ${xfconfig}
282   echo '    InputDevice "Keyboard1" "CoreKeyboard"' >> ${xfconfig}   echo '    InputDevice "Keyboard1" "CoreKeyboard"' >> ${xfconfig}
283    
284   #load vnc keyboard && mouse   # load vnc keyboard && mouse
285   if [ "${HAS_VNC}" = "yes" ]   if [[ ${HAS_VNC} = yes ]]
286   then   then
287   echo '    InputDevice "vncMouse"    "ExtraPointer"' >> ${xfconfig}   echo '    InputDevice "vncMouse"    "ExtraPointer"' >> ${xfconfig}
288   echo '    InputDevice "vncKeyboard" "ExtraKeyboard"' >> ${xfconfig}   echo '    InputDevice "vncKeyboard" "ExtraKeyboard"' >> ${xfconfig}
# Line 341  write_x11_config() { Line 290  write_x11_config() {
290    
291   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
292    
293   #dri (here disabled, use default of xserver)   # dri
294   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
295   echo '# Section "DRI"' >> ${xfconfig}   echo 'Section "DRI"' >> ${xfconfig}
296   echo '#    Mode 0666' >> ${xfconfig}   echo '    Mode 0666' >> ${xfconfig}
297   echo '# EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
298  }  }
299    

Legend:
Removed from v.221  
changed lines
  Added in v.1620