login fails to source ~/.tcshrc under xterm

This is a discussion on login fails to source ~/.tcshrc under xterm within the Linux Administration forums, part of the Linux Forums category; Hi All, First off, I'll apologize for crossposting. I never do that, but I am unsure which group will ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-17-2004
Andy Y
 
Posts: n/a
Default login fails to source ~/.tcshrc under xterm

Hi All,
First off, I'll apologize for crossposting. I never do that, but
I am unsure which group will answer this question best.
I have some servers with Red Hat Enterprise Linux 2.1. Agetty
starting login with the terminal type "xterm" and the user has
starting shell /usr/tcsh...
The problem I currently have is this: the login process is reading
/etc/csh.login and /etc/csh.cshrc BUT IS NOT reading ~/.tcshrc OR
~/.cshrc. How can I beat this machine into submission?

Your buddy,
Andy
Reply With Quote
  #2 (permalink)  
Old 08-19-2004
Robert E A Harvey
 
Posts: n/a
Default Re: login fails to source ~/.tcshrc under xterm

andy314159pi@yahoo.com (Andy Y) wrote in message news:<c3214d0d.0408171412.3d23e703@posting.google. com>...
> The problem I currently have is this: the login process is reading
> /etc/csh.login and /etc/csh.cshrc BUT IS NOT reading ~/.tcshrc OR
> ~/.cshrc. How can I beat this machine into submission?


are they available to the user? Who owns them, what are the
permissions?

Curious item from man tcsh
-m The shell loads ~/.tcshrc even if it does not belong
to the effective user. Newer versions of su(1) can
pass -m to the shell. (+)

I've not quite got my head round that - but it does make it worth
checking the ownership andpermissions of those files.

what happens if you try source ~/.tcshrc ? Are the commands
executed OK?

does ~ point to the right place? (echo $HOME) (cd ~/ ; pwd)

How up to date is your shell? .tcshrc support was added late in the
development cycle (but probably still about 10 years ago). It's said
to be possible to compile the shell for a different execution order,
perhaps yours is compiled not to do these files at all? I've worked
with shells that skip the files in ~ if the ones in /etc/ exist.
Especially if there is an 'exit' in the /etc/ ones.

If that's the case you could code in support at the end of the /etc/
files, something like
if ( -e ~/.tcshrc ) then
source ~/.tcshrc
endif
Reply With Quote
  #3 (permalink)  
Old 08-20-2004
Andy Y
 
Posts: n/a
Default Re: login fails to source ~/.tcshrc under xterm

Hello comp.os.linux.admin,questions,readhat...,

Robert Harvey Rules All!

Thanks for this fix!

Now remote processes on our cluster can pick up the correct environment variables.

-Very grateful Andy



robertharvey@my-deja.com (Robert E A Harvey) wrote in message
> andy314159pi@yahoo.com (Andy Y) wrote in message
> > The problem I currently have is this: the login process is reading
> > /etc/csh.login and /etc/csh.cshrc BUT IS NOT reading ~/.tcshrc OR
> > ~/.cshrc. How can I beat this machine into submission?


In my case, the comments below allowed me to fix this problem:

> How up to date is your shell? .tcshrc support was added late in the
> development cycle (but probably still about 10 years ago). It's said
> to be possible to compile the shell for a different execution order,
> perhaps yours is compiled not to do these files at all? I've worked
> with shells that skip the files in ~ if the ones in /etc/ exist.
> Especially if there is an 'exit' in the /etc/ ones.
> If that's the case you could code in support at the end of the /etc/
> files, something like
> if ( -e ~/.tcshrc ) then
> source ~/.tcshrc
> endif

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:50 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0