tomnich
asked on
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?
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.
which shell are you using? csh, tcsh
Will .cshrc be run if you do a
su - user
Will .cshrc be run if you do a
su - user
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.
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
In $HOME/.vueprofile you just specify which and how a resource
file will be read, for example:
source $HOME/.cshrc
or
. $HOME/.profile
ASKER
It's running on an HP machine
tomnich, please post folloing information:
echo $SHELL
grep your_user_id /etc/passwd
grep -v '^#' .vueprofil
echo $SHELL
grep your_user_id /etc/passwd
grep -v '^#' .vueprofil
ASKER
The shell is csh
OS is HPUX with X-Windows
echo $SHELL gives: /usr/bin/csh
.vueprofil does not exist
OS is HPUX with X-Windows
echo $SHELL gives: /usr/bin/csh
.vueprofil does not exist
uups, was a typo, must read: .vueprofile
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.
braveheart, .cshrc has nothing to do with a logon shell
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.
ASKER
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?"
"Why can't I add the above alias without .cshrc crashing?"
what should this alias do?
ASKER
It allows you to repeat the last command by entering: rr
I don't think
alias !! rr
will do that
alias rr '\!-1'
works, (but doing it twice in a row isn't very useful...)
alias !! rr
will do that
alias rr '\!-1'
works, (but doing it twice in a row isn't very useful...)
I guess it was meant to be:
alias rr \!\!
alias rr \!\!
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 \!*')
doesn't work very well either, since the !! refers to the rr command itself.
(which is useful for things like alias rr 'comand \!*')
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
> 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.
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.