Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Terminal profile not loading on startup

Terminal profile not loading on startup
Thread Tools
Mac Elite
Join Date: Sep 2001
Location: MA, USA
Status: Offline
Reply With Quote
May 17, 2006, 08:15 AM
 
So I have a file in my home directory that i created with vim called ".profile". In it, i have the following:

alias wpi="ssh myusername@ccc.wpi.edu"
alias fossil="ssh myusername@fossil.wpi.edu"
alias ss="ssh -p 26"
alias scpg="scp -P 26"



So when i start the terminal, and I try any of these, I get:

GrapeFruit:~ myusername$ ss
-bash: ss: command not found

Everytime i start the terminal i have to enter ". ./.profile" and then all my aliases work. It used to work all the time with the wpi and fossil aliases, but I just added 2 more and for some reason it wont load now. Any ideas?
AXP
ΔΣΦ
     
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
May 17, 2006, 08:05 PM
 
Do you also have a ~/.bashrc? I think it only looks at one of the two, probably preferring .bashrc.
     
Mac Elite
Join Date: Sep 2001
Location: MA, USA
Status: Offline
Reply With Quote
May 18, 2006, 07:18 AM
 
Originally Posted by wataru
Do you also have a ~/.bashrc? I think it only looks at one of the two, probably preferring .bashrc.
nope, just a .bash_login and .bash_history.
AXP
ΔΣΦ
     
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
May 18, 2006, 11:32 AM
 
Uhh, did you check the .bash_login? Seems like a clue there...
     
Mac Elite
Join Date: Sep 2001
Location: MA, USA
Status: Offline
Reply With Quote
May 18, 2006, 01:01 PM
 
I didn't even think to check that. That did it. Thanks for the help
AXP
ΔΣΦ
     
Mac Elite
Join Date: Jul 2002
Status: Offline
Reply With Quote
May 19, 2006, 12:47 PM
 
By default, the shell launched in the Terminal application uses .profile. However, the same shell (or at least bash) launched through X11 will use the .bashrc file. So I just make the .bashrc file a symbolic link of my .profile.
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 19, 2006, 01:55 PM
 
Formally, the .bashrc is read for *all* bash instances, including those launched as subshells or non-interactively. The .profile is read for all interactive shells, and the .bash_login for login shells.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:59 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2