Mar'o
Mar'o

Reputation: 125

Is there a way of having a GUI for bash scripts?

I have some bash scripts, some simple ones to copy, search, write lines to files and so on.

I am an Ubuntu. and I've searched in google, but it seems that everybody is doing that on python. I could do these on python, but since I am not a python programmer, I just know the basics. I have no idea of how calling a sh script from a GUI written on python.

If someone has a link or something to say, please drop a line.

regards, Mario

Upvotes: 3

Views: 3219

Answers (4)

Dennis Williamson
Dennis Williamson

Reputation: 360683

If you want to be able to display dialog boxes, calendar selection boxes, etc. you might want to take a look at dialog and whiptail. They are not graphical - they use text mode - but they may be adequate for your needs.

Upvotes: 0

Drakosha
Drakosha

Reputation: 12165

I do not fully understand what you want. Calling a shell script from python, is like calling any executable from python, using os.system.

In fact there're several 'guis' for bash, namely zenity and others.

Upvotes: 0

Mark Byers
Mark Byers

Reputation: 839184

Is there a way of having a GUI for bash scripts?

You can try using Zenity.

a tool that allows you to display GTK dialog boxes in commandline and shell scripts.


I have no idea of how calling a sh script from a GUI written on python.

You can do this using subprocess.

Personally I would recommend that you learn Python and call the scripts from Python instead of trying to write the GUI in Bash.

Upvotes: 7

Beth
Beth

Reputation: 4670

basically, all bash does is start other programs (and do symbolic math on the command line). So no, you're going to have to involve some other program.

Upvotes: 0

Related Questions