--- mcore-src/trunk/mcore-tools/daemon/client/include/vnc.client.class 2011/02/02 20:20:24 1248 +++ mcore-src/trunk/mcore-tools/daemon/client/include/vnc.client.class 2011/02/04 20:06:54 1263 @@ -1,6 +1,7 @@ # $Id$ provide x0vnc +require basic-video help_vnc_enable() { @@ -17,25 +18,41 @@ help_vnc_passwd() { mecho "set vnc.passwd [password]" - mecho " sets given password for X0 display vnc." + mecho " Sets given password for X0 display vnc." } set_vnc_enable() { - local CONFIG="/etc/X11/xorg.conf.d/25-vnc.conf" + # add to module section + local CONFIG="${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf" clearconfig - - addconfig 'Section "Module"' addconfig ' Load "vnc"' - addconfig 'EndSection' + + # add to screen section + local CONFIG="${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf" + clearconfig + addconfig ' Option "SecurityTypes" "VncAuth"' + addconfig ' Option "UserPasswdVerifier" "VncAuth"' + addconfig ' Option "PasswordFile" "/root/.vncpasswd"' + + # requires graphic! + helper_graphic_rebuild_xorg_conf_d + + mecho "Done but X11 restart required!" } set_vnc_disable() { - if [[ -f /etc/X11/xorg.conf.d/25-vnc.conf ]] - then - rm /etc/X11/xorg.conf.d/25-vnc.conf - fi + local CONFIG="${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf" + clearconfig + + local CONFIG="${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf" + clearconfig + + # requires graphic! + helper_graphic_rebuild_xorg_conf_d + + mecho "Done but X11 restart required!" } set_vnc_passwd()