title: 'Unable to open X display' when using 'google-chrome' command in ubuntu within wsl
body: <p>Let me preface this by saying I am new to coding, so if it is simple, etc. I apologize. I am trying to open a google chrome window, with ubuntu in wsl. When I use the &quot;google-chrome&quot; command I receive this error:
  [ERROR:browser_main_loop.cc(1412)] Unable to open X display.</p>
  <p>What I have tried:
  I can open chrome through ubuntu using this command: /mnt/c/Program\ Files\ (x86)/Google/Chrome/Application/chrome.exe</p>
  <ol>
  <li><p>I have installed chrome using these steps(method 1): <a href="https://linuxhint.com/ubuntu_20-04_google_chrome_installation_guide/" rel="nofollow noreferrer">https://linuxhint.com/ubuntu_20-04_google_chrome_installation_guide/</a></p>
  </li>
  <li><p>I followed the workaround offered here but I was not able to get it to work. (A different error occurred here) <a href="https://stackoverflow.com/questions/60304251/unable-to-open-x-display-when-trying-to-run-google-chrome-on-centos-rhel-7-5">Unable to open X display when trying to run google-chrome on Centos (Rhel 7.5)</a></p>
  </li>
  <li><p>I followed this thread answer here. <a href="https://stackoverflow.com/questions/62588767/running-google-chrome-on-wsl-ubuntu-as-headless-no-sandbox-gives-multiple">Running &quot;google-chrome&quot; on WSL Ubuntu as --headless --no sandbox gives multiple errors - how do I take screenshot using headless in WSL?</a></p>
  </li>
  <li><p>I noticed that this error happened with other applications (Not nescesarilly opening google chrome) but I couldn't really find anything that seemed to be applicable to try here.</p>
  </li>
  </ol>
  <p>What are some other things I could try? And thanks for taking your time to answer.</p>