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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have done some googling and see many suggestions but thought I would seek the wisdom of this forum.
My goal :
I have 4 shell scripts.
call them : play , stop , fast forward , rewind
these currently work if i call them[ ./stop etc...]
I would like a simple gui
a small rectangle with 4 buttons ( yes , play,stop etc ]
what might be the simplest way for a fellow to start
to have a window open w 4 buttons etc.
Depends on what GUI toolkit you want to use. If your a C programmer and a *Nix user(Which you are), then use GTK2.xx. If your a C++ coder, QT maybe. I've heard its better than GTKMM(C++'s version of GTK). I use the GTK toolkit. Python has PyGTK and QT. But you get the point. There are lots of other toolkits out there as well. Just hit Google up.
Ill boot up my Arch box and whip up a GUI for you real quick with GTK.
Just edit the execl params to fit your scripts. The callback functions will execute your scripts when the corresponding buttons are pressed. The png images for the buttons have to be scaled down to fit inside the containers or it will enlarge the top level window. Or you could just use plain text for the buttons if you do not want to do all that work(Which really isnt much!). So instead of having a blue triangle for the play widget, you could display the word play inside instead. Up to you though.
You must have libgtk2.0-dev installed to get this code running. And to compile, append
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.