$HOME/.rootrc not working

I’m not sure if this is a issue specific to me. I’m setting up ROOT using $HOME/.rootrc but the file seems not be executed:

❯ cat ~/.rootrc
gStyle->SetCanvasPreferGL(kTRUE);
int foobar = 90;

But

❯ root
root [0] foobar
input_line_9:2:3: error: use of undeclared identifier 'foobar'
 (foobar)
  ^
Error in <HandleInterpreterException>: Error evaluating expression (foobar).
Execution of your code was aborted.

I tries to see if ROOT even tries to load the file. It seems not

❯ strace root -q 2>&1 >/dev/null | grep rootrc
<nothing at all>
❯

Thanks


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.20/04
Platform: Linux x64
Compiler: GCC 10.1.0


The file you want to edit is $HOME/.rootlogon.C, .rootrc is for other configurations. Have a look at the default one that comes from ROOT in $ROOTSYS/etc/system.rootrc.
https://root-forum.cern.ch/t/how-to-change-default-rootlogon-c-file/23883/3

Ahh I see…
Thanks