- The Initial Preview of GUI app support is now available for the Windows Subsystem for Linux
- What can I use GUI application support for?
- Use your IDE of choice to develop Linux projects
- Run Linux only applications, or Linux specific use cases like testing
- Build, test and use Linux applications that use audio or the microphone with built in audio support
- Bonus: Leverage WSL’s GPU access to run Linux applications with 3D acceleration
- How does this feature work?
- Getting started with this feature
- Feedback
- 🇮🇹 Что такое GUI (графический интерфейс пользователя)?
- История GUI
- GUI Компоненты
- Преимущества GUI
- Примеры GUI
- Linux GUI
- Графический интерфейс Windows
- Run Linux GUI apps on the Windows Subsystem for Linux (preview)
- Install support for Linux GUI apps
- Prerequisites
- Fresh install — No prior WSL installation
- Existing WSL install
- Run Linux GUI apps
- Update the packages in your distribution
- Install Gedit
- Install GIMP
- Install Nautilus
- Install VLC
- Install X11 apps
- Install Google Chrome for Linux
- Install Microsoft Teams for Linux
- Install Microsoft Edge browser for Linux
The Initial Preview of GUI app support is now available for the Windows Subsystem for Linux
April 21st, 2021
A year ago at BUILD 2020 we introduced our goal to bring Linux GUI applications to the Windows Subsystem for Linux (WSL) to run Linux GUI applications. We are proud to announce the first preview of this highly anticipated and open source feature! We’ve given this feature the nickname: “WSLg”. Please check out the video below or keep reading to see what you can use this feature for, how it works, and how to install it.
What can I use GUI application support for?
WSL lets you run a Linux environment, and up until this point has focused on enabling command line tools utilities and applications. GUI app support now lets you use your favorite Linux GUI applications as well. WSL is used in a wide variety of applications, workloads, and use cases, so ultimately, it’s up to you on what you’d like to use GUI app support for. Below, we’ve highlighted some key scenarios to help you fall in love with running applications in a Linux environment.
Use your IDE of choice to develop Linux projects
Visual Studio Code has an amazing experience using VS Code Remote to create a way for you to have a full-fledged Linux IDE directly on your Windows machine, keep extensions and settings across both Windows and different WSL distros (you can view our getting started with VS Code tutorial here. WSLg will let you run other IDEs such as gedit, JetBrains based editors, gvim, etc., to test, build, and debug your Linux applications in a performant manner.
Here’s an example of running gedit and gvim to edit Linux files directly in WSL.
Run Linux only applications, or Linux specific use cases like testing
You can use this feature to run any GUI application that might only exist in Linux, or to run your own applications or testing in a Linux environment. This could be incredibly useful for developers who want to test their cross-platform app, as they can now run it directly on Windows 10, and then easily inside of Linux without ever needing to change machines or manage a virtual machine.
Let’s look at an example of running TestCafe Studio in WSL to do some web testing from a Microsoft Edge browser running in Linux.
Build, test and use Linux applications that use audio or the microphone with built in audio support
Linux GUI applications on WSL will also include out of the box audio and microphone support. This exciting aspect will let your apps play audio cues and utilize the microphone, perfect for building, testing, or using movie players, telecommunication apps, and more.
Here’s an example of using Audacity running on Linux to record some audio and play it back.
Bonus: Leverage WSL’s GPU access to run Linux applications with 3D acceleration
As part of this feature, we have also enabled support for GPU accelerated 3D graphics! Thanks to work that was completed in Mesa 21.0, any applications that are doing complex 3D rendering can leverage OpenGL to accelerate these using the GPU on your Windows 10 machine. This will make some of your more complex applications run smoothly, such as running Gazebo, a robotics simulation tool. This experience will soon be included by default with different WSL distributions, however you can gain access to it right away by following the instructions in this blog post to get the right graphics driver and to ensure your distro has a compatible Mesa version..
Below you can see the Gazebo application simulating a robot exploring a virtual cave, as well as the Rviz application visualizing the camera feed of the robot and its laser field sensor’s output. Thanks to GPU accelerated 3D graphics we can run this demo at 60 FPS!
How does this feature work?
From the demos above, you might have noticed we didn’t need to start an X server manually. That’s because with this feature we are automatically starting a companion system distro, containing a Wayland, X server, pulse audio server, and everything else needed to make Linux GUI apps communicate with Windows. After you’re finished using GUI applications and terminate your WSL distribution the system distro will automatically end its session as well.
Like with the rest of WSL plumbing, our intention is for this component to be fully managed and seamless for users. Our intentions are for this system distro to be as invisible to the user as possible, and this is why you won’t see this system distro when you run wsl -l -v . Lastly, we’re excited to present that we are using Microsoft’s CBL-Mariner distribution for this system distro! CBL-Mariner is an internal Linux distribution used traditionally for Microsoft’s cloud infrastructure and edge products and services, and we are now extending its use to support GUI apps inside of WSL. You can view the diagram below to see an overall summary of the architecture of this feature.
For a full in depth view of what we did to make this feature possible and the deep technical details, please view this blog post written by the developers who made this feature possible.
Getting started with this feature
We are starting the rollout of this feature as an initial preview before we fully roll it into the WSL experience. To get started using Linux GUI app support, you’ll need to make sure you’re on Windows 10 Insiders preview build 21364 or higher. If you already have WSL installed, all you need to do is run wsl —update and you’ll be set to use GUI apps. If you don’t have WSL enabled, running wsl —install will install WSLg automatically as part of the initial WSL setup.
You can find the full install instructions at the GitHub repositories’ README: https://github.com/microsoft/wslg . We also highly recommend that you have GPU compute support enabled in WSL for the best performance, please see this section of the install instructions to see how you can ensure that feature is enabled.
Feedback
Please file any technical issues, or feature requests for GUI application support on the WSLg Github repository. For general WSL issues, please file them at the WSL repository. You can also follow up with me on Twitter @craigaloewen and all WSL team members that are on Twitter using this list. Please stay tuned to this blog for more exciting WSL announcements, and we can’t wait to hear what you think about this new feature.
Источник
🇮🇹 Что такое GUI (графический интерфейс пользователя)?
GUI или графический пользовательский интерфейс – это интерфейс, предоставляемый пользователю, суперпользователю или администратору для простого взаимодействия с системой.
Графический интерфейс обычно состоит из одного прикосновения или нажатия компонентов, таких как кнопка, текстовое поле, слайдер, изображение и т. д.
История GUI
GUI был разработан в конце 1970-х годов, и до появления GUI существовал интерфейс командной строки или CLI, который представляет собой отвратительный интерфейс, обычно используемый техническими или профессиональными людьми.
Первый коммерчески доступный графический интерфейс разработан Xerox под названием PARC.
Он выпущен с именованной информационной системой Xerox 8010, выпущенной в 1981 году.
После этого Стив Джобс увидел GUI в туре по Xerox. Запущена операционная система Apple на основе графического интерфейса для персонального компьютера Macintosh, выпущенная в 1984 году.
После этого выпуска Windows также начала разработку операционной системы на основе графического интерфейса, в которой 1985 год был выпущен на основе графического интерфейса для Windows 1.0.
GUI Компоненты
Графический интерфейс состоит из разных компонентов.
Не все компоненты должны существовать в графическом интерфейсе, но в большинстве случаев эти компоненты используются.
- Окно является одним из самых популярных компонентов графического интерфейса. Обычно окно содержит несколько компонентов графического интерфейса. Окно также используется в качестве интерфейса для разных приложений
- Кнопка обычно используется для запуска действия, такого как сохранение, редактирование, запуск, остановка некоторых действий в графическом интерфейсе.
- Метка представляет собой текстовую метку, которая используется для предоставления информации с текстом.
- Текстовое поле используется для ввода текстовой информации в графический интерфейс и очень популярный компонент.
- Ползунок используется для перемещения указателя, чтобы установить конкретное значение.
- Изображение – это еще один популярный компонент, который используется для отображения некоторых изображений в графическом интерфейсе.
- Видео является популярным компонентом, где могут быть показаны различные типы видео.
- Чекбокс используется для предоставления нескольких опций для проверки одного или нескольких из них.
- Панель – это часть экрана, которая предоставляет ярлыки или список чего-либо.
- Tab предоставляет несколько экранов в Windows, что очень удобно для размещения множества компонентов графического интерфейса в одном окне.
- Значок используется, чтобы показать небольшую картинку
- Мышь – аппаратная, но очень важная для пользовательского ввода в графический интерфейс
- Клавиатура – это другое оборудование, которое обеспечивает ввод для таких компонентов, как текстовое поле.
- Меню предоставляет несколько ярлыков в окне, чтобы открыть их.
- Указатель используется для выбора и взаимодействия с компонентами графического интерфейса с помощью мыши.
- Рабочий стол используется в операционных системах для предоставления пользователю основного экрана с различными инструментами и компонентами графического интерфейса, такими как меню, окно, изображение и т. д.
Преимущества GUI
До GUI интерфейс командной строки или простой CLI был способом взаимодействия с системой или приложениями.
С развитием и использованием графического интерфейса популярность компьютерных систем возросла, поскольку она дает много преимуществ.
Вот некоторые преимущества GUI.
- Графический интерфейс более дружественный и приятный для глаз.
- GUI обеспечивает легкий доступ к функциям системы и приложений
- GUI может использоваться с очень небольшими знаниями, что полезно для начинающих пользователей.
- GUI обеспечивает визуально богатый вывод и информацию относительно CLI.
Примеры GUI
Сегодня многие операционные системы, программы и приложения имеют графический интерфейс. Здесь мы перечислим различные типы GUI
Google Chrome предоставляет классические компоненты графического интерфейса, такие как вкладка, меню, кнопка, изображение и т. д.
Windows Server GUI предоставляет пользователям доступ к рабочему столу.
Windows Проводник GUI предоставляет левую панель для навигации с панелью для списка файлов и папок
Linux GUI
Linux – открытая и вызывающая операционная система.
Linux в основном начинался как операционная система на основе командной строки, которая в основном предназначена для опытных пользователей.
Со временем он сильно изменился и интегрировал различные компоненты и инструменты графического интерфейса, такие как Desktop Manager.
Linux имеет тот же опыт для Windows с точки зрения рабочего стола.
Linux предоставляет различные графические окружения рабочего стола, как показано ниже.
Графический интерфейс Windows
Windows – самая популярная операционная система пользовательского уровня, где ее графический интерфейс делает ее настолько популярной.
Windows предоставляет своим пользователям очень простой интерфейс с графическим интерфейсом, где дети, пожилые люди, не имеющие технической подготовки могут легко изучить и использовать его.
Windows в основном предназначалась для использования в основном с мышью, а в некоторых случаях с клавиатурой.
Источник
Run Linux GUI apps on the Windows Subsystem for Linux (preview)
You can now preview Windows Subsystem for Linux (WSL) support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.
WSL 2 enables Linux GUI applications to feel native and natural to use on Windows.
- Launch Linux apps from the Windows Start menu
- Pin Linux apps to the Windows task bar
- Use alt-tab to switch between Linux and Windows apps
- Cut + Paste across Windows and Linux apps
You can now integrate both Windows and Linux applications into your workflow for a seamless desktop experience.
Install support for Linux GUI apps
Prerequisites
You will need to be on Windows 11 Build 22000 or higher to access this feature. You can join the Windows Insiders Program to get the latest preview builds.
Installed driver for vGPU
To run Linux GUI apps, you should first install the preview driver matching your system below. This will enable you to use a virtual GPU (vGPU) so you can benefit from hardware accelerated OpenGL rendering.
Fresh install — No prior WSL installation
If you have not already done so, install WSL and set up a user name and password for your Linux distribution.
Open a command prompt with administrator privileges.
Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.
Run this command and reboot your machine when prompted:
Once your machine has finished rebooting, installation will continue and you will be asked to enter a username and password. This will be your Linux credential for the Ubuntu distribution.
You’re now ready to begin using Linux GUI apps on WSL!
Existing WSL install
If you already have WSL installed on your machine, 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:
You will need to restart WSL for the update to take effect. You can restart WSL by running the shutdown command in PowerShell.
Linux GUI apps are only supported with WSL 2 and will not work with a Linux distribution configured for WSL 1. Read about how to change your distribution from WSL 1 to WSL 2.
Run Linux GUI apps
You can run the following commands from your Linux terminal to download and install these popular Linux applications. If you are using a different distribution than Ubuntu, it may use a different package manager than apt. Once the Linux application is installed, you can find it in your Start menu under the distribution name. For example: Ubuntu -> Microsoft Edge .
Update the packages in your distribution
Install Gedit
Gedit is the default text editor of the GNOME desktop environment.
To launch your bashrc file in the editor, enter: gedit
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.
To launch, enter: gimp
Install Nautilus
Nautilus, also known as GNOME Files, is the file manager for the GNOME desktop. (Similiar to Windows File Explorer).
To launch, enter: nautilus
Install VLC
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files.
To launch, enter: vlc
Install X11 apps
X11 is the Linux windowing system and this is a miscellaneous collection of apps and tools that ship with it, such as the xclock, xcalc calculator, xclipboard for cut and paste, xev for event testing, etc. See the x.org docs for more info.
To launch, enter the name of the tool you would like to use. For example:
Install Google Chrome for Linux
To install the Google Chrome for Linux:
- Change directories into the temp folder: cd /tmp
- Use wget to download it: sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- Get the current stable version: sudo dpkg -i google-chrome-stable_current_amd64.deb
- Fix the package: sudo apt install —fix-broken -y
- Configure the package: sudo dpkg -i google-chrome-stable_current_amd64.deb
To launch, enter: google-chrome
Install Microsoft Teams for Linux
To install Microsoft Teams for Linux:
- Change directories into the temp folder: cd /tmp
- Use curl to download the package: sudo curl -L -o «./teams.deb» «https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb»
- Use apt to install it: sudo apt install ./teams.deb -y
To launch, enter: teams
Install Microsoft Edge browser for Linux
Find information on how to install the Microsoft Edge browser for Linux using the command line on the Edge Insider site. Select Get instructions under the Command line installation section of the page.
Источник