Home » Operating System » Linux » How to run graphical Linux applications on Bash on Ubuntu on Windows 10

Address

Jl. Meranti Wing 22 Level 4
Kampus IPB Darmaga
Bogor 16680, Jawa Barat, Indonesia
Tlp./Fax +62 (251) 8624535

Hours
Monday—Friday: 08:00–16:00

How to run graphical Linux applications on Bash on Ubuntu on Windows 10

Install Bash on Ubuntu on Windows

  1. Open a command prompt as your normal user
  2. Run bash
    A screenshot of the Ubuntu license prompt

After you have accepted the license, the Ubuntu user mode image will be downloaded, and a “Bash on Ubuntu on Windows” shortcut will be added to your Start Menu.

To launch Bash on Ubuntu Windows, either run bash at a cmd/PowerShell command prompt, or use the Start Menu shortcut.

Graphical Applications

In order to run Linux GUI applications on Bash On Ubuntu on Windows, you must:

  1. Install a X server for Windows
  2. Configure bash to tell GUIs to use the local X server

Install VcXsrv

In order to run graphical Linux applications, you’ll need an X server.

VcXsrv is the only fully open source and up-do-date native X server for windows.

  1. Download and run the latest installer
  2. Locate the VcXsrv shortcut in the Start Menu
    1. Right click on it
    2. Select More>Open file location
    3. Copy the VcXsrv shortcut file
  3. Paste the shortcut in %appdata%\Microsoft\Windows\Start Menu\Programs\Startup
  4. Launch VcXsrv for the first time

You may receive a prompt to allow it through your firewall. Cancel/deny this request! Otherwise, other computers on your network could access the server.

A X icon will appear in your system tray.

Configure bash to use the local X server

  1. In bash run:
    echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
  2. To have the configuration changes take effect, restart bash, or run:
    . ~/.bashrc

Test a graphical application

  1. Install x11-apps
    sudo apt-get install x11-apps
  2. Run xeyes

A new window will open, containing a pair of eyes that will follow your mouse movements.

 

Source:

How to run graphical Linux applications on Bash on Ubuntu on Windows 10


1 Comment

Leave a comment

January 2019
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories