+ check4progs vlock sudo chpasswd dialog || { echo "Sorry, necessary tools missing - can not continue. Exiting.">&2 ; exit 1 ; }
+fi
+
+PWD_TEXT1="Set password (hidden typing):"
+PWD_TEXT2="Retype new password:"
+
+# by default use console frontend
+DIALOG='dialog'
+PWD_CMD="dialog --stdout --title $PN --passwordbox"
+
+# only if using X and gdialog + zenity are available use graphical frontend
+if [ -n "$DISPLAY" ] && [ -x "$(which gdialog)" ] && [ -x "$(which zenity)" ] ; then
+ DIALOG='gdialog'
+ PWD_CMD="zenity --title $PN --entry --hide-text"