PMbwmon bandwidth monitor: can specify which interfaces to watch, also supporting...
[hband-tools.git] / xwin-tools / Xaskpass
blob40b867bfb7917203730ac3088f8be873d0d5d6d7
1 #!/bin/sh
3 prompt="Enter password:"
4 if [ -n "$1" ]
5 then
6 prompt="$*"
7 # Strip ANSI color codes
8 prompt=$(echo "$prompt" | sed -e 's/\x1b[^m]*m//g')
9 fi
11 if type zenity >/dev/null 2>&1
12 then
13 zenity --title "sudo" --entry --text "$prompt" --entry-text '' --hide-text
14 else
15 Xdialog --stdout --title "sudo" --passwordbox "$prompt" 0 0