Quantcast
Channel: Is it possible to install the Ubuntu default gnome desktop environment on the Windows subsystem for Linux without a remote desktop program? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Answer by NotTheDr01ds for Is it possible to install the Ubuntu default gnome desktop environment on the Windows subsystem for Linux without a remote desktop program?

$
0
0

From your comment:

Doesn't hurt to try things out right?

You are absolutely correct, especially if it's just experimentation for learning purposes. WSL is a great way to get exposure to a lot of different Linux technologies while staying within Windows.

There are a few different things you would need to solve for running Ubuntu Desktop in WSLg. Some are pretty easy. Others, not-so-much.

  • First, the "hard part" -- Gnome requires Systemd, which WSL doesn't support. I haven't watched the video you linked in the comments, but if it covers getting Ubuntu Desktop on WSL, then it probably uses a Systemd enablement script. I really don't recommend these without really understanding what is going on. See my answer here for more details.

    If you want a desktop environment under WSLg, I would recommend one that doesn't require Systemd, such as (but not limited to, of course) Xfce4.

    On the other hand, if you are using WSL2 to get exposure to different Linux technologies, then deep-diving on Systemd is a very interesting project. I'm currently digging in quite deep on Systemd on WSL myself for my own reasons.

  • Second, WSLg under Windows 11 uses a Weston backend (in a different, "system" distribution) for display of GUI apps. It actually uses the RDP protocol (with some extensions that have been open-sourced) in Windows to connect to the Weston display.

    As noted in this answer, Weston is the reference Wayland server, and a Wayland server provides its own window manager. This means, to run a desktop environment with a window manager under WSLg, you need to run either "Weston in Weston" or (more likely for more DEs today), a full-screen Xwayland window in which you run the DE. See that answer for details on how to do that.

    You could also use full-screen VcXsrv or another X server in Windows.

Even in Windows 11 with WSLg, I'm still thinking that xrdp (in WSL) with the Windows RDP client is the best way to access any full-screen desktop environment in WSL, as in this answer. There are multiple reasons for this:

  • At least currently, RDP is a much more stable technology than Xwayland under Weston under WSLg. I continue to run into keyboard (and other) issues when attempting to use Xwayland to run a desktop environment. This will likely improve with time, but realize that RDP (the Windows client, at least) is a business critical application for Enterprise applications (Azure, and many others). It's going to be very robust and well-supported by Microsoft.

  • Once you are in a full-screen RDP session, things like Alt+Tab work as expected in the DE. As long as you are running a third-party XServer or Xwayland, Windows continues to trap Alt+Tab, taking you away from your DE.


Viewing all articles
Browse latest Browse all 2

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>