how to set my path?

Joined
Sep 4, 2009
Messages
3
Reaction score
0
Points
1
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!
 
Joined
Jan 27, 2009
Messages
531
Reaction score
4
Points
18
Location
New York, NY
Your Mac's Specs
17" MacBook Pro, 2.5 GHz Intel Core 2 Duo Processor, 2 GB 667 MHz DDR2 SDRAM, not unibody
If you are already in "/usr/local/unison-2.32.52", you can type "./unison" to go into the "unison" folder.
 
OP
I
Joined
Sep 4, 2009
Messages
3
Reaction score
0
Points
1
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.
 
OP
I
Joined
Sep 4, 2009
Messages
3
Reaction score
0
Points
1
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

Well-known member
Staff member
Admin
Joined
May 20, 2008
Messages
44,210
Reaction score
1,418
Points
113
Location
U.S.
Your Mac's Specs
2017 15" MBP, 16gig ram, 1TB SSD, OS 10.15
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"!!!
smiley-laughing024.gif
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
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

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
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

Well-known member
Staff member
Admin
Joined
May 20, 2008
Messages
44,210
Reaction score
1,418
Points
113
Location
U.S.
Your Mac's Specs
2017 15" MBP, 16gig ram, 1TB SSD, OS 10.15
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


Retired Staff
Joined
Jan 4, 2005
Messages
30,133
Reaction score
703
Points
113
Location
Modesto, Ca.
Your Mac's Specs
MacMini M-1 MacOS Monterey, iMac 2010 27"Quad I7 , MBPLate2011, iPad Pro10.5", iPhoneSE
I was/am quite good with the MS DOS path statement and batch files! Does MS Dos count? :D
 

bobtomay

,
Retired Staff
Joined
Dec 22, 2006
Messages
26,561
Reaction score
677
Points
113
Location
Texas, where else?
Your Mac's Specs
15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '14 1.8 i7 8GB 10.11; 21" iMac '13 2.9 i5 8GB 10.11; 6S
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

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Joined
Sep 10, 2008
Messages
61
Reaction score
1
Points
8
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
 

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