Opening TBrowser automatically when starting ROOT

Hi guys,

I am wondering how to make TBrowser be opened automatically with ROOT in certain cases. I mean in 70% of cases I launch root to open TBrowser only. Now I have to make:

[login@computer]% root -l root [0] TBrowser something

  • I write 2 commands: first to launch ROOT itself, second to open TBrowser. Is there any way to write some zsh/bash/…/python script to make it with one command only? Or maybe there is some already built-in solution?
    Thanks, it’ll really save my time!

Hi,
never mind, I’ve found a pretty convenient solution:

I created a file ~/tbr.c with following code:

{
TBrowser y
}

And now I simply do

and TBrowser starts with ROOT.

Otherwise, you can put your line inside .rootlogon.C. This script is automatically run when ROOT is starting.