--- alx-src/branches/alxconf_20060908/functions/config_x11.sh 2010/11/23 12:24:14 1582 +++ alx-src/branches/alxconf_20060908/functions/config_x11.sh 2010/12/08 11:39:17 1620 @@ -39,6 +39,7 @@ local xfconfig local HAS_VNC local HAS_REALVNC + local HAS_TIGERVNC # xfree or xorg ? xserver="$(readlink /usr/X11R6/bin/X)" @@ -64,6 +65,13 @@ HAS_REALVNC="no" fi + if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ] + then + HAS_TIGERVNC="yes" + else + HAS_TIGERVNC="no" + fi + # show which server we use echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server " @@ -74,6 +82,9 @@ elif [[ ${HAS_REALVNC} = yes ]] then echo "with realvnc enabled ..." + elif [[ ${HAS_TIGERVNC} = yes ]] + then + echo "with tigervnc enabled ..." else echo "..." fi @@ -95,6 +106,7 @@ [[ ${HAS_VNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} [[ ${HAS_REALVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} + [[ ${HAS_TIGERVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} echo 'EndSection' >> ${xfconfig} @@ -104,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} @@ -209,6 +222,11 @@ 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 @@ -247,7 +265,7 @@ echo ' ViewPort 0 0' >> ${xfconfig} echo ' EndSubsection' >> ${xfconfig} - if [[ ${HAS_REALVNC} = yes ]] + if [[ ${HAS_REALVNC} = yes ]] || [[ ${HAS_TIGERVNC} = yes ]] then echo ' Option "SecurityTypes" "VncAuth"' >> ${xfconfig} echo ' Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig}