How to launch Octave with its GUI ?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to launch Octave with its GUI ?

Julien R-2
I'm new to Octave and installed its binary on Win32 (XP) with cygwin, i.e. not a bundle executable.

I read lot of papers and posts about how installing cygwin and Octave on Windows, but nothing about how to start it.

Of course, I can start Octave from the cygwin console, but I could not find a way to start it with its graphical interface. Ideally, I would like to put some shortcut on my desktop, pointing a ".bat" file to launch Octave.

To start GRASS (another GNU package), I use the batch file below. Is there some equivalent for Octave?

@echo off
C:
chdir C:\cygwin\bin
set GRASS_AUTOSTART=1
bash --login -i -c startx

A more general problem is that I often cannot find the ".sh" configuration scripts. I also wonder if the call to a ".sh" Linux script can be done from within a Windows ".bat" file, for instance as parameter of some Linux command.

Pardon my ignorance!

Thanks for your help.

Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

Michael Goffioul
On 7/25/07, Julien R <[hidden email]> wrote:
>
> I'm new to Octave and installed its binary on Win32 (XP) with cygwin, i.e.
> not a bundle executable.
>
> I read lot of papers and posts about how installing cygwin and Octave on
> Windows, but nothing about how to start it.

There's also Windows binary packages of octave, which are not based on
cygwin, that you might want to look at. See
http://www.dbateman.org/?page=octave&lang=EN or
http://octave.sourceforge.net

> Of course, I can start Octave from the cygwin console, but I could not find
> a way to start it with its graphical interface. Ideally, I would like to put
> some shortcut on my desktop, pointing a ".bat" file to launch Octave.

What do you mean with "graphical interface"? Octave does not have by default
a graphical interface, it simply runs in a console. Of course, if you
want to use
plots (which uses gnuplot), you'll need to have a X server running as
well. If this
is what you mean, then look into C:\cygwin\usr\X11R6\bin\startxwin.bat: this is
a batch script to start the X server and an X terminal. You can probably tune it
to start octave in the terminal.

> A more general problem is that I often cannot find the ".sh" configuration
> scripts. I also wonder if the call to a ".sh" Linux script can be done from
> within a Windows ".bat" file, for instance as parameter of some Linux
> command.

The only way to run a shell script within a .bat file is to run it
through a shell
interpreter like bash (like in "bash -i --login -c script.sh"). This
also means that
once bash exits, the shell environment (all variables) is lost. In
other words, if
you shell script setup some variables and export them, this won't have
any effect
in you .bat file. In this kind of situation, the best is then to write
a full .sh script
that do everything you want, then write a one-line .bat file that runs
the .sh script
through bash.

Michael.
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

Julien R-2
Michael,

Thank you for your answer. I added comments below.

Julien

Michael Goffioul-2 wrote
On 7/25/07, Julien R <julienrouiller@yahoo.fr> wrote:
>
> I'm new to Octave and installed its binary on Win32 (XP) with cygwin, i.e.
> not a bundle executable.
>
> I read lot of papers and posts about how installing cygwin and Octave on
> Windows, but nothing about how to start it.

There's also Windows binary packages of octave, which are not based on
cygwin, that you might want to look at. See
http://www.dbateman.org/?page=octave&lang=EN or
http://octave.sourceforge.net
I knew it and would probably have chosen such a bundle if I not already had cygwin installed. I installed cygwin to have GRASS, another GNU package. (There is also a GRASS native Win32 version, but in pre-alpha release, so less stable.)
Using Octave with cygwin is also for me a way to get more familiar with Unix/Linux architecture. This will help me trying Linux once I feel that I have some knowledge with this OS.

> Of course, I can start Octave from the cygwin console, but I could not find
> a way to start it with its graphical interface. Ideally, I would like to put
> some shortcut on my desktop, pointing a ".bat" file to launch Octave.

