Article View: comp.sys.next.sysadmin
Article #214Re: Emacs environment variable lost
From: Carl Edman
Date: Fri, 24 Jul 1992 15:48
Date: Fri, 24 Jul 1992 15:48
22 lines
1566 bytes
1566 bytes
Christopher B. Moore writes > I've noticed (while installing the Auc-TeX package) > that evaluation of (getenv "HOSTTYPE") in an Emacs2.1 > window started by clicking on the Emacs2.1 icon in the > workspace returns nil. However, in an Emacs2.1 window > started from the commandline it returns "next". What > gives? Why, environment variables aren't global - they are inherited. And the parent of all programs started by the Workspace is (surprise !) Workspace. And Workspace does not have any environment variables set. If you start a NeXTstep program directly from the commandline its parent is the shell so your application inherits all the shell environment variables. (BTW, the better way to do this is not to start applications directly from the command line but instead to tell Workspace to do it from the command line, see man page on open(1)). EPS wrote a hack to get enviroment variables for the Workspace which involved installing a shell script as Workspace replacement. This shell script then sets the environment variables and execs the real Workspace. Carl Edman
Technical Details
Message-ID:
<2A702636.22178@noiro.acs.uci.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!news.claremont.edu!ucivax!noiro.acs.uci.edu!nntpsrvReferences:
<CMOORE.92Jul24092902@zenobia.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!news.claremont.edu!ucivax!noiro.acs.uci.edu!nntpsrv From: cedman@714-725-3165.nts.uci.edu (Carl Edman) Subject: Re: Emacs environment variable lost Nntp-Posting-Host: 714-725-3165.nts.uci.edu Message-ID: <2A702636.22178@noiro.acs.uci.edu> Newsgroups: comp.sys.next.sysadmin Reply-To: cedman@golem.ps.uci.edu (Carl Edman) Lines: 22 Date: 24 Jul 92 15:48:06 GMT References: <CMOORE.92Jul24092902@zenobia.mit.edu>