PDA

View Full Version : [ubuntu] no xdialog or dialog: replacement ?



frenchn00b
August 2nd, 2010, 10:09 PM
Hello,

I look for a way that a script detects the tty or xterm
and prompt dialog or xdialog

problem

xdialog and dialog have been removed from repositories :(

frenchn00b
August 7th, 2010, 02:44 AM
#!/bin/bash


if [ -z "$DISPLAY" ] ; then
DIALOG=${DIALOG=dialog}
else
DIALOG=${DIALOG=Xdialog}
fi

echo "$DIALOG selected due to screen or display checking"

kerry_s
August 7th, 2010, 03:08 AM
ubuntu uses zenity.

example:
zenity --info --text="Hello World \!"