--- magellan-initscripts-hwdetect-applied/etc/rc.d/init.d/hwdetect 2010-11-26 10:51:35.000000000 +0100 +++ magellan-initscripts-alx/etc/rc.d/init.d/hwdetect 2010-11-26 10:49:04.000000000 +0100 @@ -30,6 +30,8 @@ local xserver local xfconfig local HAS_VNC + local HAS_REALVNC + local HAS_TIGERVNC # xfree or xorg ? xserver="$(readlink /usr/X11R6/bin/X)" @@ -49,6 +51,20 @@ HAS_VNC="no" fi + if [ -f /usr/X11R6/lib/modules/extensions/vnc.so ] + then + HAS_REALVNC="yes" + else + 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 xserver we going to use echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server " @@ -56,6 +72,12 @@ if [[ ${HAS_VNC} = yes ]] then echo "with vnc enabled ..." + elif [[ ${HAS_REALVNC} = yes ]] + then + echo "with realvnc enabled ..." + elif [[ ${HAS_TIGERVNC} = yes ]] + then + echo "with tigervnc enabled ..." else echo "..." fi @@ -77,6 +99,8 @@ echo ' Load "dri"' >> ${xfconfig} [[ ${HAS_VNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} + [[ ${HAS_REALVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} + [[ ${HAS_TIGERVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} echo 'EndSection' >> ${xfconfig} @@ -334,6 +358,13 @@ echo ' Modes "1024x768"' >> ${xfconfig} echo ' ViewPort 0 0' >> ${xfconfig} echo ' EndSubsection' >> ${xfconfig} + + if [[ ${HAS_REALVNC} = yes ]] || [[ ${HAS_TIGERVNC} = yes ]] + then + echo ' Option "SecurityTypes" "VncAuth"' >> ${xfconfig} + echo ' Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig} + echo ' Option "PasswordFile" "/root/.vnc/passwd"' >> ${xfconfig} + fi echo 'EndSection' >> ${xfconfig}