Ordinarily, the csh family of shells (csh, tcsh, etc...) will read ~/.login and the Bourne shell family of shells (/bin/sh, ksh, bash, etc...) will read ~/.profile.

These are only for a login shell (usually the first shell), and the values are then inherited by all children. Windows opened in an X session are not normally login shells, but they should inherit $PATH, etc... from the login shell.

However, I found one gotcha when using gdm - it will always cause ~/.profile to be sourced by a Bourne shell style shell, irrespective of the setting of $SHELL. I use tcsh as my login shell, and it took me quite a while to work out that .login was being ignored on OpenSolaris.

Personally, I set generic stuff like PATH, MANPATH, ENV, LESSOPEN, PAGER, EDITOR, etc... in .profile and/or .login, then I can use .tcshrc or .kshrc for shell-specific things that other variants would not understand (such as "set -o vi" and alias commands).

HTH
Brian


dick hoogendijk wrote:
I have my PATH set in ~/.bash_profile but it is not set. I always
thought that the PATH I wanted set at logon should be in (xxx).profile
because if I set it in .bashrc it is read in for every new shell call
and therefore wasts memory. What am I doing wrong? If I set it
in /etc/default/login it is system wide for every user and that is not
always preferable. I'd like some suggetions/tips.


--
Brian Ruthven
Solaris Revenue Product Engineering
Sun Microsystems UK
Sparc House, Guillemont Park, Camberley, GU17 9QG

_______________________________________________
indiana-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/indiana-discuss

Reply via email to