diff --git a/xCAT-client/share/xcat/rvid/rvid.kvm b/xCAT-client/share/xcat/rvid/rvid.kvm index 61853f4b5..1c7317e1e 100755 --- a/xCAT-client/share/xcat/rvid/rvid.kvm +++ b/xCAT-client/share/xcat/rvid/rvid.kvm @@ -17,9 +17,16 @@ 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 -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 & + #tightvnc is used for suse, but tigervnc is used for rh + istigervnc=`vncviewer -help 2>&1 | grep -i tigervnc` + if [ "x$istigervnc" == "x" ]; then + vncpasswd.arg /tmp/rvidpass.$$ $rvid_password > /dev/null + vncviewer $rvid_server:$myport -passwd /tmp/rvidpass.$$ >& /dev/null & + else + 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 & + fi sleep 2.0 flock -u 200 rm /tmp/rvidpass.$$