Results 1 to 6 of 6
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
04-04-2006 #1
- Join Date
- Mar 2006
- Posts
- 6
Question regarding .bash_profile/.bashrc
I am sure it is something simple that I am just not doing. Any help would be appreciated.
-
04-04-2006 #2
- Join Date
- Jun 2005
- Posts
- 668
you want "-ls" on the end of your xterm and rxvt calls
here is mine
Code:rxvt -ls -bg black -fg white -g 100x30 -cr green +sb -title "kerns terminal"
-
04-04-2006 #3
I usually have .bash_profile source .bashrc and put everything in .bashrc.
It can be a bit tricky. For a rather long-winded explanation, which I refuse to write again, see
http://www.freebsdforums.org/forums/...ad.php?t=37026
post number 14 on the thread.
Basically, .bash_profile is sourced at first login while .bashrc is sourced, not at logon, but .bashrc will be sourced for all interactive shells, that is, shells started while already logged in.
(Note that the tests in the linked thread probably won't work. In FreeBSD, sh and bash are two separate things, in most Linux distributions, sh is simply a link to bash. )
-
04-04-2006 #4
- Join Date
- Mar 2006
- Posts
- 6
Originally Posted by scottro
-
04-04-2006 #5
- Join Date
- Jun 2005
- Posts
- 668
I dont get why you'd have .bashrc source .bash_profile, I know about the ordering, unless you do other initialisation in .bashrc.
I solely use .bash_profile, after all , if you're doing nothing else in .bashrc it just does nothing more than adding extra processing sourcing the .bash_profile.
or do I have the wrong idea completely? :o
-
04-05-2006 #6
It depends upon your situation.
If you log in, then .bash_profile is checked. However, if you start subshells, depending on various factors, .bash_profile might not be checked, but .bashrc will be. For me, especially because I use zsh as my main shell, if I do use bash, it tends to be a subshell. So, if I only have .bash_profile, but then want to use bash instead of zsh for something, it won't be sourced. On the other hand, if I have a .bashrc, it will be sourced.
Wow, I don't write about this very clearly, in my own opinion. Ok, right now, I'm in FreeBSD, with zsh as my shell. I have a .bash_profile that just says, source ~/.bashrc.
If I rename .bash_profile to .bash_profile.bak and then want to use bash for something, so simply type bash at a command prompt, it will source my .bashrc.
However, if I had no .bashrc and only had .bash_profile, and type bash at a command prompt to change shells, it won't source my .bash_profile.
Hopefully, this is at least semi-clear