2007-07 Gui For Command Line App - bash + dialog/zenity

pages

XDialog
http://linuxgazette.net/101/sunil.html

Zenity

Linux by examples:: a-complete-zenity-dialog-examples-2

Examples

XDialog in bash scripting

#!/bin/bash

function msgbox() {
    #DIALOG=${DIALOG=dialog}
    DIALOG=${DIALOG=Xdialog}
    message="$@"
    $DIALOG --title "$0 - msgbox" --clear --msgbox "$message" 12 60
}

msgbox "This is test"

Zenity

zenity --list --checklist --separator=-#- --width=500 --height=400 --column Buy --column Item --column Desc --list --checklist --separator=' ; ' TRUE Apples "a kind of apples" FALSE Orange 'danger!' TRUE Toothpaste 'only good one'
O ile nie zaznaczono inaczej, treść tej strony objęta jest licencją Creative Commons Attribution-ShareAlike 3.0 License