Flair can’t connect to display using WSL2 (another case)

This is another case of Flair not connecting to the Display. Error message is:
“Couldn’t connect to display “;0”
This is run with Ubuntu 20.04 LTS in WSL2 with Xming (using Xlaunch with “no access control” checked as required).

Some of the solutions to this as recommended from previous posts on the forum were tried.

  1. Firewall looked at to be sure it will let Xming through. ( is checked for both private and public)
  2. Using sudo nano /etc/profile.d/wsl.sh
    The file wsl.sh was edited to contain
    DISPLAY=“grep nameserver /etc/resolv.conf | sed 's/nameserver //':0”
    The file was saved and the editor was exited. Then Ubuntu was exited and restarted with no error
  3. Echo $DISPLAY gives while the Xming log reads
    XdmcpRegisterConnection: newAddress
  4. gfortran --version gives GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
    I have run out of ideas and any help would be greatly appreciated.

Thank you,


this seems to be some configuration problem of your setup. You might try a different X-server like MobaXterm? See Run Xming automaticall for WSL set up of FLUKA - #3 by ctheis



Thank you very much for the suggestion. I Installed MobaXterm and initially it behaved the same way as Xming. However, it did give an error message that indicated there was a program interfering with the process. I tracked the interference to McAfee and changed some of its incoming settings. That allowed flair to work. Xming also works now. Again, thank you very much for the help.