diff --git a/xCAT-client/share/xcat/rvid/rvid.kvm b/xCAT-client/share/xcat/rvid/rvid.kvm index 4aebabe1e..8a021bcef 100755 --- a/xCAT-client/share/xcat/rvid/rvid.kvm +++ b/xCAT-client/share/xcat/rvid/rvid.kvm @@ -13,9 +13,12 @@ if [ $rvid_vidproto = "vnc" ];then export VNC_VIA_CMD='/usr/bin/ssh -o BatchMode=yes -f -L "$L":"$H":"$R" "$G" sleep 20' ( flock 200 - echo $rvid_password|vncviewer :$myport -via $rvid_server AutoSelect=0 FullColor=1 passwdInput=1 >& /dev/null & + echo -e "$rvid_password\n$rvid_password"|vncpasswd /tmp/rvidpass.$$ > /dev/null + #echo $rvid_password|vncviewer :$myport -via $rvid_server AutoSelect=0 FullColor=1 passwdInput=1 >& /dev/null & + vncviewer $rvid_server:$myport AutoSelect=0 FullColor=1 passwd=/tmp/rvidpass.$$ >& /dev/null & sleep 0.2 flock -u 200 + rm /tmp/rvidpass.$$ ) 200> /tmp/xcat/virtvnclock elif [ $rvid_vidproto = "spice" ]; then SPICEC="/usr/bin/spicec"