The goal here is to use Octave to demonstrate how WSLg works, not to go through the theory of fractals.įirst thing is to install the software like we did for x11-apps, from the terminal prompt run:ĭo not forget the ampersand & at the end of the line, so the application is started in the background and we can continue using the same terminal window.
We will use it to calculate and draw a beautiful Julia fractal. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB. Ⓘ GNU Octave is software featuring a high-level programming language, primarily intended for numerical computations. In the following example, we will use GNU Octave to perform numerical computation. Xcalc and xeyes are very basic X Windows applications but there are plenty of choices in the Linux ecosystem corresponding to your needs and available out of the box on Ubuntu. That’s one way you can distinguish applications running on Windows or Ubuntu (besides the window decoration and styling).Ĭlose xeyes and xcalc by pressing the cross icon on the top right corner of each X application window. Note that applications running under WSLg display a little penguin at the bottom right corner of their icons in the Windows taskbar. This shows that several GUI applications can interact together. When you move the cursor over the calculator, xeyes follows the cursor. Leave xeyes opened and run the calculator xcalc with: Next executions of GUI applications are much faster.
The first launch of a GUI application takes a few seconds while WSL is initializing the graphics stack. In other words, the shell will run the command in the background and return to the command prompt immediately. The & at the end of the line will execute the command asynchronously. To run the xeyes, a “follow the mouse” application, type: Then, start with some basic X11 applications: To check that you have the latest package lists, type: WSLg allows you to run graphical linux applications. On Windows 11, WSL comes with WSLg enabled by default.
To check the build number, open the Windows menu by pressing the Windows key, then type about in the search field, as shown in the following screenshot:įinally, it’s always good practice to install the latest updates with the following commands, entering your password when prompted. Virtual Machine Platform optional feature is enabled.You are running Windows 11 (build 22000 or higher).Make sure the following prerequisites are met before installing: Installation from the store will install the latest version of WSL with all the latest features. In Windows 11, it is also available directly from the Microsoft store as an application.
We saw in the tutorial Install Ubuntu WSL on Windows 10 that WSL can be installed from the command line. Ⓘ Note: This tutorial doesn’t cover GPU acceleration which is covered in a tutorial of its own. A Windows 11 physical or virtual machine with all the updates installed.
Ⓘ Note: For Windows 10 users please refer to our alternative tutorial here.
How to install and run a much more advanced application that uses WSLg.How to install and run a simple graphical application that uses WSLg.How to enable and install WSL on Windows 11.Windows Subsystem for Linux (WSL) allows you to install a complete Ubuntu terminal environment in minutes on your Windows machine, allowing you to develop cross-platform applications without leaving windows. Run Graphical Applications with Ubuntu on WSL2 for Windows 1:00