[IPython-dev] remote X DISPLAY
Vasco Tenner
vasco+python at tenner.nl
Tue May 27 04:39:44 EDT 2014
Hi Maximilian,
On 05/25/2014 12:17 AM, Maximilian Albert wrote:
> Hi Vasco,
>
> Now I want to use X forwarding show gtk matplotlib windows. This works
> as long as I keep the original SSH connection open. However, when I
> create a new ssh connection, the "DISPLAY" environment variable should
> change. Is there I way I can tell the %matplotlib gtk magic to pass a
> certain DISPLAY to gtk?
>
>
> I think it should work if you put the following at the beginning of your
> notebook:
>
> import os
> os.environ['DISPLAY'] = ':10'
>
> (or whatever new display number you now have). Untested right now, but
> I'm pretty sure I used it a while back to solve precisely this problem.
This works in a new kernel. At this moment, my ipython-kernel crashes as
I disconnect the ssh session, after I've run %matplotlib qt.
So:
%matplotlib qt
ssh disconnect -> crash kernel
Also
%matplotlib qt
%matplotlib inline
ssh disconnect -> crash kernel
Furthermore it look likes it is not possible to change from one to
another DISPLAY environment in a running kernel.
Vasco
More information about the IPython-dev
mailing list