The Tech Edvocate

Top Menu

  • Advertisement
  • Apps
  • Home Page
  • Home Page Five (No Sidebar)
  • Home Page Four
  • Home Page Three
  • Home Page Two
  • Home Tech2
  • Icons [No Sidebar]
  • Left Sidbear Page
  • Lynch Educational Consulting
  • My Account
  • My Speaking Page
  • Newsletter Sign Up Confirmation
  • Newsletter Unsubscription
  • Our Brands
  • Page Example
  • Privacy Policy
  • Protected Content
  • Register
  • Request a Product Review
  • Shop
  • Shortcodes Examples
  • Signup
  • Start Here
    • Governance
    • Careers
    • Contact Us
  • Terms and Conditions
  • The Edvocate
  • The Tech Edvocate Product Guide
  • Topics
  • Write For Us
  • Advertise

Main Menu

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings

logo

The Tech Edvocate

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
        • My Speaking Page
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings
  • Best GetYourGuide tours in Paris

  • Does Viator offer group discounts?

  • Hotels.com vs Airbnb features

  • What is Regus Business Lounge?

  • What is Couchsurfing verification?

  • How to use Viator gift cards?

  • Klook payment methods accepted

  • Best Notion templates for teams

  • WeWork vs traditional office cost

  • Klook vs GetYourGuide vs Viator

Digital & Mobile Technology
Home›Digital & Mobile Technology›How to Run Linux GUI Apps With WSL2 on Windows

How to Run Linux GUI Apps With WSL2 on Windows

By Matthew Lynch
August 3, 2023
0
Spread the love

Windows Subsystem for Linux (WSL) 2, a new and improved version of WSL, offers a more complete Linux kernel implementation. This means that you can now run Linux graphical user interface (GUI) applications with WSL2 on Windows.

In this article, we’ll show you how to run Linux GUI apps with WSL2 on Windows.

Step 1: Install WSL2

Before you can run Linux GUI apps with WSL2 on Windows, you’ll need to set up WSL2. Here’s how:

1. Make sure you’re using Windows 10 with the latest updates installed.

2. Enable the Windows Subsystem for Linux feature in the Windows Features panel. Open the Start menu and search for “Turn Windows features on or off”. In the window that appears, scroll down and check the box next to “Windows Subsystem for Linux”. Click OK to save the changes.

3. Restart your computer when prompted.

4. Install a Linux distribution of your choice from the Microsoft Store. We recommend using Ubuntu or Debian.

5. Launch the Linux distribution from the Start menu.

6. Enter a new username and password when prompted.

Step 2: Install an X server

In order to run Linux GUI apps with WSL2 on Windows, you’ll need to install an X server. An X server is a program that allows you to display graphical user interfaces running on a remote server.

Here’s how to install an X server:

1. Download and install an X server for Windows, such as Xming or VcXsrv.

2. Launch the X server and make sure it’s running in the background.

Step 3: Configure WSL2

Now that you have WSL2 and an X server installed, you’ll need to configure WSL2 to use the X server.

Here’s how:

1. Open the Linux distribution terminal and run the following command:

“`
echo “export DISPLAY=localhost:0” >> ~/.bashrc
“`

This command sets the DISPLAY environment variable to point to the X server.

2. Close the Linux distribution terminal.

3. Open a Windows command prompt or PowerShell prompt.

4. Run the following command:

“`
ipconfig /all
“`

5. Look for the IP address of the network adapter associated with your X server. It should be listed under “Ethernet adapter vEthernet (WSL)”.

6. Open the Linux distribution terminal again.

7. Run the following command, replacing “X.X.X.X” with the IP address of your X server:

“`
export LIBGL_ALWAYS_INDIRECT=1
export DISPLAY=X.X.X.X:0
“`

This command sets the LIBGL_ALWAYS_INDIRECT environment variable to enable indirect rendering, which allows the Linux GUI app to run on the X server. It also sets the DISPLAY environment variable to point to the IP address of the X server.

Step 4: Run a Linux GUI app

Now that you’ve configured WSL2 to use the X server, you can run a Linux GUI app using the following command:

“`
$ xeyes
“`

This command will launch the xeyes app, which displays a pair of eyes that follow your mouse cursor.

Congratulations, you’ve successfully run a Linux GUI app with WSL2 on Windows!

Conclusion

WSL2 offers a powerful and seamless way to run Linux GUI apps on your Windows machine. By following the steps outlined in this article, you can configure WSL2 to use an X server and easily run Linux GUI apps with just a few simple commands.

Previous Article

The 7 Best Photo Scanners for Backing ...

Next Article

5 Mood Board Creator Sites to Make ...

Matthew Lynch

Related articles More from author

  • Digital & Mobile Technology

    How to Track Cell Phone Numbers for Free

    May 29, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Watch the James Bond Movies in Order

    June 9, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Calculate Weighted Average in Excel

    August 5, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    Best Fire Stick Alternatives of 2023

    June 23, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How Many Downloads Are You Allowed on Netflix?

    June 22, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Live Chat on YouTube

    April 28, 2023
    By Matthew Lynch

Search

Login & Registration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

About Us

Since technology is not going anywhere and does more good than harm, adapting is the best course of action. That is where The Tech Edvocate comes in. We plan to cover the PreK-12 and Higher Education EdTech sectors and provide our readers with the latest news and opinion on the subject. From time to time, I will invite other voices to weigh in on important issues in EdTech. We hope to provide a well-rounded, multi-faceted look at the past, present, the future of EdTech in the US and internationally.

We started this journey back in June 2016, and we plan to continue it for many more years to come. I hope that you will join us in this discussion of the past, present and future of EdTech and lend your own insight to the issues that are discussed.

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

Contact Us

The Tech Edvocate
910 Goddin Street
Richmond, VA 23231
(601) 630-5238
[email protected]

Copyright © 2026 Matthew Lynch. All rights reserved.