ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a collection of shell scripts that I would like to build front-ends for. The requirements are very simple... some input fields and a button to execute "script(input1, input2, etc.)". Where should I start for this? I apologize if this is trivial, this isn't my specialty :-) Thanks!
Just grab gtkdialog or xdialog (even gxmessage or xmessage for the simplest stuff). You could reinvent a more specific or straightforward wheel in the language of your choice, but they should suffice for most things.
-- Something in your phrasing made me think 'GUI' but, if you mean a console frontend then dialog/cdialog is okay.
Last edited by slakmagik; 08-12-2007 at 10:23 PM.
Reason: TUI option
I have a collection of shell scripts that I would like to build front-ends for. The requirements are very simple... some input fields and a button to execute "script(input1, input2, etc.)". Where should I start for this? I apologize if this is trivial, this isn't my specialty :-) Thanks!
hi
here some useful example..
there is two buttons...
i used here gtk..
Xdialog is the most complete implementation of what you want. It uses the GTK libs so it is pretty universally compatible. I use it hundreds of ways, but I've also found and use other tools like greq, gxmessage or gtk-shell for special needs.
Xdialog is the most complete implementation of what you want. It uses the GTK libs so it is pretty universally compatible.
It probably would do what he wants, but I'm not sure I'd agree that it's the most complete. It has a lot of widgets but they are pretty limited - there's no '--4inputsbox ', for instance - just 1-3. Gtkdialog let's you essentially define most any interface out of a few widget atoms, so to speak, and you can define stuff with glade if you have to. And while gtk is pretty universal, debian-devel is having a fight now about removing it - gtk2 is also pretty universal and not about to be removed from anything. Xdialog has an essentially unsupported compile option to use gtk2 but is basically a gtk1 app, gtkdialog is gtk2.
zenity is gnome-specific, though - it may well work without the whole enchilada, but it needs a lot of gnome libs and junk like gconf. Bingo didn't say, so that may be okay but, odds are, with him running Slackware especially, gnome deps would be a negative.
Wow, thanks for all of the feedback! After the replies, I started reading more, and found that Slackware includes "dialog". It's been very simple to code, and I'm used to the interface from the Slackware utilities. There are probably limitations to what this tool can do, but it's working for me, and it doesn't need X, so it's very fast. Thanks again! ...Steve
zenity is gnome-specific, though - it may well work without the whole enchilada, but it needs a lot of gnome libs and junk like gconf. Bingo didn't say, so that may be okay but, odds are, with him running Slackware especially, gnome deps would be a negative.
I've installed Zenity on two different KDE boxes--no issues whatever: It's in the repositories, grabs a few libraries, and all is good. I don't get upset about Gnome libs when using GIMP either. Is that an issue for Slackware users???
Gimp is just a gtk2 app - it doesn't actually require any gnome stuff. Just gtk2 and a truckload of multimedia libs. And since it's part of Slackware, all that's taken care of.
Actually, I stand somewhat corrected, though - looking at zenity on a Debian box, it would just install libart, a couple of libgnomecanvas libs, and scrollkeeper and libscrollkeeper. And I can't imagine scrollkeeper is an actual functional requisite. So it's not as much as I was thinking, but still some junk as opposed to the various other solutions. I was thinking it wanted gconf and a bunch of other garbage.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.