How to setup Xming in Ubuntu on windows 10

I installed ROOT on Windows 10 using Ubuntu, however, I am having trouble setting up Xming. I tried adding commands I saw online to setup Xming for display but I am always getting the error: Can’t open display: localhost:0.0 every time I try to plot something. Some of the commands I added to the bashrc file are :

  • export DISPLAY=$(awk ‘/nameserver / {print $2; exit}’ /etc/resolv.conf 2>/dev/null):0 # wsl2
  • export DISPLAY=localhost:0.0

Is there a way to fix it? Thank you so much in advance.

At least, remove the line: “export DISPLAY=localhost:0.0

See also:

Thank you so much for your help!
Turns out I needed to download VcXsrv ( Windows X server) and launch it. So, it is working now.