From owner-freebsd-questions Thu Sep 6 10:54:47 2001 Delivered-To: freebsd-questions@freebsd.org Received: from femail46.sdc1.sfba.home.com (femail46.sdc1.sfba.home.com [24.254.60.40]) by hub.freebsd.org (Postfix) with ESMTP id 815C437B401 for ; Thu, 6 Sep 2001 10:54:41 -0700 (PDT) Received: from x1-6-00-50-ba-de-36-33.kico1.on.home.com ([24.141.119.162]) by femail46.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20010906175440.HVWI29437.femail46.sdc1.sfba.home.com@x1-6-00-50-ba-de-36-33.kico1.on.home.com>; Thu, 6 Sep 2001 10:54:40 -0700 Received: from localhost (genisis@localhost) by x1-6-00-50-ba-de-36-33.kico1.on.home.com (8.11.3/8.11.3) with ESMTP id f86Hxqd28418; Thu, 6 Sep 2001 13:59:53 -0400 (EDT) (envelope-from genisis@istar.ca) X-Authentication-Warning: x1-6-00-50-ba-de-36-33.kico1.on.home.com: genisis owned process doing -bs Date: Thu, 6 Sep 2001 13:59:52 -0400 (EDT) From: Dru X-X-Sender: To: Fernan Aguero Cc: Subject: Re: .cshrc not being used? In-Reply-To: <20010906142707.E2088@iib005.iib.unsam.edu.ar> Message-ID: <20010906134308.N28322-100000@x1-6-00-50-ba-de-36-33.kico1.on.home.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 6 Sep 2001, Fernan Aguero wrote: > +----[ Dru (genisis@istar.ca) dijo sobre "Re: .cshrc not being used?": > | > | > | On Thu, 6 Sep 2001, Fernan Aguero wrote: > | > | > +----[ Dru (genisis@istar.ca) dijo sobre "Re: .cshrc not being used?": > | > | Hi Fernan, > | > | > | > | Did you either logoff and back in or do a: > | > | > | > | source .cshrc > | > > | > Of course. Logging off and back in does nothing. However if i do a > | > source .cshrc everything works OK. > | > > | > Should I create a new .rc file with my additions and then source it > | > from .cshrc? > | > | Still strange that logging off does nothing but source works OK as both > | methods should force the shell to reread the .cshrc file. Not sure what > | you mean by a .rc file. Do you mean adding a file called dot.cshrc to > | /usr/share/skel so all new users will get the new and improved .cshrc > | file? > | > | Dru > | > +----] > > Nope. I mean adding a ~/.myrc file with my own entries, like: > setenv MYVAR /whatever > setenv OTHERVAR value > set prompt = "me# " > etc > and then add the following line to ~/.cshrc > source .myrc > > Anyway, it doesn't work since the .cshrc is not read in the first > place. > > But, I must admit that when I said logging off and back in I was > talking about doing it in xdm. All of this behaviour that I'm talking > about is only seen in an xterm. > If I go to the console then my .cshrc is read OK. In an xterm my > .cshrc is ignored. Only if I do a source .cshrc in the xterm do i see > a change. > > Reading xterm man page says that xterm -ls should be a login shell > (i.e. it will read the user's .profile and .login files). I assume > that it will also read .cshrc but it is not explicitly said. But it > does not appear to be the case. Out of curiousity, why not just edit .cshrc directly instead of having it invoke a separate file? As for the login and non-login shell stuff, here's my understanding in a nutshell: -a login shell is invoked when you enter your name/password at a login prompt or when you type xterm -ls to open up an xterm. What login shell you get depends on what shell you were given when your account was created, you can doublecheck this with a: more /etc/passwd | grep username If you are in the Bourne shell or /bin/sh, it reads .profile when the login shell is started. If you are in the C shell (/bin/csh or /bin/tcsh), the files .login and .cshrc are read. -a non-login shell is invoked whenever you start another shell from a login shell; you can start whatever shell you want as long as it's installed on the system. If you're starting the Bourne shell, nothing is read; if you're starting the C shell, .cshrc is read. Which makes me wonder what shell the user is in, since if it's the C shell, the .cshrc file should be read regardless if its a login or a non-login shell. HTH, Dru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message