# How to setup Xming in Ubuntu on windows 10

**URL:** <https://root-forum.cern.ch/t/how-to-setup-xming-in-ubuntu-on-windows-10/47693>\
**Category:** Newbie\
**Created:** [November 17, 2021, 2:01am UTC](https://root-forum.cern.ch/t/how-to-setup-xming-in-ubuntu-on-windows-10/47693 "2021-11-17T02:01:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SarahHamad](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@SarahHamad](https://root-forum.cern.ch/u/SarahHamad)\
**Post date:** [November 17, 2021, 2:01am UTC](https://root-forum.cern.ch/t/how-to-setup-xming-in-ubuntu-on-windows-10/47693/1 "2021-11-17T02:01:29Z")

</div>

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 LIBGL\_ALWAYS\_INDIRECT=1
- export DISPLAY=localhost:0.0

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

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 17, 2021, 6:53am UTC](https://root-forum.cern.ch/t/how-to-setup-xming-in-ubuntu-on-windows-10/47693/2 "2021-11-17T06:53:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [November 17, 2021, 8:13am UTC](https://root-forum.cern.ch/t/how-to-setup-xming-in-ubuntu-on-windows-10/47693/3 "2021-11-17T08:13:19Z")

</div>

See also:

> [@Complete ROOT Installation Instructions for WSL (Ubuntu 18.04 on Windows 10)](https://root-forum.cern.ch/t/complete-root-installation-instructions-for-wsl-ubuntu-18-04-on-windows-10/35148/2):
>
> And for WSL2, see also [Install WSL on Windows 10 | Microsoft Docs](https://docs.microsoft.com/en-us/windows/wsl/install-win10) and [Running WSL GUI Apps on Windows 10](https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242)

---

<div class="post-metadata">

**Author:** ![SarahHamad](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@SarahHamad](https://root-forum.cern.ch/u/SarahHamad)\
**Post date:** [November 17, 2021, 3:01pm UTC](https://root-forum.cern.ch/t/how-to-setup-xming-in-ubuntu-on-windows-10/47693/4 "2021-11-17T15:01:31Z")

</div>

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.
