[SunHELP] .Profile is not my Friend

Dale Ghent daleg at elemental.org
Wed Jun 11 18:14:28 CDT 2003


On Wednesday, June 11, 2003, at 04:24 PM, Michael A. Turner wrote:

> 	All,
>
> 	Back in my school days (only a year ago but I like that phrase) I
> had a really cool .login file I used with my Solaris login at school. 
> It had
> a lot of stuff aliased and other useful stuff I had figured out. I 
> drop it
> into my profile on my new sun machine and I get bupkiss, nadda, 
> nothing.
> 	easy enough to figure out. I am logging into a different shell that
> is not friendly to .login, it wants a .profile. A quick experiment 
> shows
> that their is no love renaming .login to .profile (never know, might 
> have
> worked).

Yes, you're running into two different shells.

".login" files are used primarily with the so-called C shells - csh and 
tcsh. These observe the .cshrc and .tcshrc respectively, and also will 
parse the .login and .logout files if present.

".profile" files are the realm of the Bourne-type shells (sh, bash, 
ksh) as well as other more obscure (sorry, Phil) zsh and such.

The syntax of these two shell families differ from one another. Even 
within these families, the shells such as sh, bash, and ksh all support 
different features which the others don't have.

Since you're now on Solaris, I will gamble and posit that your shell is 
not sh (/bin/sh). The commands in your csh/tcsh .login file are not at 
all syntactically compatible with sh, or bash or ksh for that matter.

If you are indeed using /bin/sh, have your shell changed to tcsh 
instead (if you are using Solaris 8 or better, then tcsh is included by 
default - see /usr/bin/tcsh.)

After your user entry in /etc/passwd is changed to reflect the use of 
tcsh for your account, then make sure your .login file is in your home 
directory and then log in. Barring any specific path issues in your 
.login, everything should then work as you were used to.

/ek
http://elektronkind.org/



More information about the SunHELP mailing list