Use the --entry option. Text Entry Dialogue

Use the --entry option to create a text entry dialog. Zenity returns the contents of the text entry to standard output.

The text entry dialogue supports the following options:

<cmd>--text</cmd>=<var>text</var>

Specifies the text that is displayed in the text entry dialogue.

<cmd>--entry-text</cmd>=<var>text</var>

Specifies the text that is displayed in the entry field of the text entry dialogue.

<cmd>--hide-text</cmd>

Hides the text in the entry field of the text entry dialogue.

The following example script shows how to create a text entry dialog:

#!/bin/sh if zenity --entry \ --title="Add new profile" \ --text="Enter name of new profile:" \ --entry-text "NewProfile" then echo $? else echo "No name entered" fi
Text Entry Dialogue Example Zenity text entry dialog example