title: X11 forwarding works on Ubuntu using Windows 10 cmd-line ssh only after first using Putty
body: <p>Note: X11 forwarding works fine if I use putty and X11 forwarding using localhost:0.0.  I would like to get it to work using Windows 10 command line ssh.
  Here are my steps.</p>
  
  <ul>
  <li>My Windows 10 computer and my Ubuntu computer are on the same local network.</li>
  <li>I installed and ran Xming. The icon in my icon tray says Xming Server:0.0</li>
  <li>I open a command window  (type <code>cmd</code>)</li>
  <li>I use <code>ssh -X mymachine</code> and log in ok.</li>
  <li>At my Ubuntu prompt, I type </li>
  </ul>
  
  <pre><code>export DISPLAY=localhost:0.0
  xcalc
  </code></pre>
  
  <ul>
  <li>I get the following message</li>
  </ul>
  
  <pre><code>No protocol specified
  Error: Can't open display: localhost:0.0
  </code></pre>
  
  <ul>
  <li>I tried other combinations (Note: Windows 10 computer is on 192.168.1.18)</li>
  </ul>
  
  <pre><code>export DISPLAY=localhost:0.0
  export DISPLAY=192.168.1.18:0.0
  export DISPLAY=192.168.1.18:0
  export DISPLAY=10:0.0
  export DISPLAY=10:0.0.1
  </code></pre>
  
  <p>I even tried typing the following in the Windows command window:</p>
  
  <pre><code>set DISPLAY=localhost:0.0
  ssh -X mymachine
  </code></pre>
  
  <p>but Windows didn't like that.
  I also tried using Windows Powershell.
  Nothing worked. I kept getting the same message.</p>