Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
.bashrc, close but not quite
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
proxy
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 253
Location: Chantilly, VA

PostPosted: Mon May 13, 2002 12:18 am    Post subject: .bashrc, close but not quite Reply with quote

well i just saw that they added a .bashrc to /etc/skel and added aliases to the .bash_profile in there too. This works great on the initial log in...but still, it does not create these aliases during subsequent logins while in X and all.

I recomend having the .bashrc execute a /etc/bashrc and put the aliases in there.

this way it will always be executed.

proxy
Back to top
View user's profile Send private message
dArkMaGE
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 152

PostPosted: Mon May 13, 2002 7:00 am    Post subject: Reply with quote

just out of curiosity why in the world do shells read different config files depending on if its a login shell or a normal shell?
in my .bashrc i always put source /etc/profile
is there anything wrong with this?
or are they just seperated for historical reasons?
Back to top
View user's profile Send private message
Jyrinx
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2002
Posts: 92
Location: Carleton College - Northfield, MN

PostPosted: Mon May 13, 2002 9:47 am    Post subject: Reply with quote

dArkMaGE wrote:
just out of curiosity why in the world do shells read different config files depending on if its a login shell or a normal shell?


Here's what gentoo put in my .bashrc:

Code:
# This file is sourced by all bash shells on startup, whether interactive
# or not.  This file *should generate no output* or it will break the
# scp and rcp commands.


I guess anything generating output is supposed to be in ~/.bash_profile, though I can't imagine what output you'd want in these files, anyway. (Maybe some sort of tacky "hello" when you log in ...)

jyrinx
jyrinx@mindspring.com
Back to top
View user's profile Send private message
proxy
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 253
Location: Chantilly, VA

PostPosted: Mon May 13, 2002 1:44 pm    Post subject: Reply with quote

the reason is basically if you want some text of any sort to be output during login, it must go into .bash_profile.

common usage of this I have seen is outputing a random fortune (redhat 5.x?) at login, or as my school does, output information about the computer you just logged into such as reminders of how ot use X remotely, and if you have mail still unread.

it is useful, but unfortunately, a bit annoying :(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum