1

Is there any way to write a GUI under Ubuntu that one can work with gnuplot, octave and bash scripts together?

3
  • Just use any terminal emulator: open in one tab octave and in other - cd to octave's working directory. Commented Apr 30, 2013 at 8:34
  • I want to build a user interface. When I push a button for example, bash scripts will do its job. Commented Apr 30, 2013 at 8:38
  • That's possible only for a very limited number of actions. GUI is a useful thing only in browser or image/music/video editor. Commented Apr 30, 2013 at 8:42

1 Answer 1

1

You'd have to make the GUI and call the scripts, be it octave, bash or gnuplot. You could probably make the plots in the GUI and forget octave. At the end I learned a little bit of ruby on rails to offer my fortran code on the cloud.

For example, You could use qt and call the octave function usino a system call. Or go web based and make an ajax call. There are just too many options, depending on which language/framework/libraries you use.

To make a script call from octave, see http://www.gnu.org/software/octave/doc/interpreter/Controlling-Subprocesses.html . There are many ways to do it. Depending on what you want, a mere

    system("./my_script")

could do the job. If you need to get the response, there is info on that link. Otherwise, the script could put the output in a file that you could read later from octave.

If you want to get input in octave, so that you make something close to a very light weighted user interface, you could make a loop and inside ask for input. For example

    while x>0
        x = input("Enter an integer (0 for quiting), 5 for script")
        if (x==5)
            system("./my_script")
        endif
    endwhile
Sign up to request clarification or add additional context in comments.

7 Comments

Actually calling bash scripts from octave would work enough for me, however I don't know how to do it. I don't know ajax. Thanks for your response.
I added how to make a call to a script from octave on my answer. Hope it helps.
Thank you very much. That solves more than half of the problem.
You should probably take a look at scilab. It's similiar to octave, graphics and all, plus you can make GUI from within. I once learned, and it wasn't that difficult.
@newzad you can try the experimental octave GUI. You'll have to build the testing version (3.7.2) from source thought. See their wiki for instructions.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.