Magellan Linux

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

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

revision 1587 by niro, Fri Nov 26 10:41:45 2010 UTC revision 1710 by niro, Tue Jan 25 00:32:15 2011 UTC
# Line 30  get_x11_settings() Line 30  get_x11_settings()
30   export ALX_MOUSE   export ALX_MOUSE
31  }  }
32    
33    config_display_manager()
34    {
35     # setup slim
36     cat ${ALX_SKELETONS}/slim/slim.conf > /etc/slim.conf
37     sed -i "s:@@USERNAME@@:${ALX_UNPRIV_USER}:" /etc/slim.conf
38    
39     # setup xession
40     sed -i "s:\(^GLOGIN=\).*:\1slim:" /etc/rc.config
41    
42     # windowmanager
43     echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc
44    }
45    
46  config_x11()  config_x11()
47  {  {
48   # get our settings from the db   # get our settings from the db
49   get_x11_settings   get_x11_settings
50    
51     # setup displaymanager
52     config_display_manager
53    
54   local xserver   local xserver
55   local xfconfig   local xfconfig
56   local HAS_VNC   local HAS_VNC
# Line 65  config_x11() Line 81  config_x11()
81   HAS_REALVNC="no"   HAS_REALVNC="no"
82   fi   fi
83    
84   if [ -f /usr/X11R6/lib/modules/extensions/libvnc.so ]   if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ]
85   then   then
86   HAS_TIGERVNC="yes"   HAS_TIGERVNC="yes"
87   else   else
# Line 116  config_x11() Line 132  config_x11()
132    
133   case ${xserver} in   case ${xserver} in
134   Xorg)   Xorg)
135   echo '    FontPath   "/usr/share/fonts/local/"' >> ${xfconfig}   # only add existing font pathes
136   echo '    FontPath   "/usr/share/fonts/misc/"' >> ${xfconfig}   [[ -f /usr/share/fonts/local/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/local/"' >> ${xfconfig}
137   echo '    FontPath   "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig}   [[ -f /usr/share/fonts/misc/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/misc/"' >> ${xfconfig}
138   echo '    FontPath   "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig}   [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig}
139   echo '    FontPath   "/usr/share/fonts/TrueType/"' >> ${xfconfig}   [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig}
140   echo '    FontPath   "/usr/share/fonts/freefont/"' >> ${xfconfig}   [[ -f /usr/share/fonts/TrueType/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/TrueType/"' >> ${xfconfig}
141   echo '    FontPath   "/usr/share/fonts/75dpi/"' >> ${xfconfig}   [[ -f /usr/share/fonts/freefont/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/freefont/"' >> ${xfconfig}
142   echo '    FontPath   "/usr/share/fonts/100dpi/"' >> ${xfconfig}   [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/75dpi/"' >> ${xfconfig}
143     [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo '    FontPath   "/usr/share/fonts/100dpi/"' >> ${xfconfig}
144   ;;   ;;
145   XFree86)   XFree86)
146   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig}   echo '    FontPath   "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig}
# Line 206  config_x11() Line 223  config_x11()
223   fi   fi
224    
225   # monitor   # monitor
226     echo '' >> ${xfconfig}
227   echo 'Section "Monitor"' >> ${xfconfig}   echo 'Section "Monitor"' >> ${xfconfig}
228   echo '    Identifier  "Monitor0"' >> ${xfconfig}   echo '    Identifier  "Monitor0"' >> ${xfconfig}
229   echo '    Option      "DPMS"' >> ${xfconfig}   echo '    Option      "DPMS"' >> ${xfconfig}
230   echo '' >> ${xfconfig}  
231     # add hsync, vrefresh
232     if [[ -x /sbin/ddcxinfo-knoppix ]]
233     then
234     local hsync="$(ddcxinfo-knoppix -hsync)"
235     local vsync="$(ddcxinfo-knoppix -vsync)"
236     # fallback
237     [[ ${hsync} = 0-0 ]] && hsync="28-96"
238     [[ ${vsync} = 0-0 ]] && vsync="50-60"
239    
240     echo '' >> ${xfconfig}
241     echo "    HorizSync ${hsync}"  >> ${xfconfig}
242     echo "    VertRefresh ${vsync}"  >> ${xfconfig}
243     fi
244    
245   # add cvt modelines   # add cvt modelines
246     echo '' >> ${xfconfig}
247   local cvt="/usr/X11R6/bin/cvt"   local cvt="/usr/X11R6/bin/cvt"
248   local modeline   local modeline
249   modeline=$("${cvt}" "${ALX_RESOLUTION%x*}" "${ALX_RESOLUTION#*x}" "${ALX_REFRESH_RATE}" | sed -e 's:^:\t:g' -e 's:_.*\":\":')   modeline=$("${cvt}" "${ALX_RESOLUTION%x*}" "${ALX_RESOLUTION#*x}" "${ALX_REFRESH_RATE}" | sed -e 's:^:\t:g' -e 's:_.*\":\":')
250   echo "${modeline}" >> ${xfconfig}   echo "${modeline}" >> ${xfconfig}
251     # add ddcxinfo-knoppix modelines (fallback)
252     if [[ -x /sbin/ddcxinfo-knoppix ]]
253     then
254     echo '' >> ${xfconfig}
255     ddcxinfo-knoppix -modelines >> ${xfconfig}
256     fi
257   echo 'EndSection' >> ${xfconfig}   echo 'EndSection' >> ${xfconfig}
258    
259   # vga   # vga
260   echo '' >> ${xfconfig}   echo '' >> ${xfconfig}
261   echo 'Section "Device"' >> ${xfconfig}   echo 'Section "Device"' >> ${xfconfig}
262   echo '    Identifier  "vga0"' >> ${xfconfig}   echo '    Identifier  "vga0"' >> ${xfconfig}
263     # check for openchrome and use it if available
264     if [[ ${ALX_MODULE} = via ]] && [ -f /usr/X11R6/lib/xorg/modules/drivers/openchrome_drv.so ]
265     then
266     ALX_MODULE="openchrome"
267     fi
268   echo "    Driver      \"${ALX_MODULE}\"" >> ${xfconfig}   echo "    Driver      \"${ALX_MODULE}\"" >> ${xfconfig}
269    
270   # vnc server options   # vnc server options

Legend:
Removed from v.1587  
changed lines
  Added in v.1710