HOT DOG Linux


How To Show A Password Dialog

From the shell, run the command:
$ hotdog password OK Cancel "This is a password dialog." "Enter password:"

The second argument contains the text for the OK button.

The third argument contains the text for the Cancel button.

The fourth argument contains the text for the dialog.

The fifth argument contains the label text for the field.


The style of dialog will be determined by the environment variable HOTDOG_MODE.

To force a dialog to be in a specific style:

$ HOTDOG_MODE="amiga" hotdog password OK Cancel "This is a password dialog." "Enter password:"

$ HOTDOG_MODE="macclassic" hotdog password OK Cancel "This is a password dialog." "Enter password:"

$ HOTDOG_MODE="aqua" hotdog password OK Cancel "This is a password dialog." "Enter password:"

If the user clicks the OK button, then the contents of the password field will be written to STDOUT followed by a newline, and the exit code will be 0.

If the user clicks the Cancel button or the user closes the dialog, possibly by clicking the window close button or hitting the Escape key, then nothing will be written to STDOUT, and the exit code will be 1.