Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Development and Darwin (http://www.mac-forums.com/forums/os-x-development-darwin/)
-   -   how to set my path? (http://www.mac-forums.com/forums/os-x-development-darwin/165721-how-set-my-path.html)

icthy 09-04-2009 08:05 PM

how to set my path?
 
Hi, I'm new to Macs, coming from the unix/linux world. I just installed the unison file synchronizer, which runs fine if I type it's location explicitly /usr/local/unison-2.32.52/unison. But I can't seem to set the path so that I just need to type "unison".

Here's what I've done:

1) I created a .bash_profile and added the unison directory to my path: export PATH=${PATH}:/usr/local/unison-2.32.52.

2) I sourced .bash_profile

3) confirmation that it works: $ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/unison-2.32.52

But when I type "unison" in the command window, I get: $ unison
Error: can't find the Unison application using the Launch Services database.
Try launching Unison from the Finder, and then try this again.

I guess I don't quite get how the Mac does things (OS 10.5.8). Can anyone give me a hand? Thanks!

leopard-user1 09-04-2009 11:18 PM

If you are already in "/usr/local/unison-2.32.52", you can type "./unison" to go into the "unison" folder.

icthy 09-05-2009 12:19 AM

Thanks. I was hoping to set the path so I can type "unison" from any directory. For some reason, the OS isn't recognizing the $PATH variable. Also, I'd just like to know so I can better understand how Macs work.

icthy 09-11-2009 05:27 PM

I resolved my issue. I was setting the path correctly. But the problem was there was a dead link to /usr/local/bin/unison, and that was being found first, before the /usr/local/uinson-2.32.52.

Just out of curiosity, is the lack of much response to my question because it was so dumb, or because most people don't use their macs as a unix-like machine?

pigoo3 09-11-2009 05:28 PM

Quote:

Originally Posted by icthy (Post 905423)
Just out of curiosity, is the lack of much response to my question because it was so dumb, or because most people don't use their macs as a unix-like machine?

EXACTLY...we don't set "paths" in the Macintosh world!!!;)
(at least most Mac users don't)

- Nick
p.s. You're giving me the "shakes" just hearing the words "set path"!!!http://www.freesmileys.org/smileys/s...aughing024.gif

Dysfunction 09-11-2009 05:36 PM

I'm normally all over these if I see em :D

but I didn't see this one. You just don't see a lot of *nix geeks, so geeky *nix stuff just disappears.

vansmith 09-11-2009 05:37 PM

Some of use our Macs as Unix machines (me included). ;)

I'm like Dysfunction - I would have answered this but I missed it. All's good though!

pigoo3 09-11-2009 05:38 PM

Quote:

Originally Posted by vansmith (Post 905429)
Some of use our Macs as Unix machines (me included). ;)

Ooh I know you guys are out there!;) Maybe some day I'll give it a try.:)

- Nick

dtravis7 09-11-2009 05:52 PM

I was/am quite good with the MS DOS path statement and batch files! Does MS Dos count? :D

bobtomay 09-11-2009 05:58 PM

I'm part of the masses - pretty much strictly a GUI guy.
When Win3.1 hit my first machine, I left the command line behind as fast as I could.

Don't even know what you mean by "set my path" or a ".bash_profile". :Oops:

vansmith 09-11-2009 06:45 PM

Quote:

Originally Posted by dtravis7 (Post 905437)
I was/am quite good with the MS DOS path statement and batch files! Does MS Dos count? :D

Aaahhhhh......no. :P

Konan 09-13-2009 10:20 PM

If you want to manually set (or see) your path, edit /etc/paths. sudo nano /etc/paths

Count me as another command line junkie who uses the Mac as a very high quality hardware Unix machine.

What's this Gooie that everyone keeps talking about?

Konan


All times are GMT -4. The time now is 12:12 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.