# Graphs and TBrowser not opening

**URL:** <https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661>\
**Category:** Newbie\
**Created:** [July 2, 2021, 2:28pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661 "2021-07-02T14:28:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 2, 2021, 2:28pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/1 "2021-07-02T14:28:56Z")

</div>

Hi,

I have just start learning root. I used Draw in my code but when i run it i get the error below

Error in TGClient::TGClient: can’t open display “:1”, switching to batch mode…  
In case you run from a remote ssh session, reconnect with ssh -Y

Also if i run TBwroser I get simliar error

Error in TGClient::TGClient: can’t open display “:1”, switching to batch mode…  
In case you run from a remote ssh session, reconnect with ssh -Y  
(TBrowser \*) 0x55c67dc937d0

I am not working remotely, i am running it on my laptop.

_ROOT Version:_ 6.22/08  
_Platform:_ Ferdora 34  
Compiler:gcc 11.1

---

<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:** [July 2, 2021, 2:36pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/2 "2021-07-02T14:36:37Z")

</div>

Can you try `xclock`?

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 2, 2021, 2:48pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/3 "2021-07-02T14:48:31Z")

</div>

it says the below

bash: xclock: command not found…  
Similar command is: ‘clock’

---

<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:** [July 2, 2021, 2:49pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/4 "2021-07-02T14:49:57Z")

</div>

I just want to know if you can open a graphical Window (like a Web browser for example, or if you only have the problem with ROOT)

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 2, 2021, 2:55pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/5 "2021-07-02T14:55:02Z")

</div>

I am sorry i am new to linux based system. I dont know how to open web browser from terminal. But i can use gedit from terminal.

---

<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:** [July 2, 2021, 2:59pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/6 "2021-07-02T14:59:45Z")

</div>

Well, then I don’t know, maybe a more advanced Linux user could help… @eguiraud ?

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 2, 2021, 3:00pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/7 "2021-07-02T15:00:37Z")

</div>

okay. Thanks anyways

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 2, 2021, 3:03pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/8 "2021-07-02T15:03:35Z")

</div>

Hi,  
in the ROOT prompt, what does `gROOT->IsBatch()` return? E.g. for me:

```auto
$ root -l
root [0] gROOT->IsBatch()
(bool) false

```

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 2, 2021, 3:05pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/9 "2021-07-02T15:05:18Z")

</div>

same as yours

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 2, 2021, 3:15pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/10 "2021-07-02T15:15:02Z")

</div>

Ok and then please run in the _terminal_:

```auto
$ echo $DISPLAY

```

and in the _ROOT prompt_:

```auto
root [0] TBrowser b

```

and let us know what happens 🙂

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 2, 2021, 3:20pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/11 "2021-07-02T15:20:45Z")

</div>

I am getting this

```auto
echo $DISPLAY
:1

```

```auto
TBrowser a                                                                 
Error in <TGClient::TGClient>: can't open display ":1", switching to batch mode...
In case you run from a remote ssh session, reconnect with ssh -Y
(TBrowser &) Name: Browser Title: ROOT Object Browser

```

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 2, 2021, 3:39pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/12 "2021-07-02T15:39:29Z")

</div>

Ok your environment says one thing (`$DISPLAY` is `:1`) but ROOT does not agree that it’s a valid display.

Can you think of any program or setting in your Linux environment that might mess with the display settings?

We can do a quick and desperate try, running in the terminal: `export DISPLAY=:0` and then _in the same terminal_ trying out that ROOT command (for example, just to check what happens).

---

<div class="post-metadata">

**Author:** ![James-Carroll](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/james-carroll/32/27108_2.png) [@James-Carroll](https://root-forum.cern.ch/u/James-Carroll)\
**Post date:** [July 2, 2021, 3:46pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/13 "2021-07-02T15:46:42Z")

</div>

What value do you have for `echo $WAYLAND_DISPLAY`

Fedora defaults to Wayland as the display server protocol. ROOT doesn’t have Wayland native support, and should be running with XWayland which is a compatibility shim that lets X11 applications run in Wayland.

It’s likely that this is failing for whatever reason, though I can’t offer much advice as to why, because it should be automatic.

As a workaround, on the Fedora login screen you should be able to select the option to fallback to using X11 entirely, by clicking “GNOME on Xorg”

[![](https://docs.fedoraproject.org/en-US/quick-docs/_images/gdm-pick-wayland.png) ](https://docs.fedoraproject.org/en-US/quick-docs/_images/gdm-pick-wayland.png)

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 2, 2021, 3:52pm UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/14 "2021-07-02T15:52:05Z")

</div>

wayland 🤦‍♂️ thank you @James-Carroll

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 5, 2021, 9:39am UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/15 "2021-07-05T09:39:31Z")

</div>

I am new to Linux and i have only installed required programs. If there is i dont know.

I have tried changing Dislpay it didnt work.

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 5, 2021, 9:41am UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/16 "2021-07-05T09:41:15Z")

</div>

```auto
$ echo $WAYLAND_DISPLAY
wayland-0

```

I have KDE Plasma not Gnome

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 5, 2021, 9:54am UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/17 "2021-07-05T09:54:58Z")

</div>

Yep James is right and you are using the new Wayland display server rather than the classic X11. ROOT does not support Wayland directly, and I’m not sure why the compatibility layer fails in this case. Hopefully some other user might have a suggestion.

---

<div class="post-metadata">

**Author:** ![dpkkumr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dpkkumr/32/32194_2.png) [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Post date:** [July 5, 2021, 9:56am UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/18 "2021-07-05T09:56:02Z")

</div>

Okay.  
Thanks anyway

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 5, 2021, 10:14am UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/19 "2021-07-05T10:14:03Z")

</div>

You might try to switch from KDE plasma to GNOME as we have reports of successfully running ROOT + graphics on GNOME + Wayland via XWayland.

---

<div class="post-metadata">

**Author:** ![hahnjo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hahnjo/32/34077_2.png) [@hahnjo](https://root-forum.cern.ch/u/hahnjo)\
**Post date:** [July 6, 2021, 6:31am UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661/20 "2021-07-06T06:31:54Z")

</div>

I installed Fedora’s KDE spin in a VM, and ROOT seems to work out-of-the-box. I tested both `TBrowser` and some commands from [ROOT: tutorials/graphics/first.C File Reference](https://root.cern/doc/master/first_8C.html).

@dpkkumr could you check if your system has Xwayland installed? `dnf list installed "*Xwayland*"` For me it is and I didn’t add it by hand, so it came installed by default…

[Next page](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661.md?page=2)
