[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

.cshrc not present after logging in using csh

Posted on 2011-10-25
5
Medium Priority
?
437 Views
Last Modified: 2012-06-27
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
Comment
Question by:mark_667
  • 3
  • 2
5 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 2000 total points
ID: 37023856
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
 
LVL 1

Author Comment

by:mark_667
ID: 37024671
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
 
LVL 31

Expert Comment

by:farzanj
ID: 37025066
Do you get the same error message when you run it on the C-shell manually?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37025081
Are the #! the first characters on the first line of the file?
0
 
LVL 1

Author Comment

by:mark_667
ID: 37025296
Yes, I get the same problem running it manually and '!#' are the first characters of the first line.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question