Joined October 2015
·

N

PA
·
·

As an amendment to my previous comment (about xpra), I think there's a simpler way to do X forwarding of a window outside of the ipython notebook environment. Also, the way I tried doing kept failing for awhile, so I got the below to work (also, there's a typo in the old DISPLAY=:Z string)

  1. create vnc server on remote host, which will allocate a new X display if necessary and tell you it as an integer: <outputfromvncserver> remote@remote$ vncserver
  2. either a. export the resulting display via remote@remote$ export DISPLAY=:<outputfromvncserver> and then start ipython notebook with command recommended by article (with same environment!) or 2b.
  3. start ipython notebook
    inside the notebook

    import os
    os.environ['DISPLAY'] = '<outputfromvncserver>'

  4. now you can use a vncviewer with something like
    local@local$ vncviewer remote@remote:<outputfromvncserver>

and you'll see a remote desktop appear, along with any mayavi figures (or other out-of-notebook X windows?) you might be using

Hi cheglastgnat,

I try to use inline figures as well, but unfortunately mayavi inlining in ipython notebook isn't (yet) well supported (screenshots, no interactivity). It doesn't seem to actually forward the interactive scenes (empty windows), but it doesn't give me errors.

Great tutorial! I want to add a tip for enabling display of remote figures (I got a DISPLAY error when the remote server executing my ipython notebook code didn't have anywhere to put Xwindows)

Although you can use XPRA to forward the entire browser window remotely, it's slow. Combining xpra for remote display of xwindows (e.g., matplotlib or mayavi figures), you can combine the advice from here (https://wiki.archlinux.org/index.php/Xpra)

remote@remote$ xpra start :100

remote@remote$ DISPLAY:=100 screen

remote@remote$ ipython notebook --no-browser --port=8889

local@local$ ssh -N -f -L localhost:8888:localhost:8889 remoteuser@remotehost

And you'll see figures opened on your remote machine pop up in xpra windows on your local machine

Achievements
1 Karma
0 Total ProTip Views