[Latest version] Run Linux GUI (graphical user interface) applications (Gnome text editor, GIMP, Nautilus, VLC, X11 applications) on WSL

Article directory

  • 1. Install WSL
    • 0. Prerequisites
    • 1. Fresh installation
    • 2. Existing WSL installation
    • 3. Precautions
  • 2. Run Linux GUI application
    • 1. Update packages in the distribution
    • 2. Install Gnome text editor
      • start up
    • 3. Install GIMP
      • start up
    • 4. Install Nautilus
      • start up
    • 5. Install VLC
      • start up
    • 6. Install X11 applications

  Windows Subsystem for Linux (WSL) now supports running Linux GUI applications (X11 and Wayland) on Windows, providing a fully integrated desktop experience.
  WSL 2 makes Linux GUI applications native and natural to use on Windows.

  • Launch Linux apps from the Windows Start menu
  • Pin Linux apps to the Windows taskbar
  • Use alt-tab to switch between Linux and Windows apps
  • Cut and paste across Windows and Linux apps
      You can now integrate Windows and Linux apps into your workflow for a seamless desktop experience.
    Insert image description here

1. Install WSL

0. Prerequisites

  1. Windows version requirements:

    • Windows 10 version 19044+ or Windows 11 is required to enable Linux GUI support.
  2. vGPU driver:

    • Drivers for vGPU must be installed to use hardware-accelerated OpenGL rendering when running Linux GUI applications.
    • Supported GPU drivers:
      • Intel GPU driver
      • AMD GPU driver
      • NVIDIA GPU driver

1. Fresh installation

  For specific detailed operations (preliminary preparations, source change, etc.), please refer to the previous article: [2023] Windows 11 Installation of Linux Subsystem (Ubuntu22.04LTS) + Installation of ROS

  • Open an administrator PowerShell or Windows Command Prompt.

  • Enter the following installation command in PowerShell:

wsl --install
  • Restart your computer and the installation will continue after your computer restarts. During the installation process, you will need to enter your Ubuntu distribution's Linux credentials (username and password).

2. Existing WSL installation

  If WSL is already installed on your computer, you can update to the latest version that includes Linux GUI support by running the update command from an elevated command prompt.

  • Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.

  • Enter the WSL update command:

wsl --update

Insert image description here

  • WSL needs to be restarted for the update to take effect. WSL can be restarted by running the shutdown command in PowerShell.
wsl --shutdown

3. Precautions

  Linux GUI applications are only supported by WSL 2 and cannot be used in Linux distributions configured for WSL 1. If needed, you can learn how to change your distribution from WSL 1 to WSL 2.

2. Run Linux GUI application

  You can download and install these common Linux applications by running the following commands from a Linux terminal. If you are using a different distribution than Ubuntu, it may use a different package manager than apt.

1. Update packages in the distribution

  • Use the apt package manager to update the list of packages in your distribution.
sudo apt update

Insert image description here
…………
Insert image description here

2. Install Gnome text editor

  Gnome Text Editor is the default text editor for the GNOME desktop environment.

sudo apt install gnome-text-editor -y

Insert image description here

start up

enter:

gnome-text-editor ~/.bashrc
  • Notice:

  GNOME Text Editor replaces gedit as the default text editor for GNOME/Ubuntu in Ubuntu 22.10. If you are running an older version of Ubuntu and want to use gedit (the previous default text editor), use:

 sudo apt install gedit -y

3. Install GIMP

  GIMP is a free and open-source raster graphics editor used for image manipulation and image editing, free-form drawing, transcoding between different image file formats, and more specialized tasks.
Insert image description here

sudo apt install gimp -y

start up

enter:

gimp

Insert image description here
Insert image description here

4. Install Nautilus

  Nautilus, also known as GNOME Files, is a file manager for the GNOME desktop. (Similar to Windows File Explorer).

sudo apt install nautilus -y

start up

enter:

nautilus

Insert image description here

5. Install VLC

  VLC is a free and open source cross-platform multimedia player and framework that can play most multimedia files.

sudo apt install vlc -y

start up

enter:

vlc

Insert image description here

6. Install X11 applications

  X11 is the Linux window management system, which is a collection of various applications and tools provided with it, such as xclock, xcalc calculator, xclipboard for cut and paste, xev for event testing, etc. See the x.org documentation for details .
Insert image description here

sudo apt install x11-apps -y
  • To start, enter the name of the tool you want to use. For example:

    • xcalc
      Insert image description here

    • xclock
      Insert image description here

    • nice
      Insert image description here

Guess you like

Origin blog.csdn.net/m0_63834988/article/details/135044135