Error trying to graph " can't open display"

Hi, I use root in the windows 10 ubuntu subsystem and to be able to graph I found that I must install Xming. After installing it, and trying to graph something easy, I get the following error:

Error in <TGClient::TGClient>: can't open display ":0", switching to batch mode...
 In case you run from a remote ssh session, reconnect with ssh -Y
Info in <TCanvas::MakeDefCanvas>:  created default TCanvas with name c1

Thanks for the help. I am new to root and ubuntu so a specific answer would be appreciated.

@vpadulan @jblomer IIRC you had some experience with WSL, could you share what needs to be done to get Xming to work with WSL?

I didn’t use X11 with WSL2 myself, but there are some guides on how to set it up, e.g. this one.

I read that Microsoft is about to bundle a Wayland server with WSL2, which should very much simplify running graphical applications (including X11 apps through the XWayland compatibility layer).

1 Like

Hi, I decided to install Ubuntu 19 in a virtualbox and installed root 6.22. When I start root it shows me the following message:

**ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!**
**Invoking:**
**  LC_ALL=C x86_64-linux-gnu-g++-9  -O3 -DNDEBUG -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,${' -e '/^ \/.*++/p' -e '}'**
**Results was:**
**With exit code 0**

So far root has worked correctly, but looking at the tutorials one of the examples was calling the interference pattern code root slits.C and it showed me the following error:

error: expected ';' after expression
root slits.C
    ^
    ;
ROOT_prompt_40:1:6: error: use of undeclared identifier 'slits'
root slits.C
     ^

Because of these two errors, I don’t really know if I installed root cern correctly or if I will have problems in the future, I want to know.

From where are you using slits.C ?
$ROOTSYS/documentation/primer/macros ?

Does sudo apt install g++ help?

is probably something you want to type at the shell not within ROOT. Within ROOT you run macros as .x slits.C.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.