Is there a way to define a global rootlogon.C which I can use to setup a global environment for all users on my linux system? Something which would reside somewhere under $ROOTSYS/ ? The reason I’m asking is that I want for the users of my system to preload a bunch of shared libraries when they execute root. If there is another file which I can modify to load shared libraries at root startup, please let me know (for example system.rootrc, but I don’t think I can add executable lines to that file…)
see file $ROOTSYS/etc/system.rootrc
by default ROOT looks for rootlogon.C in the current dir but you can specify an alternative path/file
Typically, (or rather, something I usually think is typical) one has two sets of start up files, the global one and the user one. This is the case for the .rootrc file, there is the $ROOTSYS/etc/system.rootrc as well as the ~/.rootrc, thus the user can override system defaults. It would be nice to have a similar structure with the rootlog[on,off].C files. Or if there is a way to preload shared libraries which can be specified in system.rootrc would work for me as well.
In any case, thanks for posting the reply.
your “system” rootlogon.C could call gSystem->ProcessLine(".x $HOME/rootlogon.C") and ./rootlogon.C, after testing whether they exist.