What do you mean with "graphical interface"? Octave does not have by default
a graphical interface, it simply runs in a console. Of course, if you
want to use
plots (which uses gnuplot), you'll need to have a X server running as
well. If this
is what you mean, then look into C:\cygwin\usr\X11R6\bin\startxwin.bat: this is
a batch script to start the X server and an X terminal. You can probably tune it
to start octave in the terminal.
By the past, I used Matlab and also tried Scilab. It was possible to load ".m" scripts and do other things by using a GUI (for example, using the "Open file" button). As I understand, all this is done in a command line mode with Octave.
I could start the X server and the X terminal. Then, from the X terminal, I called octave.
If I understand well, all Octave commands will be called from this terminal. Content of vector or matrixes will also be printed in the same terminal. Isn't it?

> A more general problem is that I often cannot find the ".sh" configuration
> scripts. I also wonder if the call to a ".sh" Linux script can be done from
> within a Windows ".bat" file, for instance as parameter of some Linux
> command.

The only way to run a shell script within a .bat file is to run it
through a shell
interpreter like bash (like in "bash -i --login -c script.sh"). This
also means that
once bash exits, the shell environment (all variables) is lost. In
other words, if
you shell script setup some variables and export them, this won't have
any effect
in you .bat file. In this kind of situation, the best is then to write
a full .sh script
that do everything you want, then write a one-line .bat file that runs
the .sh script
through bash.
Yes, that seems the right way. I understand than once the Linux-like environment started, all concerning GNU applications are shelled in it. So we set environement variables in the ".sh" and not in the ".bat".

Michael.
Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

Michael Goffioul
On 7/28/07, Julien R <[hidden email]> wrote:

> > What do you mean with "graphical interface"? Octave does not have by
> > default
> > a graphical interface, it simply runs in a console. Of course, if you
> > want to use
> > plots (which uses gnuplot), you'll need to have a X server running as
> > well. If this
> > is what you mean, then look into C:\cygwin\usr\X11R6\bin\startxwin.bat:
> > this is
> > a batch script to start the X server and an X terminal. You can probably
> > tune it
> > to start octave in the terminal.
> >
> By the past, I used Matlab and also tried Scilab. It was possible to load
> ".m" scripts and do other things by using a GUI (for example, using the
> "Open file" button). As I understand, all this is done in a command line
> mode with Octave.
> I could start the X server and the X terminal. Then, from the X terminal, I
> called octave.
> If I understand well, all Octave commands will be called from this terminal.
> Content of vector or matrixes will also be printed in the same terminal.
> Isn't it?

Yes. Octave does not have a GUI like Matlab. There are some attempts that
you can find on the web (like octave workshop), but to my knowledge, there's
nothing really stable or full-featured.

Michael.
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

Steve Thompson-9
In reply to this post by Julien R-2
On 7/28/07, Julien R <[hidden email]> wrote:
> By the past, I used Matlab and also tried Scilab. It was possible to load
> ".m" scripts and do other things by using a GUI (for example, using the "Open
> file" button). As I understand, all this is done in a command line mode with
> Octave.  I could start the X server and the X terminal. Then, from the X
> terminal, I called octave.  If I understand well, all Octave commands will be
> called from this terminal.  Content of vector or matrixes will also be
> printed in the same terminal.  Isn't it?

Matlab has a little command line where you run m-files and
test out stuff, right?  That's what Octave in a terminal
does.  That is where you call m-files and do various other
commands.  To "Open file", just open it with your text
editor of choice.

As I understand it, the core developers of Octave are not
interested in some GUI since they live in Emacs and when you
get good at Emacs your motivation to make some half-baked
text editor for m-files isn't really there.

I've seen Matlab GUI people get comfortable with Kate
<http://kate-editor.org/>.

Steve
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

Jordi Gutiérrez Hermoso
On 28/07/07, Steve Thompson <[hidden email]> wrote:
> As I understand it, the core developers of Octave are not
> interested in some GUI since they live in Emacs and when you
> get good at Emacs your motivation to make some half-baked
> text editor for m-files isn't really there.

Weeeeellll.... that's not *exactly* true. Even some of us hardcore
Emacs religious nuts think that Octave needs a GUI, or something like
it. QtOctave looks like a really promising GUI, now that Octave
Workshop is seemingly abandoned (and it was Windows-only, blah).

As far as Octave shipping its own editor, that would be quite silly.
All we really need is to integrate Octave well with other pieces of
software like editors, debuggers, and visualisers. The great thing
about free software is that every software project doesn't need to
create every component from scratch; we can use what others have
already created.

Bug reports and feature requests welcome as always. :-)

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

