XFree Message Windows

The xmessage that comes with Xorg (or XFree) displays a customizable message box. Although its set of features is extended by the gxmessage command, the following listing applies to both command:

XMESSAGE=$(which gxmessage xmessage 2>/dev/null | head -n 1)
echo $(${XMESSAGE} -center -title "heads up" -buttons Done,Cancel -default Done -print "something happend")

On stdout, the message box returns the label of the button that was pressed by the user.

See mysetup2