When using iTerm2 (build 3.0.15) on MacOS 10.12.4, the PATH environment variable ends with /Users/<my-username>. I've verified this is part of the initial value of PATH by printing it at the top of /etc/profile. This only occurs in iTerm, on the built-in Mac Terminal app, the path is identical except that it doesn't end in my home directory.Anybody have any idea what's going on here? Where does the initial value of PATH come from, and can it be changed? Is this because of a setting in iTerm somewhere?
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Check that **Prefs > Profiles > General > Command** is set to Login Shell, otherwise the dotfiles may not be loaded the same way. It's possible that Terminal does something with the environment that I don't do—I don't modify the PWD in the environment that launchd set for iTerm2 when it was launched, and maybe Terminal does some sanitization? At least for me, that environment variable is not set. You can confirm by doing this:1. Select the menu item iTerm2 > Toggle debug log2. Create a new tab3. iTerm2 > Toggle debug log4. Check /tmp/debuglog.txt. The initial environment is logged. The relevant section of log looks like this:1490848654.145231 PTYTask.m:481 (-[PTYTask launchWithPath:arguments:environment:width:height:isUTF8:]): Environment is{COLORFGBG = "7;0";"ITERM_PROFILE" = Default;"ITERM_SESSION_ID" = "w2t1p0:57409868-E08E-4380-BBF9-72B856012E11";LANG = "en_US.UTF-8";PWD = "/Users/gnachman";SHELL = "/bin/tcsh";TERM = "xterm-256color";"TERM_PROGRAM" = "iTerm.app";"TERM_PROGRAM_VERSION" = "3.0.15";"TERM_SESSION_ID" = "w2t1p0:57409868-E08E-4380-BBF9-72B856012E11";}
If you've got a PATH=/Users/your-username in there, that'd explain it. Let me know what you see.
On Wed, Mar 29, 2017 at 9:21 AM, Max Rothman <wheresw...@gmail.com> wrote:
When using iTerm2 (build 3.0.15) on MacOS 10.12.4, the PATH environment variable ends with /Users/<my-username>. I've verified this is part of the initial value of PATH by printing it at the top of /etc/profile. This only occurs in iTerm, on the built-in Mac Terminal app, the path is identical except that it doesn't end in my home directory.Anybody have any idea what's going on here? Where does the initial value of PATH come from, and can it be changed? Is this because of a setting in iTerm somewhere?
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/YfFACfqTz-o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
PTYTask set PATH before exec to PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Users/maxExecChild: command=/usr/bin/login PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Users/maxLast login: Sat May 13 14:59:59 on ttys001shell_launcher: Exec'ing your shell /Users/max/fakeshell with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Users/max/usr/bin:/bin:/usr/sbin:/sbin:/Users/max--
You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/YfFACfqTz-o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iterm2-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/YfFACfqTz-o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iterm2-discus...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
display dialog "PATH: " & (system attribute "PATH")