Couldn't connect to display

Hello everyone,
When I try to start flair, the terminal gives me the error: couldn’t connect to display “172.30.144.1:0”.
I tried to look at the previous solved questions, but I was not able to find the log file for Xming (with right click on the icon I did not find the View log option).
After that, I tried to use sudo nano /etc/profile.d/wsl.sh
and add the following line
export DISPLAY="grep nameserver /etc/resolv.conf | sed 's/nameserver //':0"
but, it hasn’t worked since I’m getting the same error.
Thanks
Lovepreet Singh

Dear @Singh,

instead of staring Xming directly, please use the XLaunch app with No Access Control enabled.

Cheers,
David

Dear Sir,
I have tried to do so, but it does not change the situation.
Thanks
Lovepreet

Dear @Singh,

please check if the Xming X Server is allowed through the Windows firewall:

If this still doesn’t solve the issue, you can try to use MobaXterm (https://mobaxterm.mobatek.net/) instead of Xming.

Cheers,
David

Dear Sir,
I have the same problem with MobaXterm that is:
No protocol specified
No protocol specified
couldn’t connect to display “172.30.144.1:0”

Now, these three lines appear in both terminals.
Thanks
Lovepreet

Dear @Singh,

please first restart your PC, they check if the $DISPLAY variable is correctly set in WSL with the command:

echo $DISPLAY

This should return an IP address plus :0 at the end.

Then check the Xming log. If you can’t find the by right clicking on the Xming icon on the task bar (it should be the secont menu item from the top), it is located in the %TMP% location (while Xming is running), which you can open in the Windows file manager. The log should contain a line XdmcpRegistereConnection: newAddress + an IP address.

The two IP addresses should be the same.

Cheers,
David

Dear Sir,
Now it’s working. I can open Flair now.
Thanks
Lovepreet