View previous topic :: View next topic |
Author |
Message |
proxy Apprentice


Joined: 20 Apr 2002 Posts: 260 Location: Chantilly, VA
|
Posted: Mon May 13, 2002 12:18 am Post subject: .bashrc, close but not quite |
|
|
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 |
|
 |
dArkMaGE Apprentice


Joined: 20 Apr 2002 Posts: 152
|
Posted: Mon May 13, 2002 7:00 am Post subject: |
|
|
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 |
|
 |
Jyrinx Tux's lil' helper


Joined: 03 May 2002 Posts: 92 Location: Carleton College - Northfield, MN
|
Posted: Mon May 13, 2002 9:47 am Post subject: |
|
|
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 |
|
 |
proxy Apprentice


Joined: 20 Apr 2002 Posts: 260 Location: Chantilly, VA
|
Posted: Mon May 13, 2002 1:44 pm Post subject: |
|
|
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 |
|
 |
|