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.

Some manifestations of this problem: macports won't install, MATLAB won't run, BTT works but incessantly spams me with " not found" popups, and emacs shell does not work.

My interactive shell PATH is fine, so this is my '/etc/paths' file: /usr/bin /bin /usr/sbin /sbin /usr/local/bin /Users/sambo/bin

where that last one is my own personal scripts. Could I have damaged it just from appending? Anyways, that's problem and help would be appreciated.

EDIT: With echo -e ${PATH//:/\\n}, I get

/Users/sambo/.rvm/gems/ruby-1.9.2-p290/bin
/Users/sambo/.rvm/gems/ruby-1.9.2-p290@global/bin
/Users/sambo/.rvm/rubies/ruby-1.9.2-p290/bin
/Users/sambo/.rvm/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/Users/sambo/binsr/sbin
/sbin
/usr/X11/bin
/usr/texbin
â
/Users/sambo/sox
/Users/sambo/bin
/usr/texbin

/Users/sambo/.rvm/gems/ruby-1.9.2-p290/bin:/Users/sambo/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/sambo/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/sambo/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/sambo/binsr/sbin:/sbin:/usr/X11/bin:/usr/texbin:â:/Users/sambo/sox:/Users/sambo/bin:/usr/texbin

  1. is it OK for these ruby bins to be upstream of the system bins?
  2. could that junk cause any trouble?
share|improve this question
    
In terminal, issue an echo $PATH and report back –  Dustin Oct 30 '11 at 2:51
2  
The â after /usr/texbin looks kind of fishy. –  patrix Oct 30 '11 at 7:54
    
And: what happens if you try to run uname directly at the shell prompt? If it fails, please copy/paste the whole error message. –  patrix Oct 30 '11 at 7:54
    
All the "not found" commands work. My shell PATH is fine. How do I go about r the removing from PATH? I don't know where that "â" junk came from. –  user13004 Oct 30 '11 at 19:29
    
For example, when I launch Emacs from the terminal (an interactive shell), I can use "M-x shell". When I launch Emacs from the dock (which spawns process from some other shell), I cannot. Thus, how do I change the environment of the shell that is called by the dock? –  user13026 Oct 31 '11 at 5:57
show 1 more comment

1 Answer 1

Your question is unclear as it seems to ask several things. However the issue re launching from the Dock can be answered.

The Dock does not call a shell. .profile and other startup scripts are only run when Terminal.app or similar starts a shell or you run a shell script via launchd etc.

To change the path used for Apps launched from the Dock, Finder or other GUI then you need to change the path your Workspace uses this is in ~/.MacOSX/environment.plist e.g. mine is

<?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>WAFDIR</key>
  <string>/Users/mark/src/third_party/git-svn/waf</string>

  <key>PATH</key>
  <string>/Users/mark/bin:/Users/mark/env/bin:/Users/mark/usr/local/bin:/usr/local/bin:/opt/local/bin:/usr/local/git/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/libexec/binutils:</string>
</dict>
</plist>

Also have a look at this question.

share|improve this answer
add comment

protected by Community Nov 9 '11 at 3:50

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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