Home > Blockchain >  Failed to open X11 display - How to execute SFML output on WSL - Load WSL GUI apps
Failed to open X11 display - How to execute SFML output on WSL - Load WSL GUI apps

Time:07-23

have any of you tried compile and executing SFML c project output on wsl? I tried and got

Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted

Is it possible at all to execute GUI applications through wsl?

(I've installed ubuntu's for wsl)

CodePudding user response:

If you went on the same problem

first, you need to install VcXsrv and X11 for executing GUI applications through wsl

then you have to add these 2 to your Linux subsystem environment variables:

export DISPLAY=:0

export LIBGL_ALWAYS_INDIRECT=0

  • Related