How to start X windows inside "Bash on Ubuntu on Windows"

9,777

You can install Xming.

Use export DISPLAY=:0 or export DISPLAY=localhost:0 and run your app from the console.

Share:
9,777

Related videos on Youtube

Kraang Prime
Author by

Kraang Prime

Updated on September 18, 2022

Comments

  • Kraang Prime
    Kraang Prime over 1 year

    After installing the new feature (still "Beta") called Bash on Ubuntu on Windows that is a feature subset of Windows 10 Anniversary edition, I get the following message when trying to start X-Windows using startx :

    x-windows subsystem failure on ubuntu

    What do I need to tweak / configure in order for X-Windows to launch?

    I noticed that xauth was already installed, however I had to install the rest of the framework as follows :

    apt-get install xorg openbox
    
    • Kraang Prime
      Kraang Prime over 7 years
      @Zanna thank you for the correction. I missed that misspelling of windows (prior : widnows lol).
    • Zanna
      Zanna over 7 years
      :) it's nothing! Hope someone can answer :)
    • WinEunuuchs2Unix
      WinEunuuchs2Unix over 6 years
      @KraangPrime can you update us on your progress with x-windows on Windows 10 WSL?
    • Kraang Prime
      Kraang Prime over 6 years
      @WinEunuuchs2Unix - I haven't tried anything recently. I did notice it is finally available in the Windows Store aka.ms/wslstore [ if on windows that link will prompt to open the Store and display the Linux subsystems available ] after running Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux in PowerShell as Administrator
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 6 years
    +1 but there are other x-windows packages that can be used and you can improve your answer with references to them as well.