[Xquartz-dev] Leopard, Xquartz 2.1.5 and Spawning Problems

Jeremy Huddleston jeremyhu at apple.com
Wed Mar 18 18:39:28 PDT 2009


On Mar 18, 2009, at 17:32, Grant Erickson wrote:
>
> Then X starts normally and whatever command that needed to use the  
> display
> runs and realizes its windows, etc. I've been using this .profile  
> for nearly
> two decades on all manner of systems including Sun OS, Solaris, Irix,
> Cygwin, HP/UX, Darwin, Linux, etc. and have never had a problem with  
> the
> above logic. The whole script amounts to:
>
>    # Set umask
>
>    # Add some paths to PATH
>
>    # Exit if non-interactive
>
>    # Interactive setup


Your .profile is SOURCED, so you putting 'exit 0' causes the non- 
interactive shell to exit.  Change this to use the form:

# set umask
# set path
# if interactive
   # interactive setio
# fi

> What is it about falling off the end of the profile that is OK (should
> amount to exit $?) whereas explicitly calling exit 0 causes X11 to  
> choke in
> attempting to launch?

If you exit, you exit.  launchd doesn't see X11 start (because you  
exited), so it tries again (and you exit again).

"falling off the end of the profile" is not the same as exit $?




More information about the Xquartz-dev mailing list