Home | History | Annotate | Download | only in misc
      1 #!/bin/sh
      2 # usage: x11vnc_pw [file]  (default: ~/.vnc/passwd)
      3 
      4 if [ "X$1" = "X" ]; then
      5 	file=$HOME/.vnc/passwd
      6 else
      7 	file=$1
      8 fi
      9 
     10 stty -echo
     11 printf "Password: "
     12 read pw1; echo ""
     13 printf "Verify:   "
     14 read pw2; echo ""
     15 stty  echo
     16 
     17 if [ "X$pw1" != "X$pw2" ]; then
     18 	echo "passwords do not match."
     19 	exit 1
     20 fi
     21 
     22 x11vnc -help > /dev/null 2>&1
     23 x11vnc -storepasswd "$pw1" "$file"
     24 ls -l "$file"
     25