Terminal window does not run .cshrc

When I open a terminal window, the file .cshrc which is supposed to run, does not.  I have to type: source .cshrc every time I open a new terminal.  It used to do it automatically - I have not moved the file, but may have copied it and overwritten the original, but it is now in the correct place, with the correct name - how do I fix it?
LVL 1
tomnichAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlevCommented:
Assuming your default shell is tcsh, maybe you try "tcsh -X" and see if anything special pops up? There may be some failing statement that causes .cshrc to exit (though normally you would see the error message). Or maybe you have .tcshrc, then .cshrc is not read.
0
ahoffmannCommented:
which shell are you using? csh, tcsh
Will .cshrc be run if you do a
  su - user
0
jhanceCommented:
What OS are you running and which window manager are you using with it?  For example, on HP VUE, you edit the .vuerc file instead of the .cshrc.
0
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

ahoffmannCommented:
jhance, your answer isn't bad, but not true also.
In $HOME/.vueprofile you just specify which and how a resource
file will be read, for example:
  source $HOME/.cshrc
or
  . $HOME/.profile
0
tomnichAuthor Commented:
It's running on an HP machine
0
ahoffmannCommented:
tomnich, please post folloing information:

  echo $SHELL
  grep your_user_id /etc/passwd
  grep -v '^#' .vueprofil
0
tomnichAuthor Commented:
The shell is csh
OS is HPUX with X-Windows
echo $SHELL gives: /usr/bin/csh
.vueprofil does not exist
0
ahoffmannCommented:
uups, was a typo, must read:  .vueprofile
0
braveheartCommented:
If you are using xterm or dtterm make sure that it starts a login shell by giving the -ls option on the startup command line or by setting the LoginShell X resource to True - the default is false.
0
ahoffmannCommented:
braveheart, .cshrc has nothing to do with a logon shell
0
braveheartCommented:
I know that but does tomnich?  Besides, lots of people combine .cshrc and .login with tests to bypass the bits they don't want to execute.
0
tomnichAuthor Commented:
Sorry, It was running .cshrc all the time, but I had added the alias: "alias  !! rr" and for some reason .cshrc was "crashing out" or something like that.  The question is now:

"Why can't I add the above alias without .cshrc crashing?"
0
ahoffmannCommented:
what should this alias do?
0
tomnichAuthor Commented:
It allows you to repeat the last command by entering: rr
0
ozoCommented:
I don't think
  alias !! rr
will do that
  alias rr '\!-1'
works, (but doing it twice in a row isn't very useful...)

0
mlevCommented:
I guess it was meant to be:
alias rr \!\!
0
ozoCommented:
alias rr \!\!
doesn't work very well either, since the !! refers to the rr command itself.
(which is useful for things like alias rr 'comand \!*')
0
rmgopalCommented:
I assume u r logging on to the unix through a PC with either Windows 95/NT operation system using terminal emulation software like eXceed etc. Also ur login shell is c shell.

To have .cshrc run on a terminal window u should have a file called .Xdefaults (dot capital X defaults) in your home directory with the following lines

*loginShell:  true

The file should contain only the above line and that should be the first line starting at first column.

If  the file does not exist, create the file with the above line and save it in your home directory. Logout of unix. If possible shutdown the pc and startover. Now logon to unix. U should have .cshrc executed.

Hope the above solution should work. Good luck.

Thanks,
Ravi.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ahoffmannCommented:
Either the eXceed developers (or technical writers for docs) should be dammed, or rmgopal didn't read carefully the docs about X Windows :-(

> The file should contain only the above line and that should be the first line starting at first column.

This would violate a couple of X Window standards.

Nevertheless it could be an answer to the question.
0
braveheartCommented:
Hmm. rmgopal seems to have given half my suggested solution, combined with an urban myth, although he has spelt it out a little more clearly. The line does *not* have to appear on its own.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.