3

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

6
  • 1
    @Ramhound: I think the post you marked as duplicate is not a good match for this one.
    – harrymc
    Commented Nov 26, 2021 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... Commented Nov 26, 2021 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
    Commented Nov 26, 2021 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. Commented Nov 26, 2021 at 21:23
  • This question is being discussed on meta.superuser.com Commented Nov 27, 2021 at 14:40

1 Answer 1

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.

EDIT: Graphical apps have now been ported also to WSL2 in Windows 10. Upgrade to Windows 11 is no longer required.

See Run Linux GUI apps on the Windows Subsystem for Linux.

6
  • What about in october ? windows 11 was not out and yet I still could not do it... Commented Nov 26, 2021 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
    Commented Nov 26, 2021 at 19:28
  • Looking at Windows 10 November 2021 Update, this feature is not included.
    – harrymc
    Commented Nov 27, 2021 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 -- 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"? Commented Nov 27, 2021 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
    Commented Nov 28, 2021 at 9:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .