which file is sourced by bash on login (Mac OS X 10.5.3)?


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) which file is sourced by bash on login (Mac OS X 10.5.3)?
# 1  
Old 06-28-2008
which file is sourced by bash on login (Mac OS X 10.5.3)?

Hi:

So my current Python (2.52) rig is not working as intended. "echo $PATH" in bash gives me 'X'" that's not what i want, so i need to change my path. To do that, there appeared to be four choices (all in my ~/ directory--note: I'm root, it's my Mac, but i'm in a user account):
.profile
.bashrc
.bash_profile
.bash_login

I inserted (unique) dummy paths in each of these, sourced them, keyed in "echo $PATH" again--nothing changed. Apparently none of these files are sourced by bash on login. I looked for a similar file in root (/env) but found nothing.
Finally, i'm aware that OS X uses the .plist to set environment variables--fine, but mine is empty (as i thought it would be) so that's not the culprit.
This is a painfully basic question that i was pretty sure i knew, but didn't. Any ideas?

Thanks,

--alex
# 2  
Old 07-01-2008
This might not be exactly the answer you were looking for, but put this in your .bash_profile

#path info
export PATH="$PATH:/your/test/path/here"

Quit the Terminal application (not just closing the window), and relaunch the terminal.
You $PATH should reflect the change.
# 3  
Old 07-11-2008
zsh is my preferred shell on all Unixes. I use Xterm with zsh in XQuarts on Mac OS X. I had issues with setting PATH when I switched shells as well. I changed the PATH variable in my .profile and added this "source ~/.profile" to my zshrc. It works rather well, and I believe .profile is shell-independent, so if other programs try to access it, then they can. I use the same workaround for screen, as well.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[solved] Where & what bash env file, Mac OS?

Hi! I wanted to simplify my bash prompt, so I edited my etc/bashrc file. I thought this was the file that would override any other env files. When I opened it, I saw that the way it was setup was not what my prompt looked like, although I forget exactly what was there. But i edited it the way I... (1 Reply)
Discussion started by: sudon't
1 Replies

2. Red Hat

bash Linux login file

Hello all new to linux here... Please help,... when using Pico how can I open and edit the bash Linux login file (stored in your Linux root directory). I would like to add the new commands for items listed below. a) display contents of a directory => mycd b) display date and time =>... (4 Replies)
Discussion started by: dannyboy02
4 Replies

3. Shell Programming and Scripting

Quitting from a script, either sourced or not

This is a very simple problem, I am wondering why I can find no answer anywhere... I have a script that can be run either sourced or not. This script has some place where it needs to quit execution (e.g., when an error is found) If I "exit", the sourced call would exit the parent shell, but... (7 Replies)
Discussion started by: MadMage
7 Replies

4. OS X (Apple)

What settings are required for login to CVS using Terminal in Mac OS X?

Hi All, I want to login to CVS using terminal. I am executing the following command in the terminal :- export CVSROOT=: pserver:ags_rd@istcvs.corp.apple.com:/istcvs/CVSHOME cvs login But i get the following error : Afreens-iMac:buildTest Afreen$ export CVSROOT=:... (1 Reply)
Discussion started by: Afreen
1 Replies

5. Shell Programming and Scripting

What settings are required for login to CVS using Terminal in Mac OS X?

Hi All, I want to login to CVS using terminal. I am executing the following command in the terminal :- export CVSROOT=: pserver:ags_rd@istcvs.corp.apple.com:/istcvs/CVSHOME cvs login But i get the following error : Afreens-iMac:buildTest Afreen$ export CVSROOT=:... (3 Replies)
Discussion started by: Afreen
3 Replies

6. Shell Programming and Scripting

KSH - Sourced file location

The sample scripts below, I am looking for the location of the sourced b.sh file. The b.sh file is source by multiple files, so it is not feasible to rely on a "global" variable or passed argument. Is there any way to determine the location of b.sh within b.sh? a.sh #!/bin/ksh echo "a:... (11 Replies)
Discussion started by: Al262
11 Replies

7. Shell Programming and Scripting

Exit from sourced script

Hello, I have written a script (say chld.sh). its structure is as follows: ------------------------ #!/bin/sh usage() { echo "chld.sh <param1> <param2>" exit 0 } chk_param_1() { case $param1 in c) export PATH=$PATH:/home_a/bin/execs;; d) export... (2 Replies)
Discussion started by: angad.makkar
2 Replies
Login or Register to Ask a Question