[IPython-User] DISPLAY environment in IPython/matplotlib running in screen(1)?

David Warde-Farley wardefar@iro.umontreal...
Sat Aug 6 01:12:50 CDT 2011


On 2011-08-03, at 1:24 AM, Frank Horowitz wrote:

> What's the trickery for resetting the DISPLAY environment on-the-fly from within such a persistent "ipython -pylab" session?
> 
> TIA for any help you might be able to provide,
> 
> 	Frank Horowitz
> 	frank@horow.net

You could try meddling with os.environ['DISPLAY'], but I suspect it will not do much good.

I'm not sure this is currently possible. I could be wrong but I suspect that IPython is initializing the Tk main-loop (I'm not sure if it even *has* a main loop) which is registering an X client, and once that X connection dies it's toast. This has also been my experience with things like Matlab.

This is definitely on my list of desiderata as well, if it's even theoretically possible (I just tried and when I disconnect the ssh session my ipython session dies with an XIO error, also using the TkAgg backend like you). My guess is that it will be highly backend dependent, but the GUI handling has changed enough in 0.11 that there might be some wacky solution I'm not thinking of. File an enhancement ticket, perhaps?

David


More information about the IPython-User mailing list