Zenity is a program often used in scripts to display graphical boxes that very often prompt for user input. It is a rewrite of the old, but still used gdialog program, and has a 'gdialog wrapper script' so that it can be used in older scripts.

Zenity can be experimented with from the command line, and various formulaes tested; the simplest being something like:

zenity --entry 

which brings up a simple text entry box for the user to input a value which is then echoed to the terminal.

In scripts of all types (and not just bash or sh), it can be used for quite complex purposes. At sourceforge there is a site which holds a collection of user Nautilus scripts that make use of zenity's capabilities. A script by Martin Langasek, for example, uses zenity to prompt the user for a password when encrypting and decrypting files. It is available in the collection there.

For more information, see man zenity, or the Ubuntu man pages online.