All pastes #291772 Raw Edit

Untitled

public shellscript v1 · immutable
#291772 ·published 2006-12-25 18:45 UTC
rendered paste body
if [ -z "$DIALOG" ] ; then    # Determine which dialog to use in which situation:    # Xdialog (in all other cases)    DIALOG=Xdialog    # kdialog (in case there is no console available and we are running KDE)    pidof -x kdeinit >/dev/null && DIALOG=kdialog    # GNOME    pidof -x gnome-panel >/dev/null && DIALOG=zenity    # dialog (in case there is a console available)    GUIMODE=$(tty)    ( echo $GUIMODE | grep /dev/tty[:digit:] >/dev/null ) && DIALOG=dialogfi