I am trying to do some X11 forwarding from my windows machine. I have tried:
- Mingw64
- Cygwin64
- putty
In both Mingw and cygwin I run I get these results:
$ ssh -X bongioc@ncp-cb-1.nintextest.com
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-62-generic x86_64)
Last login: Tue Sep 1 13:20:14 2015 from 10.5.4.83
bongioc@ncp-cb-1:~$ firefox
(process:13343): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Error: no display specified
bongioc@ncp-cb-1:~$ xterm
xterm: Xt error: Can't open display:
xterm: DISPLAY is not set
bongioc@ncp-cb-1:~$ export DISPLAY=`echo $SSH_CONNECTION | awk '{print $1}'`:0
bongioc@ncp-cb-1:~$ echo $DISPLAY
10.5.4.83:0
bongioc@ncp-cb-1:~$ xterm
No protocol specified
xterm: Xt error: Can't open display: 10.5.4.83:0
bongioc@ncp-cb-1:~$
None of this works. But, if I use putty and select X11 forwarding, it just works.
I would prefer not use putty. Can someone explain how I can get mingw (preferred) or cygwin to actually forward X11 correctly? I am using xming for my xserver
Best Answer
For msys(mingw64), after running Xming, you need to set your $DISPLAY value before running ssh with X forwarding.
I haven't checked cygwin but I guess it's the same(although you'd probably want to run the cygwin X11 server).