* Cameron Simpson <c...@zip.com.au> [111103 11:47]:
> On 03Nov2011 07:55, Tim Johnson <t...@akwebsoft.com> wrote:
>
> That sounds right. Taking the latter case first, mutt gets the environment
> because your login shell has build the environment before mutt gets
> invoked.
>
> For the former case, mutt gets invoked possibly directly by iTerm2, more
> likely by haning the string "/opt/local/bin/mutt" to /bin/sh or your
> own shell, but _not_ as a login shell. So your personal environment
> setup has not been run. This situation is common in "GUI desktop"
> environments, where the sequence is:
>
> GUI -> terminal-app -> command
>
> ~/.bash_profile et al don't get used along that path.
>
> By contrast, a text mode UNIX system goes:
>
> getty -> login-shell -> start-window-system -> terminal-app -> command
>
> and your login environment setup gets in right at the start.
>
> Upshot: all new terminals on your Mac really want to source your login
> environment. For your default profile you're running a login shell so it
> is all done. For the others you need to tweak the command in the
> profile.
>
> You currently have:
>
> /opt/local/bin/mutt
>
> Try changing the mutt profile to one of these:
> /opt/css/bin/with-login-env /opt/local/bin/mutt
> or
> bash --login -c /opt/local/bin/bash
Cameron, thanks for those explanations.
I have not yet installed your css package. Been really busy here.
Will try to get to it tomorrow or saturday.
This is fun. And informative.
BTW: This pythonist has notices a whole lot of .py files in your
tarball.
> The only reason I mention the former is that it plays nicely if the
> command has arguments which need quoting, eg:
>
> mutt -e 'some mutt setup commands'
>
> with-login-env lets you use that raw:
> with-login-env mutt -e some-setup-commands'
>
> whereas the latter needs nested quotes:
> bash --login -c 'mutt -e "some mutt setup commands"'
>
> which will get nasty quite fast if there are shell/mutt $-strings in
> the commands.
L8tr
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com