Score:1

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

id flag

Is it possible to install the Ubuntu default GNOME desktop environment on Windows Subsystem for Linux without a remote desktop program? And if so, how? As you can see I'm a absolute Linux newcomer.

Nmath avatar
ng flag
Desktop environments are not officially supported yet on WSL. You also wouldn't use "remote desktop"-- that's for controlling a device from somewhere else. Do you mean VM or "Virtual Machine"? That's the easiest way to get Ubuntu Desktop on your Windows desktop.
UDONTO avatar
id flag
No not that, what I've seen so far was tutorials were a desktop from Wsl could be accessed via programs like windows remote desktop or VcXsrv Windows X Server (Here is a example https://www.youtube.com/watch?v=8SuERIEJJUA) . And I was wondering if I could (for example) Render the desktop within the Wsl app or open it via a command in the terminal. But as it seems this is not the case.
Nmath avatar
ng flag
People have gotten desktop environments working over WSL but since it's not supported it is not really a task for an "absolute Linux newcomer". If you want a Ubuntu Desktop on Windows, use a VM like VirtualBox.
UDONTO avatar
id flag
Yeah I Know that it isn't something a newcomer should do the first time they get their hands on Linux. But what would I be looking into if wanted to do so? Doesn't hurt to try things out right?
Nmath avatar
ng flag
You would be looking doing at lot of research, a lot of trial and error, and a lot of problem solving the complicated interworkings of the dozens of packages that coexist to form a functional desktop environment. You're looking at going "against the current" from how the software is currently programmed to run. Also because the platform is being continually developed, the information you find is likely to be outdated. And if you get it working, it might not stay that way. Here's an idea: https://askubuntu.com/q/1162808
Nmath avatar
ng flag
Running full desktop environments and GUI applications over WSL is in active development and gaining support especially with WSLg in Windows 11 but WSL is a still a tool to run command line applications on Windows. If you want a desktop environment, you're using the wrong tool for the job, so you're going to have a bad time. It makes a lot more sense to overcome whatever fear or concern you have about using VirtualBox or similar VM software. The first step to achieving a task is to choose the correct tool and learn to use it properly- everything else is easy.
UDONTO avatar
id flag
... Ok that sound more difficult that expected. So if I understand this correct there is currently no way to natively run a desktop environment in Wsl. but there are projects in the works for that. mainly in the windows 11 community. Well I was just wondering if it would be possible because, no, I do not fear virtual machines. I just currently do not have enough disk space to run one, so i thought Wsl would be a more light weight "more natively running" (if that makes sense) alternative.
UDONTO avatar
id flag
And I didn't want to have a separate isolated machine running in the background (both machines should be able to access the same data).
Score:0
vn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.