How to change default rootlogon.C file?

I have the following rootlogon.C

{
	cout << "=========================================================" << endl;
	cout << "Hello, Explorer. The Universe is still working. Go Ahead." << endl;
	cout << "=========================================================" << endl;
	
	
	gSystem->AddIncludePath("-I/home/ignatov/spl/cmdrelated/KinFitter");
	gSystem->Load("/home/ignatov/spl/cmdrelated/KinFitter/lib/Linux310_x86_64_gcc485/6.08.02/libTKinFitter.so");
}

And I want to load this rootlogon.C every time whenever and wherever I run ROOT. Until now I have to place this file in directory where I run ROOT. What should I do?

Hello,
The order in which the rootlogon.C is look for is

        $PWD/.rootlogon.C
        $HOME/.rootlogon.C
        $ROOTETCDIR/system.rootlogon.C

So, if you move your macro to $HOME/.rootlogon.C it should be loaded wherever you are.
Or you define in $HOME/.rootrc the variable Rint.Logon <path/to/my/logon/macro> to define a generic macro to be loaded at startup.

G Ganis

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.