Hi there,
after a lot of trial and error I've solved the init.csh issue. I hope 
this can help those of you that have this problem.

Let's start from the shell configuration. As suggested by Apple (read 
/usr/share/init/tcsh/README) I've created the following files in my home 
directory:

~/.tcshrc
~/.login
~/.logout

Furthermore I've created these:

~/Library/init/tcsh/environment.mine
~/Library/init/tcsh/rc.mine

and so on. The former 3 files are critical for our problem; they contain 
the following line:

.tcshrc:

source /usr/share/init/tcsh/rc

.login:

/usr/share/init/tcsh/login

.logout:

/usr/share/init/tcsh/logout

Fink's crew suggests to add "source /sw/bin/init.csh" to .tcshrc script 
in order to get applications installed by fink at your fingertips. But 
it doesn't work, because it seems that environment variable (i.e. PATH 
etc...) are never modified.

This behavior is due to the strange (at least for me!!) startup process 
of a terminal window. Every time you open a new teminal window the 
following things happen:

1) First /usr/share/init/tcsh/rc script runs, and it calls 
environment.mine, rc.mine and so on.

2) Then /usr/share/init/tcsh/login runs.

3) Now ~/.tcshrc starts and because its first line (source 
/usr/share/init/tcsh/rc) it makes rc script run again.

4) After that the line "source /sw/bin/init.csh" at the end of ~/.tcshrc 
makes the fink's init script execute.

5) Now ~/.login runs and because its contents it call 
/usr/share/init/tcsh/login a second time, erasing all environment 
changes!!!

6) At last you get the prompt.

The solution is quite simple: just comment out the "source 
/usr/share/init/tcsh/rc" line in ~/.tcshrc file and do the same for the 
"source /usr/share/init/tcsh/login" line in ~/.login file. (Note for 
beginners: Use emacs or pico to edit these files and add a # at the very 
beginning of the lines that you want to comment out.)

Now I'm wondering why rc and login scripts are called twice, perhaps 
someone with more knowledge than me can explain this.

That's all. Hope this helps.

Cheers,
Andrea.

---
Andrea Riciputi        <mailto:[EMAIL PROTECTED]>

"Science is like sex: sometimes something useful comes out,
   but that is not the reason we are doing it" -- (Richard Feynman)



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to