I got a new machine recently and one of the first things I installed was obviously TextMate. This was before I had installed anything in (or even created) `/usr/local`. I realized this when TextMate offered to create the `mate` symlink in `/usr/bin`. No big deal. I declined, created `/usr/local/bin`, and started TextMate again. It still wanted to put the link in `/usr/bin` and `/usr/local/bin` didn't appear on the drop-down list. So, I just choose "Other…" and specified a path. Still no big deal. It's a one-time operation after all.
But yesterday, I tried to use the Subversion bundle for the first time on the new machine and it couldn't find `svn`. I typed `echo $PATH` and hit ⌃R and saw that `/usr/local/bin` hadn't made it to this list either (while it does appear on another machine I've been using for a while).
Now, I know I can fix these problems one at a time as they come up (specify a path for `mate`, set a path in `$TM_SVN`, etc) but I'd rather not do that. Plus there may be other ramifications that aren't obvious and I won't know they need fixing. This applies to newly created users as well, so it seems to be a global thing, but I can't figure out where. I see nothing in `/Library` that would affect TextMate and I know Allan has a rule about the app not modifying itself in `/Applications`.
Does anyone know how to make TextMate generally/globally aware that `/ usr/local/bin` exists now (as though it existed the first time I ran TextMate)? Thanks in advance.
--- Rob McBroom http://www.skurfer.com/ I didn't "switch" to Apple... my OS did.
On Dec 7, 2006, at 11:05 AM, Rob McBroom wrote:
Does anyone know how to make TextMate generally/globally aware that `/usr/local/bin` exists now (as though it existed the first time I ran TextMate)? Thanks in advance.
Read the "Important" paragraph at:
http://macromates.com/textmate/manual/shell_commands#search_path
Should fix you right up.
James Edward Gray II
On Dec 7, 2006, at 12:45 PM, James Edward Gray II wrote:
On Dec 7, 2006, at 11:05 AM, Rob McBroom wrote:
Does anyone know how to make TextMate generally/globally aware that `/usr/local/bin` exists now (as though it existed the first time I ran TextMate)? Thanks in advance.
Read the "Important" paragraph at:
http://macromates.com/textmate/manual/shell_commands#search_path
I actually found the clue I needed further up when I saw the note about `bash_init.sh`. I thought all things `bash` were still at the defaults since I never run it, but I had apparently added `/usr/local/ bin` to its PATH a long time ago on the older system. Adding it to `/ etc/profile` on the new system fixed things. Thanks all for the suggestions and for the nudge in the right direction.
--- Rob McBroom http://www.skurfer.com/ I didn't "switch" to Apple... my OS did.
On Dec 7, 2006, at 12:05 PM, Rob McBroom wrote:
Does anyone know how to make TextMate generally/globally aware that `/usr/local/bin` exists now (as though it existed the first time I ran TextMate)? Thanks in advance.
TextMate uses the default login shell for most commands. This is a very basic shell, files like /etc/profile, .bash_profile etc don't get sourced there. The path therefore only contains /bin:/sbin:/usr/ bin:/usr/sbin, if I recall correctly. You can remedy that in a number of ways, none of them very satisfactory.
One is to define the $PATH variable in TextMate, under Preferences -> Advanced -> Shell Variables. This is not too terrible an idea IMHO, and easy to revert if it causes problems. You might need to occasionally update it if things change though.
The other is to edit the file ~/.MacOSX/environment.plist, which is a file containing a list of environment variables you want all GUI apps to be able to use. I have appended how mine looks like atm, as an example. You need to log out and back in for the effects to take place (which is its main disadvantage). Keep in mind, unless I am mistaken "~" doesn't have its special meaning here. Not sure about $HOME.
Haris
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CVS_RSH</key> <string>ssh</string> <key>SSH_AUTH_SOCK</key> <string>/tmp/501/SSHKeychain.socket</string> <key>PATH</key> <string>/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/teTeX/bin/powerpc- apple-darwin-current:/usr/local/bin</string> </dict> </plist>
On 12/7/06, Charilaos Skiadas skiadas@hanover.edu wrote:
On Dec 7, 2006, at 12:05 PM, Rob McBroom wrote:
The other is to edit the file ~/.MacOSX/environment.plist, which is a file containing a list of environment variables you want all GUI apps to be able to use.
Or you can use the prefpane [RCEnvironment][1] to easily edit your environment.plist with the added benefits to being able to revert changes and load backup easily.
[1]: http://www.rubicode.com/Software/RCEnvironment/
-- Fred