[Xquartz-dev] 2.3.2_rc4

Harald Hanche-Olsen hanche at math.ntnu.no
Sun Dec 21 14:44:03 PST 2008


+ Jeremy Huddleston <jeremyhu at apple.com>:

> On Dec 21, 2008, at 11:19, Harald Hanche-Olsen wrote:
>>
>> Indeed, since Contents/MacOS/X11 is only a wrapper to be called 
>> from Xquartz, it may make sense to move some of the decision 
>> making out of the wrapper script and into Xquartz.
>
> Not really.  We're talking about getting the environment variables 
> that are setup by your login shell into X11.app... The only way to 
> do that would be to have X11.app itself somehow parse your login 
> scripts (hard) or have it started from a shell that already has the 
> environment (easier).

Yeah, but what I was thinking was that maybe it makes more sense for 
Xquartz itself to do something like this:

1. If ~/.x11run exists, run it with whatever arguments you do now.
2. Otherwise, if $SHELL indicates a well-known shell, run that shell 
as a login shell and the appropriate arguments. To make it easier, 
replace the current X11 script by X11.bash, X11.csh, etc and just run 
the appropriate one.
3. Otherwise, If $SHELL is unknown to Xquartz, pretend it's bash and 
do as #2 above.

Hmm, on second thought I imagine one can do the same from within bash:

case "$SHELL" in
  */csh|*/tcsh) ...
...
esac

At least, it is easier to experiment with until we know what we need.

- Harald


More information about the Xquartz-dev mailing list