首先,以文本格式标记,窗口标题,button标签为特色的一个例子。
zenity \ --info \ --text="Time is $(date +%Hh%M).\n\nGet your coffee." \ --title="Coffee time" \ --ok-label="Sip"
gxmessage
gxmessage "my text"
xmessage
xmessage是非常古老的,所以它是稳定的,可能在所有使用X的发行版中都可用(因为它是用X分发的)。 它可以通过X资源进行定制,那些已经使用Linux或者Unix的人足够长的时间才能知道它是什么意思( .Xdefaults ,任何人?)。
xmessage -buttons Ok:0,"Not sure":1,Cancel:2 -default Ok -nearmouse "Is xmessage enough for the job ?" -timeout 10
kdialog
(未testing)
在PPA中
YAD:对类固醇的Zenity [从Shell脚本显示graphics对话框]〜Web Upd8:Ubuntu / Linux博客 。 似乎没有自动resize的对话框。
echo My text | yad \ --text-info \ --width=400 \ --height=200
一个更大的例子
yad \ --title="Desktop entry editor" \ --text="Simple desktop entry editor" \ --form \ --field="Type:CB" \ --field="Name" \ --field="Generic name" \ --field="Comment" \ --field="Command:FL" \ --field="Icon" \ --field="In terminal:CHK" \ --field="Startup notify:CHK" "Application" "Name" "Generic name" "This is the comment" "/usr/bin/yad" "yad" FALSE TRUE \ --button="WebUpd8:2" \ --button="gtk-ok:0" \ --button="gtk-cancel:1"
其他不在Ubuntu的标准仓库
shellgui
xdialog
gtkdialog
题外(terminal)
whiptail --msgbox "my text" 10 20 dialog --msgbox "my text" 10 20
随意编辑。