- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- The shell
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 11:22 AM
10-03-2002 11:22 AM
When I do echo $SHELL ( or do a ps ) I see a csh, but still the environments set in the '.cshrc' don't work. Then, when I do csh, I can see my environment set ( probably the .cshrc isn't read when I first login, and is read only when I do a csh )
What is going wrong here ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 11:38 AM
10-03-2002 11:38 AM
Re: The shell
Few things to check:
1) Make sure that csh is your defined shell in the passwd file & that the path to csh is correct - /usr/bin/csh
2) Check permissions on your home dir - should be owned by you & the group should be your primary group
3) Check the ownership & perms on the .cshrc file itself - should be 444
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 11:42 AM
10-03-2002 11:42 AM
Re: The shell
is it /usr/bin/csh? or another shell
also check /etc/profile,
If the .login and .profile is clear and /etc/passwd has /usr/bin/csh, you should be ok. Update the passwd file if necessary to show /usr/bin/csh.
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 11:53 AM
10-03-2002 11:53 AM
Re: The shell
As others say, verify the shell specified for you in /etc/passwd.
If if is csh, check to see if you have something in .cshrc or .login in your home directory that switches you to a different shell. It could be something like:
exec /usr/bin/sh
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:14 PM
10-03-2002 12:14 PM
Re: The shell
Are you running CDE. If so, try with uncommenting the line:
#DTSOURCEPROFILE=true
in the file <$HOME>/.dtprofile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:36 PM
10-03-2002 12:36 PM
Re: The shell
I changed the group to primary, that didn't help.
What I want to know is, if I see csh when I do a ps, doesn't that always mean that I am running a cshell ? SHELL might have been changes, but ps should tell me the current shell running, right ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:48 PM
10-03-2002 12:48 PM
Re: The shell
Did you note one of the later entries? Are you logging in via CDE? Or xterm/telnet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:50 PM
10-03-2002 12:50 PM
Re: The shell
How are you logging into the system? Depending upon how you are logging into the system, .cshrc may or may not be executed. For example, logging in through CDE will not execute .cshrc unless you change .dtprofile.
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:51 PM
10-03-2002 12:51 PM
Re: The shell
curious to see if maybe /usr/bin/csh... possibly with the -f option may be tucked in their somewhere...
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:51 PM
10-03-2002 12:51 PM
Re: The shell
Can this solve the issue ?
BTW I did try uncommenting, but that didn't help, and $HOME/.dt/startlog also doesn't report any problem ( as suggested in .dtprofile )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:53 PM
10-03-2002 12:53 PM
Re: The shell
$ echo $SHELL
/usr/bin/sh
$ csh
% echo $SHELL
/usr/bin/sh
% ps -f
UID PID PPID C STIME TTY TIME COMMAND
darrell 15130 219 0 16:49:07 pts/3 0:00 csh
darrell 219 213 0 Sep 27 pts/3 0:00 -sh
darrell 15131 15130 5 16:49:11 pts/3 0:00 ps -f
% echo $$
15130
%
My login shell is a posix shell. After echo $SHELL, I switched to csh. Notice $SHELL did not change. "ps -f" shows both csh and sh but you can see that sh is the parent process for the csh.
So to answer your question, yes, if you see csh you are running a cshell. It may not be your current shell though. To see which is your current shell, "echo $$" and match it to the ps output. From above, you see the current shell is 15130, the csh process.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:56 PM
10-03-2002 12:56 PM
Re: The shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 12:58 PM
10-03-2002 12:58 PM
Re: The shell
I do a telnet or rlogin from my dtterm or xterm ( since this is not my primary machine ). What do I need to do to see if .cshrc is run or not ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:00 PM
10-03-2002 01:00 PM
Re: The shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:02 PM
10-03-2002 01:02 PM
Re: The shell
Did you try Leif's suggestion? It was to uncomment the line:
#DTSOURCEPROFILE=true
in the file <$HOME>/.dtprofile
I don't remember if you need to close your CDE session and restart it.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:04 PM
10-03-2002 01:04 PM
Re: The shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:06 PM
10-03-2002 01:06 PM
Re: The shell
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:07 PM
10-03-2002 01:07 PM
Re: The shell
You can also put a line in .login to see if it's being executed.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:10 PM
10-03-2002 01:10 PM
Re: The shell
( Flood of information )
... for my little brain today :-)
Anyway, Allen I restarted CDE as well, but in vain :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:16 PM
10-03-2002 01:16 PM
Re: The shell
I found that actually .cshrc is running the first time also. If I do echo for other variables, or do echo "Hello World" in .cshrc, that works. The problem is only with PATH.
# ClearCase paths
setenv PATH /usr/atria/bin:$PATH
setenv CLEARCASE_BLD_UMASK 2
echo PATH doesn't show me the new path, but echo CLEARCASE... does show me 2 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:21 PM
10-03-2002 01:21 PM
Re: The shell
I didn't know if you had simply made a typo or not.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:25 PM
10-03-2002 01:25 PM
Re: The shell
And it's not only about not being able to see the PATH, I can't use that path unless I manually do a csh :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:31 PM
10-03-2002 01:31 PM
SolutionDo either .cshrc or .login source other scripts that could be re-setting you PATH?
I'm guessing .login re-sets your PATH or sources something else that does. It is not executed when you run "csh". It only runs when you login.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 01:33 PM
10-03-2002 01:33 PM
Re: The shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 07:38 AM
10-04-2002 07:38 AM
Re: The shell
This is what I felt when I found that PATH was not getting set the first time only. Now when I set the path in .corprc, I don't have any problem.
Thanks everyone ( specially Allen And Ellis ) ... I can get back to work now.
Just one more question though, since we are not supposed to modify the .login file ( and use .corprc instead ), and .login sets the PATH variable, doesn't that mean that everytime someone sets the PATH, he'd have this problem ? Also, can I do something in .login which doesn't overwrite the previous PATH set in .cshrc ? I tried doing :
set path=( $path /bin /usr/bin /usr/ucb )
in the .login, but that didn't help