2

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

2

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).

export DISPLAY=localhost:0
ssh username@server -X
0

In addition to setting the display variable as jbcreix suggested by running export DISPLAY=localhost:0 I also had to use -Y instead of -X.

From the man page:

-Y
    Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls. 

It disables some security checks and should only be used when logging in on trusted hosts. It is claimed that the security checks are not useful anyway here and here. Ubuntu used -Y by default even for -X for a long time according to this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.