Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I finally made the jump and got a MacBook, and I'm trying to move in. I have the OSX port of gedit installed, but I'm having trouble adding it to my PATH. My current PATH looks like this:

export PATH=/opt/local/bin:/Applications/gedit.app/Contents/MacOS/gedit:/opt/local/sbin:$PATH

as per a comment here.

share|improve this question
    
OK, reading the comment I may have misunderstood the question. Can you clarify what you want to do? –  Loïc Wolff Apr 1 '11 at 14:30
1  
If you really want to "make the jump", I recommend a real Mac-centric editor, TextMate. It comes with a shell command that'll launch it, "mate", it's free, and it's significantly superior to gedit (and most other editors, IMHO.) You'll ease your transition into loving OSX if you accept doing things differently, starting with dumping your Gnome apps. –  nix Apr 1 '11 at 14:38
2  
@nix Textmate is not free. It's like $40. –  Loïc Wolff Apr 1 '11 at 14:59
    
@loic-wolff Oh, so it is. Well worth it!! I guess i bought it so long ago, i forgot, LOL –  nix Apr 1 '11 at 15:03
    
But I agree with @nix. Try to look for a native app. Fraiseapp (fraiseapp.com) is really nice and free. And if you really like it, Smultron which has the same core is on the App Store for only a few bucks. –  Loïc Wolff Apr 1 '11 at 15:04
show 1 more comment

2 Answers

up vote 2 down vote accepted

You only need to add the path to the folder containing the gedit binary, not the path to the binary.

Try this

export PATH=/opt/local/bin:/Applications/gedit.app/Contents/MacOS:/opt/local/sbin:$PATH
share|improve this answer
    
Perfect, thanks a lot! –  kivetros Apr 1 '11 at 14:43
add comment

Note: On OS X, you don't need /Application apps to be in the PATH to launch them.

open -a gedit

Check man open

share|improve this answer
    
That is really handy. Thanks so much. –  kivetros Apr 1 '11 at 16:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.