John Swensen-3
Jordi Gutiérrez Hermoso wrote:

> On 28/07/07, Steve Thompson <[hidden email]> wrote:
>  
>> As I understand it, the core developers of Octave are not
>> interested in some GUI since they live in Emacs and when you
>> get good at Emacs your motivation to make some half-baked
>> text editor for m-files isn't really there.
>>    
>
> Weeeeellll.... that's not *exactly* true. Even some of us hardcore
> Emacs religious nuts think that Octave needs a GUI, or something like
> it. QtOctave looks like a really promising GUI, now that Octave
> Workshop is seemingly abandoned (and it was Windows-only, blah).
>
> As far as Octave shipping its own editor, that would be quite silly.
> All we really need is to integrate Octave well with other pieces of
> software like editors, debuggers, and visualisers. The great thing
> about free software is that every software project doesn't need to
> create every component from scratch; we can use what others have
> already created.
>
> Bug reports and feature requests welcome as always. :-)
>
> - Jordi G. H.
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>  
As I have half-heartedly worked on a Octave IDE over the past year or
two, I have always wanted emacs as the editor also.  Since I am
currently using the GtkSourceView widget for my editor, then the GTK
Emacs bindings work marginally well.  However, with the release of a new
version of emacs in the last couple of months with native GTK widgets
and such, I believe someone is working on allowing a person to embed
emacs in another GTK application with some set of event callbacks.  So,
I am going to continue to have a GtkSourceView editor for those who
aren't familiar with emacs, but once I can embed emacs in my IDE, I will.

John Swensen

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

John W. Eaton-6
In reply to this post by Jordi Gutiérrez Hermoso
On 30-Jul-2007, Jordi Gutiérrez Hermoso wrote:

| Weeeeellll.... that's not *exactly* true. Even some of us hardcore
| Emacs religious nuts think that Octave needs a GUI, or something like
| it. QtOctave looks like a really promising GUI, now that Octave
| Workshop is seemingly abandoned (and it was Windows-only, blah).

I just installed it from the Debian package, and although it puts up a
window showing the Octave prompt and output, it seems to interact with
Octave by gathering input in a text box and then sending it to an
Octave subprocess.  So you are not really typing at the Octave prompt,
and Octave's readline and history mechanism is not working.  Is that
correct?  I think it is a major drawback.  Instead, I think the GUI
needs to have Octave running in a way that will allow the command
editing and history to work normally.  I posted about this before, and
provided some example code showing how this can be done with gtk on
systems that have pthreads:

  http://www.cae.wisc.edu/pipermail/octave-maintainers/2007-June/003280.html

Is there nothing similar for Qt?

| Bug reports and feature requests welcome as always. :-)

Patches even more so.

jwe

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: How to launch Octave with its GUI ?

John Swensen
In reply to this post by Jordi Gutiérrez Hermoso
Jordi Gutiérrez Hermoso wrote:

> On 28/07/07, Steve Thompson <[hidden email]> wrote:
>  
>> As I understand it, the core developers of Octave are not
>> interested in some GUI since they live in Emacs and when you
>> get good at Emacs your motivation to make some half-baked
>> text editor for m-files isn't really there.
>>    
>
> Weeeeellll.... that's not *exactly* true. Even some of us hardcore
> Emacs religious nuts think that Octave needs a GUI, or something like
> it. QtOctave looks like a really promising GUI, now that Octave
> Workshop is seemingly abandoned (and it was Windows-only, blah).
>
> As far as Octave shipping its own editor, that would be quite silly.
> All we really need is to integrate Octave well with other pieces of
> software like editors, debuggers, and visualisers. The great thing
> about free software is that every software project doesn't need to
> create every component from scratch; we can use what others have
> already created.
>
> Bug reports and feature requests welcome as always. :-)
>
> - Jordi G. H.
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>  

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave