Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: MJZ on December 22, 2011, 08:39:32 AM

Title: why is ~/.ashrc executed twice?
Post by: MJZ on December 22, 2011, 08:39:32 AM
Hi!

I use microcore (now core4.2-rc2), and I wonder, why at login ~/.ashrc is executed twice? Who calls it for a second time?

thank you!
Title: Re: why is ~/.ashrc executed twice?
Post by: Rich on December 22, 2011, 09:46:39 AM
Hi MJZ
Why do think it's executing twice?
Title: Re: why is ~/.ashrc executed twice?
Post by: MJZ on December 22, 2011, 10:02:52 AM
I added some custom commands, the run twice
Title: Re: why is ~/.ashrc executed twice?
Post by: roberts on December 22, 2011, 11:02:21 AM
.ashrc will run on every shell process. Perhaps your commands would be better served in .profile (once per login) or .xsession (upon start of X), or even /opt/bootlocal.sh (once per bootup backgrounded) or /opt/bootsync.sh ( once per bootup not backgrounded).
Title: Re: why is ~/.ashrc executed twice?
Post by: MJZ on December 22, 2011, 11:57:13 AM
thanks. ~/.profile would be the place to be, and I actually wanted it first time.

but oddly ~/.profile gets always overwritten with a default file at boot time.
Title: Re: why is ~/.ashrc executed twice?
Post by: gerald_clark on December 22, 2011, 02:30:41 PM
You have to run backup after modifying .profile or you will get the old one at next boot.
Title: Re: why is ~/.ashrc executed twice?
Post by: MJZ on December 22, 2011, 06:05:03 PM
as I want to have no system backup at all (and avoid the "filetool" structure for an embedded system),
can I also go with the boot options "home=sdaX" and "norestore"??
Or do those two options interfere with each other?

thanks!!
Title: Re: why is ~/.ashrc executed twice?
Post by: curaga on December 23, 2011, 06:33:32 AM
Yes, a persistent home is ok too.