• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

.cshrc not present after logging in using csh

I have csh set as the shell for my user in /etc/passwd but when I login as the user the .cshrc file isn't generated and I need to add a PATH statement and alias for CC to it so that I don't have to set it every time I login. This is important as it'll be used by an application when I can get it working.
root is still set to /bin/bash as I've read that this shouldn't be changed, my use is set to use /bin/csh
/etc/csh.cshrc and /etc/csh.login are not there even after a reboot. I'm using OpenSolaris 2009-06. This is a real pain and I'd be grateful if anyone could assist.
0
mark_667
Asked:
mark_667
  • 3
  • 2
1 Solution
 
farzanjCommented:
These files are not generated by logging in.  You have to create them.  The system admin has to a generic file into /etc/skel folder so that when an account is created, it gets this basic conf.

Now, in your case, just create a file.

Here is a sample file for you to get started.

http://www.ai.mit.edu/projects/im/cam8/cam8/sample.cshrc
0
 
mark_667Author Commented:
The file gets processed on login but gives a 'Badly placed ()'s' error when run even with just the below contents, does anyone know why?

#!/bin/csh

set path = (~$USER/bin /bin /usr/bin /usr/ccs/bin /usr/sbin /usr/local/bin /etc /usr/etc .)

setenv LD_LIBRARY_PATH = (/usr/local/lib /usr/local/bin)
echo $LD_LIBRARY_PATH
export LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
0
 
farzanjCommented:
Do you get the same error message when you run it on the C-shell manually?
0
 
farzanjCommented:
Are the #! the first characters on the first line of the file?
0
 
mark_667Author Commented:
Yes, I get the same problem running it manually and '!#' are the first characters of the first line.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now