GUI for shell scripting

GUI for shell scripting

Post by Emphroo » Fri, 26 Dec 2003 07:04:11

Hi all,

For a long time I wanted to have access to GUI widgets while using shell
scripts. I wanted to have something for Linux, similar to "dtksh" on CDE. So
my goal was to think of a way which enabled GUI access for multiple script
languages. It had to be flexible, extendable, it had to give access to GTK
1.x and 2.x, and it had to be a feasable project. Finally I did not want to
investigate other people's sourcecode to implement extra GUI commands.

The concept of a GTK server was born. The basic idea behind this concept is
a binary, which can be started from within a script. The script has to
communicate with this binary by using 2-way pipes (stdin/stdout) or by using
sockets (tcp). The script sends original GTK commands as plain text to the
pipe or the socket, and the gtk-server sends information back which must be
captured by the script.

A problem was the callback mechanism. The GTK-SERVER has to keep track of
callback signals. Right now, every time a widget is created, one callback
signal per widget can be realized.

Another problem was the variable GTK function name. How to look up a GTK
function whose name is held in an array of chars? And if this function was
found, how to handle the variable amount of arguments, each of which may
have a different type? This is where the configfile comes in. In the
configfile the user has to describe the name of the function, the
callbacksignal, the returnvalue, the amount of arguments and the type for
each argument.

You can find the GTK-server at Both
Linux as Windows are supported.

My site includes demo script programs, precompiled GTK-server binaries as
well as the sourcecode. I hope somebody of the shell scripting community may
find my efforts useful.

Cheers everybody.


1. Java GUI for shell scripts

Check out the Runtime class, especially the bit about "exec()".  That
does what you want.  There's a section on this (with some examples) in
the Java Glossary.  Sadly, I've forgotten the link but a bit of
searching should turn it up without any problem.  (The owner's name is
Roedy Green - search for him on  There's a link in his sig


2. non-destuctive OSX re-partitioning utility

3. anyone use Clix (X desktop) or Finesse (gui for shell scripts)?

4. Belkin and wireless modem

5. GUI access for shell scripts: the gtk-server

6. X won′t work on a UDB/Multia with SuSE 6.3

7. handling SIGINT in shell scripts when executing another shell script.


9. Q: How can I have a shell script call another shell script...

10. Shell script invoking other shell scripts

11. Convert Bash shell script to Korn shell script

12. Shell Script Help (C-Shell Script)

13. How to pass a variable from a shell script to another shell script...