[TriLUG] need a gui for my bash script

Smith, Brett bsmith at bloodhoundinc.com
Mon May 10 10:50:12 EDT 2004


Try 
gdialog
or 
kdialog
or 
xdialog 


gtk gnome 2 example

#!/bin/bash

if [ -z $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS ]; then
     file=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
else 
     file="Error no file selected"
fi

gdialog --title "Test Me" --textbox "you selected `echo $file`" 20 50


-----Original Message-----
From: Ben Pitzer [mailto:uncleben at mindspring.com]
Sent: Monday, May 10, 2004 10:45 AM
To: Triangle Linux Users Group discussion list
Subject: RE: [TriLUG] need a gui for my bash script


You might want to look at ncurses.  It's minimalist, and still runs in a
shell, but it might not cost too much in terms of performance and still
provide at least some level of GUI functionality for your users.  If you
want something that is slicker and more of a window-oriented GUI, you might
want to consider converting the script into a Perl/Tk tool.  There are a
number of good book on Perl/Tk, if you have prior Perl experience, I'm told,
but that might be more than you want to do for this.

Otherwise, I'd make it web-based.  That's probably the easiest way to create
a GUI for a shell script, and requires the least amount of crap to deal with
and new stuff to learn

Regards,
Ben Pitzer

---------------------------------------------

"Those that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
 --Ben Franklin--



> -----Original Message-----
> From: trilug-bounces at trilug.org [mailto:trilug-bounces at trilug.org]On
> Behalf Of Ryan Leathers
> Sent: Monday, May 10, 2004 10:21 AM
> To: trilug at trilug.org
> Subject: [TriLUG] need a gui for my bash script
>
>
> Recently I wrote a bash script which uses getopts and a read to handle
> user input.  The script works great and is a huge time saver for the
> folks who use it.  However, in spite of my best efforts at providing
> good input validation, help, and usage examples the users are pining for
> a GUI tool.
>
> Can anyone suggest a quick and dirty way to put a GUI wrapper around my
> command line tool?
>
>
> --
> Ryan Leathers <ryan.leathers at globalknowledge.com>
> Global Knowledge
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
>
>

-- 
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

This email message is for the sole use of the intended recipients(s) and may contain confidential and privileged information of Bloodhound Software, Inc.. Any unauthorized review, use, disclosure is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.



More information about the TriLUG mailing list