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