Writing a simple GUI for a linux app

Posted:
in Genius Bar edited January 2014
Dear All,



I have written a program for some task. For now, it is run from the command line.



My advisor has decided that he wants a button that you can click to start/stop running the program. (sucks to be a grad student)



The Machine is running Scientific Linux and the program is written in C++.



Do any of you know what a good way to do this might be? I have never done any work on GUIs.



Thanks

Comments

  • Reply 1 of 2
    MarvinMarvin Posts: 15,326moderator
    There are a number of ways you can do this. One is you can draw things in OpenGL but this means making your own buttons (just squares though) unless you use a library like GLUI:



    http://www.cs.unc.edu/~rademach/glui/



    An easier way is to use an interface toolkit. There should be one built in called Tcl/Tk. I don't find it particularly intuitive to use but it's fairly popular and should be relatively cross-platform.



    Another option that makes interfaces look a bit nicer and is used in a few commercial applications is Qt:



    http://trolltech.com/products/qt



    It's a commercial product but it has an open source version for applications like you have. I think that one comes with an interface builder like OS X has so it should be fairly easy to put something together.
  • Reply 2 of 2
    Ok I found a way.



    I made a button in a web page that when you click on it, it changes a value in a file that the program is constantly reading.



    this also allows anyone with a web browser to start/stop the program remotely. (which is something I can take advantage of)



    thanks a lot though
Sign In or Register to comment.