gtk dialogs in linux

Wednesday, December 05, 2007

Bash scripts are fantastic. I could end the post there, but they can be made even better for end users by using one of the simple GUI applications out there that can be run from bash. Here's a great little example (using gtkdialog)that pretties-up the interface for my infrared phone script from this post.

#! /bin/bash

OUTPUT=$(/usr/local/bin/phone-connect $1 | sed -e 's/\(.*\)$/


Beautiful

posted 10:57 pm  

2 comments:

A much simpler way is to use gtkdialog's successor, zenity

This does all the work for you and has many different dialog box types, great for giving or receiving input in bash scripts. Here is a nice tutorial and man page is here

Enjoy ;)
Dave

Unknown said...
9:01 am  

Thanks Dave, that looks like a much easier option to use in bash. No more having to build xml!

Brad Milne said...
9:11 am  

Post a Comment