Problem Description
How can I run graphical Linux desktop applications from the command line of Windows Subsystem for Linux (WSL)?
First, I installed WSL 2 following [these steps on how to install Linux on Windows with WSL][1] :
1. I installed Windows 10 Pro Insider Preview Build 19619.
1. I installed the Ubuntu Linux distribution.
1. I changed the distribution version from WSL 1 to WSL 2.
Second, to enable graphical Linux desktop applications from the Bash shell of WSL, I followed [these steps on how to run graphical Linux desktop applications from Windows 10’s Bash shell][2] :
4. I installed an X Server that is Xming.
4. As a test I installed the graphical GTK-based editor Vim :
`sudo apt-get install vim-gtk`
6. I set my display environment variable :
`export DISPLAY=:0`
7. I tried to launch the application :
`gvim`
However, this did not launch the application. I got the following errors :
```
E233: cannot open display
Press ENTER or type command to continue
E852: The child process failed to start the GUI
Press ENTER or type command to continue
```
Any idea why this error is occurring?
[1]: https://learn.microsoft.com/en-us/windows/wsl/install-win10?redirectedfrom=MSDN
[2]: https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?