[plt-scheme] scribble ultra beginner

From: Jakub Piotr Cłapa (jpc-ml at zenburn.net)
Date: Wed Apr 28 08:09:37 EDT 2010

On 28-04-10 02:38, Eric Tanter wrote:
> [If there is a mac guru listening, I'd like to know how I can configure the OS such that any application not launched from a terminal has access to /usr/texbin...]

The general way is to add a new file to /etc/paths.d . Unfortunately it 
is not general enought to work in the GUI. GUI apps get started by the 
loginwindow process which only interprets ~/.MacOSX/environment.plist 
[1]. Even when you launch a subshell to run your command it won't source 
the usual shell configuration files and only inherits what the parent 
GUI program had.

[1]: http://developer.apple.com/mac/library/qa/qa2001/qa1067.html

One idea is to run path_helper from DrScheme and import the paths (but 
it won't work with ~/.profile customizations) or to do it like MacVim.

This is an except from the MacVim manual:
*macvim-login-shell*
Applications opened from the Finder do not automatically source the user's
environment variables (which are typically set in .profile or .bashrc). 
  This
presents a problem when using |:!| to execute commands in the shell 
since e.g.
$PATH might not be set properly.  To work around this problem MacVim starts
new Vim processes via a login shell so that all environment variables 
are set.

By default MacVim uses the $SHELL environment variable to determine which
shell to use (if $SHELL is not set "/bin/bash" is used).  It is possible to
override this choice by setting the user default MMLoginShellCommand to the
shell that should be used (e.g. "/bin/tcsh").  MacVim tries to make the 
shell
a login shell by prepending argv[0] with a dash.  If you use an exotic shell
and need to pass it a parameter to make it a login shell then you can 
set the
user default MMLoginShellArgument (e.g. to "-l").  Finally, if the "bash"
shell is used, then "-l" is automatically added as an argument.  To override
this behaviour set MMLoginShellArgument to "--".


-- 
regards,
Jakub Piotr Cłapa


Posted on the users mailing list.