# ROOT Browser can't be used

**URL:** <https://root-forum.cern.ch/t/root-browser-cant-be-used/58717>\
**Category:** Newbie\
**Tags:** root\
**Created:** [March 25, 2024, 12:47pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717 "2024-03-25T12:47:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 12:47pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/1 "2024-03-25T12:47:08Z")

</div>

ROOT experts,

I am trying to display data in ROOT, but when i try to use new TBrowser I get the message: “The ROOT browser cannot run in batch mode” although I at no point attempt to use batch mode. I am aware of the posts already discussing this issue, but the advice given did not fix it. Following the last recommendations using the --web command always results in “–web is disabled for security reasons” how do I enable it? Or is there a better way to address this problem? I am working on windows 10 with Ubuntu.

Thanks in advance for any help!

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 25, 2024, 12:55pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/2 "2024-03-25T12:55:17Z")

</div>

Welcome to the ROOT forum !

How did you start ROOT ?  
Are you using it remotely via `ssh` ?

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 1:04pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/3 "2024-03-25T13:04:18Z")

</div>

I don’t think so, I followed the install guide by physics matters for WSL and only need to source to access root.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 25, 2024, 1:09pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/4 "2024-03-25T13:09:48Z")

</div>

Can you copy/paste here what you get in the terminal window from the point where you entered the `root` command ?

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 1:15pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/5 "2024-03-25T13:15:45Z")

</div>

Of course!

$ root -l data\_01.root  
root [0]  
Attaching file data\_01.root as \_file0…  
(TFile \*) 0x7ffff122d930  
root [1] new TBrowser  
Warning in \<TBrowser::TBrowser \>: The ROOT browser cannot run in batch mode  
(TBrowser \*) 0x7ffff185b410

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 25, 2024, 1:22pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/6 "2024-03-25T13:22:50Z")

</div>

Unless you have `gROOT->SetBatch();` in your `rootlogon.C` or you connect to your machine using `shh` without the options `-X -Y` , I do not see any thing wrong…

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 1:32pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/7 "2024-03-25T13:32:53Z")

</div>

I found ROOT.gROOT.SetBatch(True) in rootlogon.C in the tutorials folder of ROOT-6.30.04. Furthermore echo $SSH\_CONNECTION does not return an anwser.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 25, 2024, 1:38pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/8 "2024-03-25T13:38:31Z")

</div>

> [@Fred](#):
>
> I found ROOT.gROOT.SetBatch(True) in rootlogon.C

That’s why you are in batch mode. Remove this line.

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 1:44pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/9 "2024-03-25T13:44:46Z")

</div>

I’m sorry I made a mistake it was a .rootlogon file. Removing the line did not fix it.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 25, 2024, 1:57pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/10 "2024-03-25T13:57:11Z")

</div>

Can you try adding the option `-n` when you start root ?

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 2:05pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/11 "2024-03-25T14:05:51Z")

</div>

Of course!

It unfortunately still looks the same.

$root -n -l data\_01.root  
root [0]  
Attaching file data\_01.root as \_file0…  
(TFile \*) 0x7ffff3d0f7e0  
root [1] new TBrowser  
Warning in \<TBrowser::TBrowser \>: The ROOT browser cannot run in batch mode  
(TBrowser \*) 0x7ffff428e450

---

<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:** [March 25, 2024, 2:14pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/12 "2024-03-25T14:14:17Z")

</div>

Did you look at [ROOT on Windows 11 WSL2 / WSLg](https://root-forum.cern.ch/t/root-on-windows-11-wsl2-wslg/48348)?

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 2:34pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/13 "2024-03-25T14:34:15Z")

</div>

I tried adding the lines to .bashrc and changed the XLaunch settings to Disable server access control, but it did not fix the issue.

---

<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:** [March 25, 2024, 2:47pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/14 "2024-03-25T14:47:11Z")

</div>

There are several posts on the forum about WSL/WSL2. Most of the time it is not related to ROOT, but only to the system configuration. E.g. just try to open a Web browser or any other GUI application. If it works, then the problem is in ROOT, otherwise this is an issue with your set-up

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 3:34pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/15 "2024-03-25T15:34:37Z")

</div>

I tried to install and run chrome over Ubuntu, since sudo snap install firefox is not supported on the subsystem for Linux and got this error: $google-chrome  
[0325/163021.680361:ERROR:exception\_handler\_server.cc(362)] getsockopt: Invalid argument (22)  
[0325/163021.680781:ERROR:socket.cc(153)] unhandled cmsg -1431655766, -1431655766  
[0325/163021.681775:ERROR:exception\_handler\_server.cc(362)] getsockopt: Invalid argument (22)  
[2928:2928:0325/163021.681907:ERROR:socket.cc(153)] unhandled cmsg -1431655766, -1431655766  
Trace/breakpoint trap (core dumped)  
I am unsure however if this is due to an oversight on my end or an issue in the set-up…

---

<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:** [March 25, 2024, 4:06pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/16 "2024-03-25T16:06:44Z")

</div>

Can you simply try Xeyes?

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 4:11pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/17 "2024-03-25T16:11:54Z")

</div>

Yes, Xeyes works for me!

---

<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:** [March 25, 2024, 4:13pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/18 "2024-03-25T16:13:36Z")

</div>

OK, so TBrowser should work as well…

---

<div class="post-metadata">

**Author:** ![Fred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/fred/32/36037_2.png) [@Fred](https://root-forum.cern.ch/u/Fred)\
**Post date:** [March 25, 2024, 4:18pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/19 "2024-03-25T16:18:07Z")

</div>

It in fact does work now. I can’t explain why, all I did was reverse the changes made in the post you linked above so Xeyes could start, but that was checking a setting that wasn’t active before and adding lines, which I now removed again…

Anyways I’m glad it works now, thanks for the help!

---

<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:** [March 25, 2024, 4:24pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717/20 "2024-03-25T16:24:10Z")

</div>

OK, glad to see you fixed the issue!
