{"id":32713,"date":"2023-08-11T09:42:57","date_gmt":"2023-08-11T01:42:57","guid":{"rendered":"https:\/\/www.deepin.org\/?p=32713"},"modified":"2023-10-09T13:43:34","modified_gmt":"2023-10-09T05:43:34","slug":"deepin-v23-adapted-wsl","status":"publish","type":"post","link":"https:\/\/www.deepin.org.cn\/en\/deepin-v23-adapted-wsl\/","title":{"rendered":"deepin V23 successfully adapted to WSL, what did we do?"},"content":{"rendered":"<img loading=\"lazy\" class=\"aligncenter\" src=\"https:\/\/storage.deepin.org\/thread\/202308110932367129_WSL.png\" alt=\"\" width=\"800\" height=\"340\" \/><\/p>\n<p class=\"ql-direction-ltr\"><span class=\"ql-author-10365\"> In the released deepin V23 beta\uff0cdeepin has officially adapted WSL!<\/span><\/p>\n<p class=\"ql-direction-ltr\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<p class=\"ql-direction-ltr\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<p class=\"ql-direction-ltr\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<h2 class=\"ql-direction-ltr\" style=\"text-align: center;\" data-header=\"2\" data-foldable=\"true\" data-default-linespacing=\"100\"><span class=\"ql-author-10365\">Selection of WSL-adapted Solutions<\/span><\/h2>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<p class=\"ql-long-10365 ql-direction-ltr\"><span class=\"ql-author-10365\">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.\u00a0 So, we decided to run deepin's homegrown apps in WSLg instead of a full desktop environment.<\/span><\/p>\n<h2 class=\"ql-direction-ltr\" style=\"text-align: center;\" data-header=\"2\" data-foldable=\"true\" data-default-linespacing=\"100\"><span class=\"ql-author-10365\">Problems and Solutions<\/span><\/h2>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<ol>\n<li class=\"\"><span class=\"ql-author-10365\">Unusual location of setup options after installing the platform plugin<\/span><\/li>\n<\/ol>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<ol start=\"2\">\n<li class=\"\"><span class=\"ql-author-10365\">Redundant title bar and border<\/span><\/li>\n<\/ol>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<ol start=\"3\">\n<li class=\"\"><span class=\"ql-author-10365\">Application display anomaly<\/span><\/li>\n<\/ol>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<h2 class=\"ql-direction-ltr\" data-header=\"2\" data-foldable=\"true\" data-default-linespacing=\"100\"><span class=\"ql-author-10365\">Running effects of deepin's self-developed apps<\/span><\/h2>\n<p class=\"ql-direction-ltr\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<ol>\n<li class=\"\"><span class=\"ql-author-10365\">Terminal of deepin<\/span><\/li>\n<\/ol>\n<p class=\"ql-direction-ltr ql-long-10365\"><img loading=\"lazy\" class=\"aligncenter\" src=\"https:\/\/storage.deepin.org\/thread\/202308110931356085_wsl-1.png\" alt=\"\" width=\"841\" height=\"473\" \/><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">2.<\/span>Drawing board of deepin<\/p>\n<p class=\"ql-direction-ltr ql-long-10365\"><img loading=\"lazy\" class=\"aligncenter\" src=\"https:\/\/storage.deepin.org\/thread\/202308110937401428_wsl-2.png\" alt=\"\" width=\"691\" height=\"389\" \/><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">3.<\/span>Photo album of deepin<\/p>\n<p class=\"ql-direction-ltr ql-long-10365\"><img loading=\"lazy\" class=\"aligncenter\" src=\"https:\/\/storage.deepin.org\/thread\/202308110938143795_wsl-3.png\" alt=\"\" width=\"1280\" height=\"720\" \/><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-direction-ltr ql-long-10365\"><span class=\"ql-author-10365\">4.<\/span>Show application list under Windows menu bar<\/p>\n<p class=\"ql-direction-ltr\"><span class=\"ql-author-10365\">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.<\/span><\/p>\n<p class=\"ql-long-10365\"><img loading=\"lazy\" class=\"aligncenter\" src=\"https:\/\/storage.deepin.org\/thread\/202308110938403461_wsl-4.png\" alt=\"\" width=\"639\" height=\"660\" \/><\/p>\n<h2 class=\"ql-direction-ltr\" style=\"text-align: center;\" data-header=\"2\" data-foldable=\"true\" data-default-linespacing=\"100\"><span class=\"ql-author-10365\">Future Prospects<\/span><\/h2>\n<p class=\"ql-long-10365 ql-direction-ltr\"><span class=\"ql-author-10365\">We are very grateful to our partners in the deepin community for their help and support during the adaptation process, and to <a href=\"https:\/\/github.com\/yuk7\">yuk7<\/a>\u00a0 for providing the WSLDL tool.<\/span><\/p>\n<p class=\"ql-long-10365 ql-direction-ltr\"><span class=\"ql-author-10365\">Currently, our <a href=\"https:\/\/github.com\/deepin-community\/deepin-rootfs\">deepin-rootfs\u00a0<\/a> 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.<\/span><\/p>\n<p class=\"ql-long-10365 ql-direction-ltr\"><span class=\"ql-author-10365\">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 <a href=\"https:\/\/cdimage.deepin.com\/WSL\/deepin.zip\">deepin.zip<\/a> .<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>In the released deepin V23 beta\uff0cdeepin 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 href=https:\/\/www.deepin.org.cn\/en\/deepin-v23-adapted-wsl\/>Read more<\/a><\/p>\n","protected":false},"author":11164,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[93],"tags":[],"_links":{"self":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/32713"}],"collection":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/users\/11164"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/comments?post=32713"}],"version-history":[{"count":1,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/32713\/revisions"}],"predecessor-version":[{"id":32714,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/32713\/revisions\/32714"}],"wp:attachment":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/media?parent=32713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/categories?post=32713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/tags?post=32713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}