# TBrowser not working

**URL:** <https://root-forum.cern.ch/t/tbrowser-not-working/55609>\
**Category:** Newbie\
**Created:** [July 10, 2023, 8:26am UTC](https://root-forum.cern.ch/t/tbrowser-not-working/55609 "2023-07-10T08:26:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![0101101](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/0101101/32/33873_2.png) [@0101101](https://root-forum.cern.ch/u/0101101)\
**Post date:** [July 10, 2023, 8:26am UTC](https://root-forum.cern.ch/t/tbrowser-not-working/55609/1 "2023-07-10T08:26:03Z")

</div>

* * *

_ROOT Version:_ 6.28/04  
_Platform:_ Ubuntu 22.04  
_Compiler:_ Built for linuxx8664gcc on May 08 2023, 02:44:07 (?)

* * *

I downloaded the Root precompiled version into my local PC. In my local PC I have a file `file.root`, which I want to explore visually. In a terminal I navigate to wherever this file is, and type `root` to open Root. Now I type `TBrowser("file.root")`. A web browser window opens up, in blank, and some error is shown in Root with a suggestion to use `--web=off`. I close Root and run `root --web=off`, and now enter `TBrowser("file.root")`. Now the GUI opens up, and one second later it closes. No message is printed.

I know the file is not corrupted because a colleague can open it with the TBrowser.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [July 10, 2023, 8:34am UTC](https://root-forum.cern.ch/t/tbrowser-not-working/55609/2 "2023-07-10T08:34:34Z")

</div>

Hi @0101101,

Two mistakes there, it seems. First of all the first argument to the `TBrowser` constructor is not a path to the file (as you can see [here](https://root.cern.ch/doc/master/classTBrowser.html)). It is a name used to identify that `TBrowser` instance instead.

Second, the code, as typed creates a temporary `TBrowser` object that gets destructed immediately after.

Here’s what you can do instead:

1. Launch ROOT passing the path to the `.root` file as in:

```bash
$ root /path/to/file.root

```

1. Create a TBrowser as follows:

```c++
root [0] TBrowser b;

```

Cheers,  
J.

---

<div class="post-metadata">

**Author:** ![0101101](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/0101101/32/33873_2.png) [@0101101](https://root-forum.cern.ch/u/0101101)\
**Post date:** [July 10, 2023, 8:38am UTC](https://root-forum.cern.ch/t/tbrowser-not-working/55609/3 "2023-07-10T08:38:18Z")

</div>

Gracias @jalopezg !
