In the released deepin V23 beta,deepin has officially adapted WSL!

WSL stands for Windows Subsystem for Linux, which is a technology that allows users to run Linux on Windows. WSL enables you to freely switch or integrate between Windows and Linux, develop or test Linux-related projects using open source tools and environments. And at the same time enjoy Windows' support and performance optimisation of the hardware support and performance optimisation, run Linux applications and experience various Linux distributions.

A new feature from Microsoft, WSLg lets users run Linux GUI applications in WSL2 and seamlessly integrates into the Windows desktop.WSLg includes a Wayland server, an RDP client, and a PulseAudio server to support graphics, audio, and input devices.

Next, we will share the process of adapting deepin V23 beta to WSL, including the choice of solution, problem solving in the adaptation, and methods to achieve the core objectives.

Selection of WSL-adapted Solutions

We chose an adaptation solution based on WSL2. Because WSL2 has the WSLg extension, which improves performance, enhances system call compatibility, and also allows users to enjoy the beautiful interface and powerful features of deepin on Windows as well.

We made the root filesystem using the debootstrap tool, which can quickly generate a basic Debian system.To accommodate the command line approach of WSL, we include only a few necessary packages, and users can install deepin's homegrown applications on their own. In addition, we have utilised yuk7's WSLDL tool, which makes it easy to install, launch, configure and manage deepin WSL.

In the process of adapting WSL, we wanted to implement a full desktop environment on WSL. We tried running an X server on WSL, remotely launching the desktop environment with a Windows RDP client, or connecting to a Windows X server with WSL. But due to some changes in the way the desktop environment is launched in the deepin V23 beta, none of these methods were a good experience.  So, we decided to run deepin's homegrown apps in WSLg instead of a full desktop environment.

Problems and Solutions

Because WSLg uses Weston instead of deepin's KWin as the window manager, you may encounter some problems when using deepin graphical applications that are different from the native Linux desktop environment.

  1. Unusual location of setup options after installing the platform plugin

WSLg uses the RDP protocol to transport the graphical interface. Since the RDP protocol does not support the system tray icon, the deepin graphical application is unable to display the setup options in WSLg. This can cause inconvenience for users to adjust configuration or exit the application. Our solution is to add a setup button or menu item to the main window of the application, or to control the application with command line parameters.

  1. Redundant title bar and border

WSLg uses Weston as a window manager, and Weston adds a title bar and border to the window, which are duplicated by the title bar and border of the deepin graphics application, affecting the window's aesthetics. Our solution is to let the deepin graphics application detect if it is running in the WSLg environment and hide or adjust its own title bar and border as appropriate.

  1. Application display anomaly

WSLg uses RDP protocol to transport graphical interfaces, but RDP protocol has some limitations or features, such as no support for transparency, no support for hardware acceleration, no support for multi-screen, and so on. This can make some deepin graphical applications display improperly or not fully functional in WSLg. Our solution is to let deepin graphic apps detect whether they are running in WSLg environment or not, and reduce or disable some advanced features or effects according to the situation.

Running effects of deepin's self-developed apps

deepin's self-developed applications are one of the highlights of the system, they are well-designed, powerful, beautiful interface and friendly interaction. The following is the effect of running some of deepin's self-developed applications with WSLg.

  1. Terminal of deepin

 

2.Drawing board of deepin

 

3.Photo album of deepin

 

4.Show application list under Windows menu bar

After completing the installation of the deepin WSL application and starting it again, the registered installed deepin applications will be displayed under the Windows menu bar.

Future Prospects

We are very grateful to our partners in the deepin community for their help and support during the adaptation process, and to yuk7  for providing the WSLDL tool.

Currently, our deepin-rootfs  project under the deepin-community organization on github has released the root file and WSLDL package. Users can download it by themselves, and we will provide the We will provide a tutorial on how to use it. We plan to release deepin WSL to the Microsoft App Store, so that users can download and update it more conveniently.

We hope deepin WSL provides a new option for users on Windows. If you want to try Linux on Windows or use the deepin application, you can download it from deepin.zip .

Leave a Reply