1

I'm on a windows machine, trying to run a python program on my lab's server, and would like to be able to see the output plots it produces. Here is what I type to try:

ssh –X user@server
python
import matplotlib
matplotlib.use(‘WX’)
import matplotlib.pyplot as mp
mp.figure()

The figure doesn't show up, and I get this error:

"Unable to access the X Display, is $DISPLAY set properly?"

Does anyone know how to make this work, or if it's even possible on a windows machine? Otherwise, any recommendations on how to get a look at the output data? I feel like this should be a very basic functionality, but I haven't found any solutions online yet and no one else in my lab uses windows.

1 Answers1

1

You have to have X forwarding set up and have the cygwin X server installed and running.

First, install the cygwin X server using cygwin's setup.exe. Then, start it by typing startxwin in a cygwin shell. Then try your ssh again. If it still doesn't work, try ssh -Y user@server.

If it still doesn't work, you should make sure it's enabled in your ssh config: /etc/ssh_config

Look for the option ForwardX11 and enable it.

Tim
  • 31