public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] my gentoo wont read .bashrc automatically
@ 2009-09-01 12:09 Xi Shen
  2009-09-01 12:24 ` Renat Golubchyk
  0 siblings, 1 reply; 8+ messages in thread
From: Xi Shen @ 2009-09-01 12:09 UTC (permalink / raw
  To: gentoo-china, gentoo-user

Hi,

every time i reboot the system, the ~/.bashrc will not be
read/executed automatically. i have give it x attribute. also i have
checked the /etc/bash/bashrc file, and i did not find and logic about
reading/executing the ~/.bashrc file. is there anything wrong with my
system?


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] my gentoo wont read .bashrc automatically
  2009-09-01 12:09 [gentoo-user] my gentoo wont read .bashrc automatically Xi Shen
@ 2009-09-01 12:24 ` Renat Golubchyk
  2009-09-01 21:15   ` Alan McKinnon
  0 siblings, 1 reply; 8+ messages in thread
From: Renat Golubchyk @ 2009-09-01 12:24 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]

Hi!

On Tue, 1 Sep 2009 20:09:12 +0800
Xi Shen <davidshen84@googlemail.com> wrote:
> every time i reboot the system, the ~/.bashrc will not be
> read/executed automatically. i have give it x attribute. also i have
> checked the /etc/bash/bashrc file, and i did not find and logic about
> reading/executing the ~/.bashrc file. is there anything wrong with my
> system?

You don't need the executable bit set on bashrc. ~/.bashrc gets read
when you start an interactive shell, e.g. an xterm. When you log in a
login shell is started, which reads ~/.bash_profile. If you want that
your ~/.bashrc will be read on login include the following statement
in ~/.bash_profile

[[ -f ~/.bashrc ]] && . ~/.bashrc


Cheers,
Renat

-- 
Probleme kann man niemals mit derselben Denkweise loesen,
durch die sie entstanden sind.
                                              (Einstein)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] my gentoo wont read .bashrc automatically
  2009-09-01 12:24 ` Renat Golubchyk
@ 2009-09-01 21:15   ` Alan McKinnon
  2009-09-02 11:28     ` Xi Shen
  0 siblings, 1 reply; 8+ messages in thread
From: Alan McKinnon @ 2009-09-01 21:15 UTC (permalink / raw
  To: gentoo-user

On Tuesday 01 September 2009 14:24:10 Renat Golubchyk wrote:
> Hi!
>
> On Tue, 1 Sep 2009 20:09:12 +0800
>
> Xi Shen <davidshen84@googlemail.com> wrote:
> > every time i reboot the system, the ~/.bashrc will not be
> > read/executed automatically. i have give it x attribute. also i have
> > checked the /etc/bash/bashrc file, and i did not find and logic about
> > reading/executing the ~/.bashrc file. is there anything wrong with my
> > system?
>
> You don't need the executable bit set on bashrc. ~/.bashrc gets read
> when you start an interactive shell, e.g. an xterm. When you log in a
> login shell is started, which reads ~/.bash_profile. If you want that
> your ~/.bashrc will be read on login include the following statement
> in ~/.bash_profile
>
> [[ -f ~/.bashrc ]] && . ~/.bashrc

The standard bash_profile shipped in skel even has a comment directly above 
that (commented) line saying something to the effect of "uncomment the 
following line to have .bashrc read at every new shell"...

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] my gentoo wont read .bashrc automatically
  2009-09-01 21:15   ` Alan McKinnon
@ 2009-09-02 11:28     ` Xi Shen
  2009-09-02 12:02       ` Dale
  2009-09-02 12:04       ` Xavier Parizet
  0 siblings, 2 replies; 8+ messages in thread
From: Xi Shen @ 2009-09-02 11:28 UTC (permalink / raw
  To: gentoo-user

where is the bash_profile? i cannot find it on my gentoo.


On Wed, Sep 2, 2009 at 5:15 AM, Alan McKinnon<alan.mckinnon@gmail.com> wrote:
> On Tuesday 01 September 2009 14:24:10 Renat Golubchyk wrote:
>> Hi!
>>
>> On Tue, 1 Sep 2009 20:09:12 +0800
>>
>> Xi Shen <davidshen84@googlemail.com> wrote:
>> > every time i reboot the system, the ~/.bashrc will not be
>> > read/executed automatically. i have give it x attribute. also i have
>> > checked the /etc/bash/bashrc file, and i did not find and logic about
>> > reading/executing the ~/.bashrc file. is there anything wrong with my
>> > system?
>>
>> You don't need the executable bit set on bashrc. ~/.bashrc gets read
>> when you start an interactive shell, e.g. an xterm. When you log in a
>> login shell is started, which reads ~/.bash_profile. If you want that
>> your ~/.bashrc will be read on login include the following statement
>> in ~/.bash_profile
>>
>> [[ -f ~/.bashrc ]] && . ~/.bashrc
>
> The standard bash_profile shipped in skel even has a comment directly above
> that (commented) line saying something to the effect of "uncomment the
> following line to have .bashrc read at every new shell"...
>
> --
> alan dot mckinnon at gmail dot com
>
>



-- 
Best Regards,
David Shen

http://twitter.com/davidshen84



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] my gentoo wont read .bashrc automatically
  2009-09-02 11:28     ` Xi Shen
@ 2009-09-02 12:02       ` Dale
  2009-09-02 12:15         ` Alan McKinnon
  2009-09-02 12:04       ` Xavier Parizet
  1 sibling, 1 reply; 8+ messages in thread
