title: WSL 2: Run Graphical Linux Desktop Applications from Windows 10 Bash Shell "Error E233: cannot open display"
body: <p>How to run graphical Linux desktop applications from Windows 10’s Bash Shell?</p>
  
  <p>First, I installed Windows Subsystem for Linux (WSL) following steps as shown in <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10?redirectedfrom=MSDN" rel="noreferrer">here</a> as follows:</p>
  
  <p>(1) Installed Windows 10 Pro Insider Preview Build 19619.  </p>
  
  <p>(2) Installed Ubuntu Linux distribution. </p>
  
  <p>(3) Changed the distribution version from WSL 1 to WSL 2.</p>
  
  <p>Second, to enable graphical Linux desktop applications from Windows 10’s Bash Shell, I followed the following steps as shown <a href="https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/" rel="noreferrer">here</a> as follows:  </p>
  
  <p>(4) I installed an X Server that is Xming</p>
  
  <p>(5) Installed graphical GTK-based vim editor as test using:</p>
  
  <p><code>sudo apt-get install vim-gtk</code></p>
  
  <p>(6) Set my display environment variable</p>
  
  <p><code>export DISPLAY=:0</code></p>
  
  <p>(7) Launch an Application</p>
  
  <p><code>gvim</code></p>
  
  <p>However, this did not lunch the application and I got the following error:</p>
  
  <pre><code>E233: cannot open display
  Press ENTER or type command to continue
  E852: The child process failed to start the GUI
  Press ENTER or type command to continue
  </code></pre>
  
  <p>Any idea why this error is occurring?</p>