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 just installed the text wrangler command line tools and they are placed into /usr/local/bin by default. On Lion this directory appears to be a root only directory, and I don't want to have to run the edit command as root.

However if I copy the edit command into /usr/local it won't launch textwrangler. I can see the "edit" process running but text wranger isn't launched.

Is there a trick to getting edit working in /usr/bin? The other command line tools from textwrangler work fine from there.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Sorry, but /usr/bin is still a root/wheel directory, so it is actually going to be worse to install the textwrangler stuff there.

In any case, in your terminal type

echo $PATH and see if /usr/local/bin is in the path. If /usr/local/bin is in your path all the stuff you install there will NOT need root permissions to be run. If it is not, you can add it as such:

go to /etc/paths.d/

create a text file that you can call localstuff (or whatever)

edit localstuff putting /usr/local/bin in it.

Example:

$ ls /etc/paths.d/
50-X11   MacGPG2  TeX      TeXbin   git      julia

$ cat /etc/paths.d/julia 
/usr/local/julia

$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/julia:/usr/local/MacGPG2/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin

make sure that your shell is a login shell in whatever terminal you are using, the OSX predicated way of adding stuff to $PATH seems to break if you do not use a login shell.

As I said though, chances are that /usr/local/bin is in your user's $PATH anyway, so no need to worry. I'd also move all the textwrangler files you put in /usr/bin in /usr/local/bin to avoid future problems.

share|improve this answer
    
You're right it doesn't need admin permissions to run, I guess at some point I might have changed the permissions on /usr/local/bin changing them back fixed the problem. –  Lee May 11 '12 at 20:21

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.