From: Dale @ 2009-09-02 12:02 UTC (permalink / raw
  To: gentoo-user

Xi Shen wrote:
> where is the bash_profile? i cannot find it on my gentoo.
>
>
>   

root@smoker / # locate bash_profile
/etc/skel/.bash_profile
/usr/portage/app-shells/bash/files/dot-bash_profile
/usr/portage/media-tv/mythtv/files/bash_profile
/home/dale/.bash_profile
/home/dale2/.bash_profile
root@smoker / #

I think the one in /etc/skel/ is the one you are looking for.  I posted
the command so you would know how I found it.  ;-)

Dale

:-)  :-) 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] my gentoo wont read .bashrc automatically
  2009-09-02 11:28     ` Xi Shen
  2009-09-02 12:02       ` Dale
@ 2009-09-02 12:04       ` Xavier Parizet
  1 sibling, 0 replies; 8+ messages in thread
From: Xavier Parizet @ 2009-09-02 12:04 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

Xi Shen a écrit :
> where is the bash_profile? i cannot find it on my gentoo.
> 
> 
> On Wed, Sep 2, 2009 at 5:15 AM, Alan McKinnon<alan.mckinnon@gmail.com> wrote:
>> On Tuesday 01 September 2009 14:24:10 Renat Golubchyk wrote:
>>> Hi!
>>>
>>> On Tue, 1 Sep 2009 20:09:12 +0800
>>>
>>> Xi Shen <davidshen84@googlemail.com> wrote:
>>>> every time i reboot the system, the ~/.bashrc will not be
>>>> read/executed automatically. i have give it x attribute. also i have
>>>> checked the /etc/bash/bashrc file, and i did not find and logic about
>>>> reading/executing the ~/.bashrc file. is there anything wrong with my
>>>> system?
>>> You don't need the executable bit set on bashrc. ~/.bashrc gets read
>>> when you start an interactive shell, e.g. an xterm. When you log in a
>>> login shell is started, which reads ~/.bash_profile. If you want that
>>> your ~/.bashrc will be read on login include the following statement
>>> in ~/.bash_profile
>>>
>>> [[ -f ~/.bashrc ]] && . ~/.bashrc
>> The standard bash_profile shipped in skel even has a comment directly above
>> that (commented) line saying something to the effect of "uncomment the
>> following line to have .bashrc read at every new shell"...

/etc/skel/.bash_profile

HTH.

-- 
      Xavier Parizet
YaGB :   http://gentooist.com
GPG  :    C7DC B10E FC21 63BE
B453 D239 F6E6 DF65 1569 91BF



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] my gentoo wont read .bashrc automatically
  2009-09-02 12:02       ` Dale
@ 2009-09-02 12:15         ` Alan McKinnon
  2009-09-03  0:59           ` Xi Shen
  0 siblings, 1 reply; 8+ messages in thread
From: Alan McKinnon @ 2009-09-02 12:15 UTC (permalink / raw
  To: gentoo-user

On Wednesday 02 September 2009 14:02:26 Dale wrote:
> Xi Shen wrote:
> > where is the bash_profile? i cannot find it on my gentoo.
>
> root@smoker / # locate bash_profile
> /etc/skel/.bash_profile
> /usr/portage/app-shells/bash/files/dot-bash_profile
> /usr/portage/media-tv/mythtv/files/bash_profile
> /home/dale/.bash_profile
> /home/dale2/.bash_profile
> root@smoker / #
>
> I think the one in /etc/skel/ is the one you are looking for.  I posted
> the command so you would know how I found it.  ;-)

Changing it now won't do him any good - the one on skel is just a template 
file copied over to the new home dir when a user is created.

He'll have to diff the files and apply the bits he wants to his own 
.bash_profile

Or do the same to /etc/profile* to have it apply to all users as a global 
default

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] my gentoo wont read .bashrc automatically
  2009-09-02 12:15         ` Alan McKinnon
@ 2009-09-03  0:59           ` Xi Shen
  0 siblings, 0 replies; 8+ messages in thread
From: Xi Shen @ 2009-09-03  0:59 UTC (permalink / raw
  To: gentoo-user

thanks guy, i got it ;)


On Wed, Sep 2, 2009 at 8:15 PM, Alan McKinnon<alan.mckinnon@gmail.com> wrote:
> On Wednesday 02 September 2009 14:02:26 Dale wrote:
>> Xi Shen wrote:
>> > where is the bash_profile? i cannot find it on my gentoo.
>>
>> root@smoker / # locate bash_profile
>> /etc/skel/.bash_profile
>> /usr/portage/app-shells/bash/files/dot-bash_profile
>> /usr/portage/media-tv/mythtv/files/bash_profile
>> /home/dale/.bash_profile
>> /home/dale2/.bash_profile
>> root@smoker / #
>>
>> I think the one in /etc/skel/ is the one you are looking for.  I posted
>> the command so you would know how I found it.  ;-)
>
> Changing it now won't do him any good - the one on skel is just a template
> file copied over to the new home dir when a user is created.
>
> He'll have to diff the files and apply the bits he wants to his own
> .bash_profile
>
> Or do the same to /etc/profile* to have it apply to all users as a global
> default
>
> --
> alan dot mckinnon at gmail dot com
>
>



-- 
Best Regards,
David Shen

http://twitter.com/davidshen84



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-02 19:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-01 12:09 [gentoo-user] my gentoo wont read .bashrc automatically Xi Shen
2009-09-01 12:24 ` Renat Golubchyk
2009-09-01 21:15   ` Alan McKinnon
2009-09-02 11:28     ` Xi Shen
2009-09-02 12:02       ` Dale
2009-09-02 12:15         ` Alan McKinnon
2009-09-03  0:59           ` Xi Shen
2009-09-02 12:04       ` Xavier Parizet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox