--- alx-src/branches/alxconf_20060908/functions/config_x11.sh 2010/12/01 21:52:36 1589 +++ alx-src/branches/alxconf_20060908/functions/config_x11.sh 2010/12/30 13:43:24 1647 @@ -116,14 +116,15 @@ case ${xserver} in Xorg) - echo ' FontPath "/usr/share/fonts/local/"' >> ${xfconfig} - echo ' FontPath "/usr/share/fonts/misc/"' >> ${xfconfig} - echo ' FontPath "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig} - echo ' FontPath "/usr/share/fonts/100dpi/:unscaled"' >> ${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} + # only add existing font pathes + [[ -f /usr/share/fonts/local/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/local/"' >> ${xfconfig} + [[ -f /usr/share/fonts/misc/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/misc/"' >> ${xfconfig} + [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig} + [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig} + [[ -f /usr/share/fonts/TrueType/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/TrueType/"' >> ${xfconfig} + [[ -f /usr/share/fonts/freefont/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/freefont/"' >> ${xfconfig} + [[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/75dpi/"' >> ${xfconfig} + [[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/100dpi/"' >> ${xfconfig} ;; XFree86) echo ' FontPath "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig} @@ -206,21 +207,42 @@ fi # monitor + echo '' >> ${xfconfig} echo 'Section "Monitor"' >> ${xfconfig} echo ' Identifier "Monitor0"' >> ${xfconfig} echo ' Option "DPMS"' >> ${xfconfig} - echo '' >> ${xfconfig} + + # add hsync, vrefresh + if [[ -x /sbin/ddcxinfo-knoppix ]] + then + echo '' >> ${xfconfig} + echo " HorizSync $(ddcxinfo-knoppix -hsync)" >> ${xfconfig} + echo " VertRefresh $(ddcxinfo-knoppix -vsync)" >> ${xfconfig} + fi + # add cvt modelines + echo '' >> ${xfconfig} local cvt="/usr/X11R6/bin/cvt" local modeline modeline=$("${cvt}" "${ALX_RESOLUTION%x*}" "${ALX_RESOLUTION#*x}" "${ALX_REFRESH_RATE}" | sed -e 's:^:\t:g' -e 's:_.*\":\":') echo "${modeline}" >> ${xfconfig} + # add ddcxinfo-knoppix modelines (fallback) + if [[ -x /sbin/ddcxinfo-knoppix ]] + then + echo '' >> ${xfconfig} + ddcxinfo-knoppix -modelines >> ${xfconfig} + fi echo 'EndSection' >> ${xfconfig} # vga echo '' >> ${xfconfig} echo 'Section "Device"' >> ${xfconfig} echo ' Identifier "vga0"' >> ${xfconfig} + # check for openchrome and use it if available + if [[ ${ALX_MODULE} = via ]] && [ -f /usr/X11R6/lib/xorg/modules/drivers/openchrome_drv.so ] + then + ALX_MODULE="openchrome" + fi echo " Driver \"${ALX_MODULE}\"" >> ${xfconfig} # vnc server options