-   Programming (
-   -   Makign a GUI for a Bash script (

aaargh486 06-13-2007 08:08 AM

Makign a GUI for a Bash script
I have made a Bash script for a pretty simple function (controlling my fans). But now I want to make a simple GUI for it. I would like to use it only to read some info about my PC (temperature, fan speed etc...) and change some settings my script uses.

But I have absolutely no experience with even simple GUI's in Linux. Do you have any recommendation of which language I should study to make SIMPLE GUI's, remember, only really basic functions.
(I thought about maybe I could use the Gtk implementation of Perl, but that could sound really stupid of course)

Many thanks in advance!

pixellany 06-13-2007 09:10 AM

I have used Zenity. I think other options include "dialog" or "kdialog"

wattana 06-13-2007 10:10 AM


Take a look at Qt.

They have the fastest simplest way to make nice gui I've ever seen.

aaargh486 06-13-2007 10:25 AM

Thanks, I'll have a look at it.

theYinYeti 06-13-2007 11:16 AM

There are two ways you can create the GUI.

If you use Zenity or similar, you'll have to program the GUI inside your script.
The more Unix-like way would be to make your script responsive to some commands, eg: you send commands on the standard input, and receive results from the standard output; this way, you could create any number of GUI that would just be front-ends to the script. That's how mplayer GUI works as far as I know.


aaargh486 06-13-2007 12:04 PM

I'm looking for a GUI that stands completely loose of the script. The script get its information from a configuration file, and I want to write a GUI that can edit that config-file, and restart the script if needed to.
What would you recommend in this case?

ta0kira 06-13-2007 12:51 PM

Check this out, too:

That seems like the simplest way to get the job done. Unless you are going to rewrite your code in C++, I wouldn't recommend Qt for this in particular.

gnashley 06-13-2007 01:36 PM

Xdialog is the old standard for this. It uses gtk libs so it will work on non-kde, non-gnome systems. If you only care about kde compatibility use kommander. If you only want gnome compatibility use zenity.
Xdialog should work on nearly any system and has the advantage(?) of using mostly the same syntax as dialog, in case you want to provide a console-based alternative.

schneidz 06-14-2007 02:58 PM

i'll add gdialog as an easy suggestion but you will need to call gdialog inside of your script (

also v-tcl is a bit harder to master.

gnashley 06-15-2007 04:10 AM

Star your script and read the config file. Use that info to create your dialog boxes using any one of dialog(CLI ncurses), whiptail(newt libs), Xdialog(gtk), gdialog(gnome), zenity(gnome) or kommander(kde)

These programs will all return values based on the actions or values the user selects. Use them to rewrite or edit the config file and then exec the script again(The script runs itself again -the new process replaces the existing running process).

vaisarger 05-11-2010 10:20 AM

Hi. If you're looking for a GUI for shell script, take a look at my program:

It has a library called "easybashgui" and a script used for showing its potential called "".

Here there is all information


All times are GMT -5. The time now is 08:23 AM.