Fri 08 Nov 2013 01:07:43 AM UTC, comment #18:
Works for me.
|
Thu 07 Nov 2013 08:12:02 PM UTC, comment #17:
I added a changeset that checks for a DISPLAY variable and refuses to initialize the FLTK toolkit if no DISPLAY is present (http://hg.savannah.gnu.org/hgweb/octave/rev/7aadb87f599a). If this works in Michael's environment then I think this bug can be closed.
|
Mon 04 Nov 2013 06:34:09 PM UTC, comment #16:
Could I just add that it might be helpful if
no graphics display is available a message
could be printed saying something like:
***No graphics DISPLAY found. Using Gnuplot printer mode.
Anyhow, it is, I think, nearly there.
|
Mon 04 Nov 2013 06:29:51 PM UTC, comment #15:
Well, here is another experiment:
[pbdsl3:octave] ./run-octave --no-gui --no-init-file -q
octave-gui:1> available_graphics_toolkits()
ans =
{
[1,1] = gnuplot
}
octave-gui:2> plot(1:100)
+------------------------------------------------------------------------------------------------------------+
| |
|100 ++------------------+-------------------+--------------------+-------------------+------------------++ |
| +---------------------------------------------------------------------------------------------------++ |
| | +++ || |
| | ++++ || |
| | +++ || |
|
This has gone to gnuplot in "printer" mode. Is this
what you expected? If so, the remaining problem
is
graphics_toolkit('fltk')
octave-gui:3> available_graphics_toolkits()
ans =
{
[1,1] = gnuplot
}
octave-gui:4> plot(1:100)
Can't open display:
[pbdsl3:octave]
=================
i.e. the graphics_toolkit('fltk')
does something that leads to exit();
|
Mon 04 Nov 2013 06:22:03 PM UTC, comment #14:
Sorry, in previous comment I had DISPLAY :0
After unsetenv DISPLAY:
[pbdsl3:octave] unsetenv DISPLAY
[pbdsl3:octave] ./run-octave --no-gui --no-init-file -q
octave-gui:1> available_graphics_toolkits()
ans =
{
[1,1] = gnuplot
}
octave-gui:2> graphics_toolkit('fltk')
octave-gui:3> available_graphics_toolkits()
ans =
{
[1,1] = gnuplot
}
octave-gui:4> plot(1:100)
Can't open display:
[pbdsl3:octave]
|
Mon 04 Nov 2013 06:21:19 PM UTC, comment #13:
What I intended to do was not allow fltk to be included in available_graphics_toolkits. If that is done, I think you should not be able to select fltk. But I guess I could be wrong about that too. I'll take another look at it.
|
Mon 04 Nov 2013 06:19:01 PM UTC, comment #12:
[pbdsl3:octave] ./run-octave --no-gui --no-init-file -q
octave-gui:1> available_graphics_toolkits()
ans =
{
[1,1] = fltk
[1,2] = gnuplot
}
octave-gui:2> graphics_toolkit('fltk')
octave-gui:3> available_graphics_toolkits()
ans =
{
[1,1] = fltk
[1,2] = gnuplot
}
octave-gui:4>
|
Mon 04 Nov 2013 06:16:36 PM UTC, comment #11:
What does available_graphics_toolkits() list, both before and after attempting to set it to fltk in the sample session you have listed here?
The way I read it, the change does not prevent you from shooting yourself in the foot and switching to fltk later, it just prevents it from being set as the default. And presumably from being registered, although it may be that you can still select it even if it is not listed under available_graphics_toolkits().
|
Mon 04 Nov 2013 05:38:15 PM UTC, comment #10:
Basically, same here. But, I noticed:
unsetenv DISPLAY
[pbdsl3:octave] ./run-octave --no-gui --no-init-file -q
octave-gui:1> graphics_toolkit()
ans = gnuplot
octave-gui:2> graphics_toolkit('fltk')
octave-gui:3> graphics_toolkit()
ans = fltk
So, the initial switch to gnuplot worked,
but then the switch to fltk was accepted
and then the old silent exit on:
octave-gui:4> plot(1:100)
Can't open display:
[pbdsl3:octave]
================================
Is it possible that part of the fix did not make it
into the patch?
|
Mon 04 Nov 2013 04:47:07 PM UTC, comment #9:
This still does not fix it for me either. Exits octave as before.
Completely fresh build (new clone, rerun bootstrap, etc) of cset 573f865aa8c8.
|
Mon 04 Nov 2013 04:18:59 PM UTC, comment #8:
I just did make after hg pull; hg update
Did I need to rerun configure?
|
Mon 04 Nov 2013 06:57:13 AM UTC, comment #7:
Hmm, when I do that, I get gnuplot dumb terminal graphics.
|
Mon 04 Nov 2013 06:27:26 AM UTC, comment #6:
Did not work for me. Fedora 19 using local
display, i.e.
printenv DISPLAY
:0
But, when I do
unsetenv DISPLAY
./run-ocatev --no-gui
I still get:
octave-gui:1> plot(1:200)
Can't open display:
[pbdsl3:octave]
Just exit, as before.
|
Mon 04 Nov 2013 06:12:05 AM UTC, comment #5:
I checked in the following changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/7533f4482006
|
Sat 02 Nov 2013 08:01:48 PM UTC, comment #4:
Not having gnuplot is already reported, see bug #35391, feel free to suggest solutions there.
There has always been an assumption that gnuplot is available, the gnuplot toolkit is always available and usable, whether or not the gnuplot executable is installed or callable.
|
Sat 02 Nov 2013 04:52:43 PM UTC, comment #3:
I'll be happy with anything that doesn't exit suddenly without saving the work done.
But with your change what will happen if I don't have gnuplot installed?
|
Sat 02 Nov 2013 07:44:19 AM UTC, comment #2:
I'm looking at fixing this by not registering the fltk graphics toolkit and also setting the default graphics toolkit to gnuplot if a graphics display is not found.
|
Wed 30 Oct 2013 03:25:43 AM UTC, comment #1:
Yes, it certainly seems that Octave should at least test that the OpenGL context is created correctly.
|
Wed 30 Oct 2013 02:26:42 AM UTC, original submission:
I have a system that does not have an X server installed (I get a warning "X11 DISPLAY environment variable not set" at Octave startup). When a function or script calls anything requiring a display, Octave crashes (exits with no chance to save the work, in some situations I even get a segmentation fault, and losing all the session history).
This happens for plot, imshow, imagesc, etc.
I understand that I can't actually get anything displayed, but if a message is displayed it means it must be being caught somewhere, and could be dealt with in a way that does not lose all the work.
I have tested this with a recent Octave build (cset 7900595f1533) and graphics_toolkit set to fltk (gnuplot uses the dumb terminal).
|