Help - Search - Members - Calendar
Full Version: .login File Help/rh9.0
Linuxhelp > Support > Technical Support
Jodene
Hello everyone. I am trying to add some paths to my csh.login file. I understand that I am to copy the etc/usr/csh.login file into my /home directory, then change the name to .login and make changes to the .login file. I copied the file to my /home directory, and then, when I changed the filename to .login, it no longer lists using "ls" or "dir." However, I can edit the file with vi, which I did. But the new paths and prompt statement are not being invoked. I know I put in the correct statements because they work at the terminal command prompt. I am using the tcsh shell. Does anybody have any advice about this? Many thanks in advance.

Newbie with numb brain,
Jodene
hughesjr
First the easy problem ... things that begin with a . don't show up on ls, do a ls -al and you will see them.

change your .login script to make it execcutable....

chmod 755 .login

Have you changed the default shell to tcsh for the user, or are you just running tcsh from a bash shell?

I use .tcshrc to contain my variables for tcsh...
Jodene
Thanks guru!! You're the best. I changed to tcsh from bash in the .passwd file so that the tcsh would be the operating shell when I boot up. Is that the right thing to do? Or should I stay in bash? Do you prefer bash?

Jodene
Jodene
Me again. Acutally, I've just discovered that the changes I made to the /etc/.passwd file are not being invoked either. I set the root and user shells to tcsh, but when I log on, they are set to bash. Aren't these files already executable?

Also, the new paths I set in the .login file are still not happening...is that because I'm in bash, not tcsh?

A final question...I have an /etc directory, but I also have an /usr/etc directory. Should I have both of these? the /usr/etc directory doesn't appear to have anything in it, but the /etc directory has many files, including the .passwd file.

Thanks again for your help!

Jodene
hughesjr
try putting the varible commands in the file .tcshrc.

The command for setting variables in tcsh is like this:

setenv ORACLE_HOME test

It is the same as this in bash:

export ORACLE_HOME=test

-------------------------------------
A /usr/etc directory is OK ... some programs may use it in the future.
------------------------------------
The file in /etc is passwd, not .passwd.

Unless you really require C-shell (or are doing it for learning), I would recommend that you stay with bash. Bash is the linux standard...If you have an application that requires C-shell, then that is a different story.

Here is the prompt command from my .tcshrc:

CODE
set prompt='[%n@%m %c]# '


This is very similar:
CODE
set prompt=[`id -nu`@`hostname -s`]#
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.