When launching an app with GUI I have no error message but no window shows up. My display variable is set to (don't know if it helps).

Running on a AMD laptop with a Ryzen 5 2500U.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Oct 19, 2021 at 7:50
  • Welcome to Super User! Just to clarify, did you upgrade Windows 10 to Windows 11? Did you previously use an X server on Windows 10 and are now trying to use WSLg on Windows 11? The $DISPLAY being set to an IP makes me think this is an upgrade, but you don't mentioned WSLg (or have that tag), so I'm just not sure what you are trying to do for sure. Also, if this is a 10->11 upgrade, did you run wsl --update? Edit your question to include as many details as you can about what you've done. Thanks! Commented Oct 19, 2021 at 12:23
  • Have you tried performing wsl --update in Command Prompt or PowerShell?
    – Head
    Commented Oct 23, 2021 at 15:12

2 Answers 2


I'm going to make an assumption for the moment, but please do edit your question with the additional details that I requested in the comments so that we can make sure that other users in the future can more easily find your question.

My assumption:

  • You were running Windows 10 before
  • At some point you were either using an X server (such as VcXsrv or GWSL) under WSL in Windows 10 or you attempted to.
  • You upgraded the Windows 10 release to Windows 11
  • You have run wsl --update in Windows 11 to update your WSL release to include WSLg.
  • You are now trying to use the WSLg feature in Windows 11 to launch GUI applications.

The $DISPLAY of makes me think this, since the default $DISPLAY in a newly installed Windows 11 Ubuntu would simply be :0.


cd ~
grep -r --exclude-dir=* DISPLAY

If you find any results in startup config files like .bashrc, edit the startup files to remove any custom DISPLAY settings you made in the past.

  • Wow! Thanks a lot)
    – raacer
    Commented Dec 11, 2022 at 23:10

I'm having exactly this problem

~$ grep DISPLAY .bashrc
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 # in WSL 2

This is with 'Ubuntu on Windows', which was on my machine when I upgraded it to Win11 and which I subsequently upgraded to Jammy Jellyfish 22.04.03.

I also got Ubuntu 22.04.02 from the Windows Store and installed it after the upgrade to Windows 11. It had no problem with GUIs and its DISPLAY was set to ":0"

declare -x DISPLAY=:0

worked great. So this is all as @NotTheDr01ds said, but I can assert that the problem is the .bashrc file and by commenting that line out it'll be resolved -- I don't know where it does get set, but you don't have to explicitly set the DISPLAY to :0

~$ grep -B1 DISPLAY ~/.bashrc
# from https://wiki.ubuntu.com/WSL#Running_Graphical_Applications
# export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 # in WSL 2

You must log in to answer this question.

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