I'm working with CERNs framework for data analysis ROOT on an ubuntu machine. The generated data is stored in so-called root files (*.root). To open and browse such a file, I need to open a terminal, load the file and open a (T)Browser. In code:
$ root root TFile *f=new TFile("my_file.root") root new TBrowser() // opens GUI
Equivalently, I can also just do
$ root my_file.root root new TBrowser() // opens GUI
but this is still tedious. Therefore, I'd like to just double click the respective file(s) (or call
xdg-open my_file.root in the terminal, respectively) and automatically open the GUI, i.e., execute the little script above. How can I do this in Ubuntu? Many thanks in advance.
Note: I've already asked this question at Stack Overflow, but was forwarded to Ask ubuntu.