2

I've been trying to install graphical apps on wsl for 2 months now without success using xLaunch and I haven't found any working solution yet...

Here is what I get when I try to launch a graphical app :

Wsl trying to open xeyes

I currently am on Windows 10 21H1.

For xLauncher preset, I use :

- multiple windows
- Startwith no client
- Clipboard / Primary Selection / Native openGL / Disable access control

and for my ~/.bashrc I have :

export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
export XDG_RUNTIME_DIR=/tmp/xdg
export RUNLEVEL=3

Any help would be welcome, and I can always add any other information that could help

  • 1
    @Ramhound: I think the post you marked as duplicate is not a good match for this one. – harrymc Nov 26 '21 at 16:48
  • 1
    What I don't understand is that wsl graphical was available before windows 11 so why the fact that it is easier on windows 11 should mean that it should work on my computer, people had issues with it before and windows 11 wasn't out... – Imbert Ivan Nov 26 '21 at 19:06
  • 1
    @Ramhound: You mention that fact in an answer, but the subject of that post is quite different. I leave it to you to decide whether to reopen this one or not. – harrymc Nov 26 '21 at 19:31
  • 1
    @Ramhound As harrymc said, there seems to be no relation between the question you linked and this one. This question never asked about upgrading to Windows 11. Windows 10 absolutely supports running third-party X servers with WSL, and has for at least 5 years now. While there have been other questions here on Super User about running third-party X servers, most seem to be about the lack of `DISPLAY` variable being set properly in the first place. – NotTheDr01ds Nov 26 '21 at 21:23
  • This question is being discussed on [meta.superuser.com](https://meta.superuser.com/q/14578/1210833) – NotTheDr01ds Nov 27 '21 at 14:40

1 Answers1

0

From Run Linux GUI apps on the Windows Subsystem for Linux:

Prerequisites

You will need to be on Windows 11 Build 22000 or higher to access this feature.

You need to upgrade to Windows 11 for this feature in WSL2.

You might instead try by downgrading to WSL1.

At the time that I wrote my answer (which you might have used here), I found the method in an Ubuntu article that might have not differentiated between the two WSL versions. It's possible that it only works in WSL1.

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • What about in october ? windows 11 was not out and yet I still could not do it... – Imbert Ivan Nov 26 '21 at 19:07
  • Microsoft has released Windows 11 and 10, both at the same version level of 21H2. It might be that Windows 10 version 21H2 will also already support it, but I can't guarantee that, since officially Microsoft declared it for Windows 11. – harrymc Nov 26 '21 at 19:28
  • Looking at [Windows 10 November 2021 Update](https://support.microsoft.com/en-us/windows/inside-this-update-93c5c27c-f96e-43c2-a08e-5812d92f220d?ocid=wusettings#windowsupdate=19044&WindowsVersion=Windows_10_November_2021_Update), this feature is not included. – harrymc Nov 27 '21 at 20:23
  • @harrymc Sure, but we knew that. But what confuses me is that this question has nothing to do with WSLg, so why are you telling the OP to upgrade to Windows 11? You've been answering "run GUI apps on Windows 10" questions for a few years. Consider [this one](https://superuser.com/a/1580614/1210833) -- The user in this case is using XLaunch (presumably from Cygwin, which you say in that answer is a possibility). They are practically using *your* instructions from two years ago. So why are you now saying that they "need to upgrade to Windows 11 for this feature"? – NotTheDr01ds Nov 27 '21 at 21:49
  • @NotTheDr01ds: Windows changes constantly, and besides, I think that the answer you linked-to only pertains to WSL1 (it cites an Ubuntu article, not Microsoft). This post seems to indicate that the advice doesn't work for WSL2, and should not in my opinion have been closed as duplicate. For WSL2 one should really upgrade to Windows 11. – harrymc Nov 28 '21 at 09:58