Re: [gentoo-user] [Q] bashrc
begin quote On Sun, 6 Jul 2003 15:03:24 +0900 YOON, Joo-Yung [EMAIL PROTECTED] wrote: Hi, My $SHELL is /bin/sh which is linked to /bin/bash, but .bashrc does not seem to be read when I login. Could anyone tell me how to make $HOME/.bashrc called in the login time?-- some clarification to the later posts in this thread: The bashrc is only read when bash is called as bash and not as sh, since if its called as sh it tries to be sh compatible, thus limits itself to not do such things. All in all, call it as bash and it should work. //Spider -- begin .signature This is a .signature virus! Please copy me into your .signature! See Microsoft KB Article Q265230 for more information. end pgp0.pgp Description: PGP signature
[gentoo-user] [Q] bashrc
Hi, My $SHELL is /bin/sh which is linked to /bin/bash, but .bashrc does not seem to be read when I login. Could anyone tell me how to make $HOME/.bashrc called in the login time? -- YOON, Joo-Yung / Gentoo Hovers Korea, BooChun-Shi Email: [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] [Q] bashrc
On Sun, Jul 06, 2003 at 03:03:24PM +0900, YOON, Joo-Yung wrote: Hi, My $SHELL is /bin/sh which is linked to /bin/bash, but .bashrc does not seem to be read when I login. Could anyone tell me how to make $HOME/.bashrc called in the login time? [EMAIL PROTECTED] tacvbo $ cat .bash_profile # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bash_profile,v 1.8 2002/08/07 18:13:35 azarah Exp $ #This file is sourced by bash when you log in interactively. [ -f ~/.bashrc ] . ~/.bashrc -- YOON, Joo-Yung / Gentoo Hovers Korea, BooChun-Shi Email: [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list -- octavio ruiztacvbo at tacvbo do net www.tacvbo.net (+52 55) 55 94 55 68 (+52 55) 55 94 55 68 www.tacvbo.net tacvbo at tacvbo dot net octavio ruiz -- -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] [Q] bashrc
Hi, It exists for sure, and contains many settings therein, but the thing is it is not called or executed automatically upon logging in. (I must do source .bashrc to realize it.) What I want to ask is about the process that calls .bashrc during login time. On Sun, Jul 06, 2003 at 12:57:12AM -0500, Ta^3 Deftkore wrote: On Sun, Jul 06, 2003 at 03:03:24PM +0900, YOON, Joo-Yung wrote: Hi, My $SHELL is /bin/sh which is linked to /bin/bash, but .bashrc does not seem to be read when I login. Could anyone tell me how to make $HOME/.bashrc called in the login time? [EMAIL PROTECTED] tacvbo $ cat .bash_profile # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bash_profile,v 1.8 2002/08/07 18:13:35 azarah Exp $ #This file is sourced by bash when you log in interactively. [ -f ~/.bashrc ] . ~/.bashrc -- YOON, Joo-Yung / Gentoo Hovers Korea, BooChun-Shi Email: [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list -- octavio ruiztacvbo at tacvbo do net www.tacvbo.net (+52 55) 55 94 55 68 (+52 55) 55 94 55 68 www.tacvbo.net tacvbo at tacvbo dot net octavio ruiz -- -- [EMAIL PROTECTED] mailing list -- YOON, Joo-Yung / Gentoo Hovers Korea, BooChun-Shi Email: [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] [Q] bashrc
On 2003-07-05 23:25, YOON, Joo-Yung [EMAIL PROTECTED] wrote: It exists for sure, and contains many settings therein, but the thing is it is not called or executed automatically upon logging in. (I must do source .bashrc to realize it.) I think what he was trying to say was you need to put a command in ~/.bash_profile to source ~/.bashrc. Bash reads ~/.bashrc if the shell is interactive and it's NOT a login shell. If it's a login shell, bash sources ~/.bash_profile or ~/.profile, but not ~/.bashrc. So, unless you have setting for non-login shells that you don't want login shells to share, the thing to do is add a line like: #This file is sourced by bash when you log in interactively. [ -f ~/.bashrc ] . ~/.bashrc to your ~/.bash_profile. To test if this the problem, run bash again from within your first bash (i.e., type bash at the command prompt). Is your ~/.bashrc being sourced now? (I'll go ahead and guess yes.) Now run a login bash (type bash -l at the command prompt). This time, no ~/.bashrc. Is that what's happening? Hope this helps. -- Luke -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] [Q] bashrc
Hi, Yes, it worked to type bash. It reads .bash_profile which calls .bashrc. And bash -l also worked. I looked up into the man. It says the option means that bash acts as a login shell. Then does it also mean that my $SHELL is not the login shell? Again, echo $SHELL says /bin/sh, and it is symlinked to /bin/bash. I'm so confused as to poke into this and that, but do not have the right place to refer to. I forgot telling that I telnet to my server, and it happens so. But this headache is not related to the telnet login. On Sat, Jul 05, 2003 at 11:37:15PM -0700, Luke Ravitch wrote: On 2003-07-05 23:25, YOON, Joo-Yung [EMAIL PROTECTED] wrote: It exists for sure, and contains many settings therein, but the thing is it is not called or executed automatically upon logging in. (I must do source .bashrc to realize it.) I think what he was trying to say was you need to put a command in ~/.bash_profile to source ~/.bashrc. Bash reads ~/.bashrc if the shell is interactive and it's NOT a login shell. If it's a login shell, bash sources ~/.bash_profile or ~/.profile, but not ~/.bashrc. So, unless you have setting for non-login shells that you don't want login shells to share, the thing to do is add a line like: #This file is sourced by bash when you log in interactively. [ -f ~/.bashrc ] . ~/.bashrc to your ~/.bash_profile. To test if this the problem, run bash again from within your first bash (i.e., type bash at the command prompt). Is your ~/.bashrc being sourced now? (I'll go ahead and guess yes.) Now run a login bash (type bash -l at the command prompt). This time, no ~/.bashrc. Is that what's happening? Hope this helps. -- Luke -- [EMAIL PROTECTED] mailing list -- YOON, Joo-Yung / Gentoo Hovers Korea, BooChun-Shi Email: [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] [Q] bashrc
You missed the point of the first person to respond to you. Bash, when called as sh acts like sh. I.E. it does NOT look for .bashrc or .bash_profile, it looks for .profile. If you insist on keeping you shell as sh, then create a .profile (which can be a soft link to your .bash_profile if you want., but you are also going to want a .shrc. Why not just fix your shell to be bash in /etc/passwd? Lincoln On Sun, 2003-07-06 at 04:23, YOON, Joo-Yung wrote: Hi, Yes, it worked to type bash. It reads .bash_profile which calls .bashrc. And bash -l also worked. I looked up into the man. It says the option means that bash acts as a login shell. Then does it also mean that my $SHELL is not the login shell? Again, echo $SHELL says /bin/sh, and it is symlinked to /bin/bash. I'm so confused as to poke into this and that, but do not have the right place to refer to. I forgot telling that I telnet to my server, and it happens so. But this headache is not related to the telnet login. On Sat, Jul 05, 2003 at 11:37:15PM -0700, Luke Ravitch wrote: On 2003-07-05 23:25, YOON, Joo-Yung [EMAIL PROTECTED] wrote: It exists for sure, and contains many settings therein, but the thing is it is not called or executed automatically upon logging in. (I must do source .bashrc to realize it.) I think what he was trying to say was you need to put a command in ~/.bash_profile to source ~/.bashrc. Bash reads ~/.bashrc if the shell is interactive and it's NOT a login shell. If it's a login shell, bash sources ~/.bash_profile or ~/.profile, but not ~/.bashrc. So, unless you have setting for non-login shells that you don't want login shells to share, the thing to do is add a line like: #This file is sourced by bash when you log in interactively. [ -f ~/.bashrc ] . ~/.bashrc to your ~/.bash_profile. To test if this the problem, run bash again from within your first bash (i.e., type bash at the command prompt). Is your ~/.bashrc being sourced now? (I'll go ahead and guess yes.) Now run a login bash (type bash -l at the command prompt). This time, no ~/.bashrc. Is that what's happening? Hope this helps. -- Luke -- [EMAIL PROTECTED] mailing list -- Lincoln A. Baxter [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] [Q] bashrc
You fellows are right. I just added /bin/bash in /etc/passwd, and it started to work fine to read .bash_profile. Thanks. -- YOON, Joo-Yung / Gentoo Hovers Korea, BooChun-Shi Email: [EMAIL PROTECTED] -- [EMAIL PROTECTED] mailing list