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 > Adding /sw to my path

Adding /sw to my path
Thread Tools
Junior Member
Join Date: Sep 2005
Location: J a p a n
Status: Offline
Reply With Quote
Oct 4, 2005, 01:57 AM
 
For some reason on this iBook of mine apt-get and the whole /sw dir is not in my path. 'env' gives me this...

Code:
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
... as my path.

I want to add /sw, but where is the .login or .bashrc file to edit? Right now I have nothing special going, and no special shells. I just fire up Terminal and go.

Any help appreciated!!

Edit: I ran the path config tool included with the installer, but it still doesn't work properly...
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Oct 4, 2005, 08:14 AM
 
Check what's in your home directory by typing

ls-lA

to show invisible files. If there are no .login or .bashrc files, create them and add the path (I assume you have instruction on how to do that ?).
     
Grizzled Veteran
Join Date: Apr 2002
Location: case.edu
Status: Offline
Reply With Quote
Oct 4, 2005, 08:33 AM
 
First run
Code:
echo $SHELL
to find out what shell you are using. If it's bash, execute
Code:
echo 'export PATH=/sw/bin:$PATH' >> ~/.bash_profile
to add the path setup line to your bash_profile startup file.

pb 1440x960 | 1.67, 1.5, 128, 80 | leopard
     
Junior Member
Join Date: Sep 2005
Location: J a p a n
Status: Offline
Reply With Quote
Oct 4, 2005, 06:55 PM
 
My default shell is tcsh which I don't want

Do I change it somewhere in /etc ?
     
Junior Member
Join Date: Dec 2000
Location: Arlington, VA - USA
Status: Offline
Reply With Quote
Oct 4, 2005, 08:16 PM
 
To change your shell:
http://forums.macnn.com/archive/t-141539.html

But be careful. Some installer scripts might assume the shell you're running to be tcsh... Small risk, but it is possible. As long as you remember you've changed you shell it probably won't be too big a deal. I play it safe and have an "exec /bin/ksh" in my .bash_profile (I'm running tiger, they changed the default from 10.3 to 10.4) You could similarly edit the .cshrc to do the same. Just make sure you edit a shell specific version of the file. For example, bash, ksh and sh all use .profile. If you changed .profile you'd get stuck in a never ending loop of execs.

Cheers,

Rich
     
Junior Member
Join Date: Sep 2005
Location: J a p a n
Status: Offline
Reply With Quote
Oct 5, 2005, 11:03 PM
 
Thanks for the info rwhiffen I'll look into that.

For some reason the default shell on that iBook is tcsh, but here on my Pismo it's bash
     
Grizzled Veteran
Join Date: Apr 2002
Location: case.edu
Status: Offline
Reply With Quote
Oct 5, 2005, 11:56 PM
 
bash became the default shell of OS X with the 10.3 release. If you did an upgrade from 10.2 to 10.3, user accounts kept their shell setting (which was tcsh by dfault) while accounts created after installing 10.3, or on machines with a clean 10.3 install, defaulted to bash.

pb 1440x960 | 1.67, 1.5, 128, 80 | leopard
     
Junior Member
Join Date: Sep 2005
Location: J a p a n
Status: Offline
Reply With Quote
Oct 6, 2005, 03:11 AM
 
Okay that would make sense. I've had the iBook since 2003 and used Jaguar on it back then.
     
Junior Member
Join Date: Sep 2005
Location: J a p a n
Status: Offline
Reply With Quote
Oct 6, 2005, 06:32 PM
 
I got it to work. I changed my default shell to bash, then ran the path setup program that comes with the Fink installer. The path setup app said it didn't work, but it did.

Thanks for the help
     
   
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 03:15 PM.
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