environment variable needs to be changed

Joined
Sep 18, 2006
Messages
7
Reaction score
0
Points
1
Hi everybody,
I have a small but annoying problem with my environment variable PATH. This is what it looks like:
/sw/bin:/sw/sbin:/usr/local/bin:/usr/local/sbin/usr/local/mysql/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin

As you will notice, there is a ":" missing between "/usr/local/sbin" and "/usr/local/mysql/bin", which I can of course correct by EXPORTing the correct PATH-statement when I open a terminal, but I would like to correct the error, so the PATH is correct to start with.

Can anyone point me in the right direction where I can change this?

Thanks in advance.
Chris (one week mac user)
 
Joined
Jan 4, 2006
Messages
1,385
Reaction score
146
Points
63
Location
Hamburg, Germany
Your Mac's Specs
MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)
AFAIK, the environment variables are defined in two locations
1. Root of your Home folder ~.
2. System root /etc/profiles

By editing one or both you should be able to introduce new PATHS.

More details can be found here.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Don't edit the one in /etc/profiles as it will affect all users on the computer. If you don't have a .bashrc or .bash_profile in your home folder, copy them from /etc/profiles to your home folder and edit them there.

Even if you are the only user on the machine, there are some Fink apps that install "users" for different reasons.
 
Joined
Jun 6, 2006
Messages
1,153
Reaction score
94
Points
48
Your Mac's Specs
MacBook 2.0GHz White, 512MB RAM, 60GB HDD
If you want to check for which file it is, do this in terminal:

cd /etc
grep 'usr/local/mysql' *

Then edit the relevant file
 
OP
C
Joined
Sep 18, 2006
Messages
7
Reaction score
0
Points
1
Thanks guys

I keep forgetting it's actually a BSD-core underneath... of course I'll be able to find it with grep. And to say I use Ubuntu every day on my regular system! :dummy:
I bought this mac mini on eBay for a small price, as I wanted to try out MacOSX, and so far it's great. You just have to get used to it's own quirks and ways of doing things.
So far, the only thing that annoys me a bit is that I can only stretch a window from the right bottom corner, syas a lot really if that's the only thing after more than a week. If I still love it after 6 months, I might get myself a more powerful version

bye,
Chris.
 
OP
C
Joined
Sep 18, 2006
Messages
7
Reaction score
0
Points
1
found it

Actually, the piece of the PATH that needed changing was in my personal folder in .bashrc.login. Must have been a bug in the MySQL installation !? I certainly hadn't edited the file before myself. anyway, it's fine now, the PATH is set correctly when I log in. I only noticed because the shell couldn't find 'mysql'.

Thanks for pointing me in the right direction.
Oh, I found another thing that annoys me. You can't see hidden files from the Finder, and I haven't found a way to enable them. So, I use TextMate's 'Open'-dialog, which has the option to view also the hidden files and directories.
If anyone knows how to for instance view all files like '/etc/*', I would appreciate knowing about it!

bye,
Chris.
My Os's: MacOSX Tiger, Ubuntu 6.06, WinXp, Vista RC1
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top