1
<?xml version="1.0" encoding="utf-8"?>
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="password" xml:lang="oc">
4
<link type="guide" xref="index#dialogs"/>
5
<desc>Use the <cmd>--password</cmd> option.</desc>
7
<title>Password Dialog</title>
9
Use the <cmd>--password</cmd> option to create a password entry dialog.
12
The password entry dialog supports the following options:
17
<title><cmd>--username</cmd></title>
18
<p>Display the username field.</p>
23
The following example script shows how to create a password entry dialog:
29
ENTRY=`zenity --password --username`
33
echo "User Name: `echo $ENTRY | cut -d'|' -f1`"
34
echo "Password : `echo $ENTRY | cut -d'|' -f2`"
39
echo "An unexpected error has occurred.";;
43
<figure id="zenity-password-screenshot">
44
<title>Password Entry Dialog Example</title>
45
<desc><app>Zenity</app> password entry dialog example</desc>
46
<media type="image" mime="image/png" src="figures/zenity-password-screenshot.png"/>