Member-only story
Run X-Display from WSL
Launch GUI App from WSL
Overview
I wanted to run an login app (aws-azure-login) from WSL which display GUI, but it could not run showing the following error — Unable to Open X-Display
Since WSL distro does not come with GUI, we need to install a X-Server on our Windows Host and Connect to it from WSL.
Install and configure
Follow the steps below to install and configure X-Server.
- Download and Install VcXsrv Windows X Server which is available from https://sourceforge.net/projects/vcxsrv/
- Configure according to screenshots below:
3. Enable Outgoing Connection from Windows Firewall -
Windows Security -> Firewall & network protection -> Allow an app through firewall -> make sure VcXsrv has both public and private checked.