starting XDarwin with login apps

  • Nobody/Anonymous

    When I start XDarwin with login apps, OR if I just double
    click on it in the finder, its starts then exits.

    If I use a terminal to start x, then it works fine.  My .xinitrc
    does run properly.

    Any ideas?

    • Patrik Montgomery

      Your problem is likely that you have something odd in your shell startup files (.tcshrc, .lgin and the like). In particular, remove any lines with the command "tset". If this doesn't help, read the logfile (in and copy it here.

    • Nobody/Anonymous

      Thanks very much Patrick.

      The issue is that PS1 seems to be set even though the shell is not interactive and this is fooling my startup files into doing "terminal & interactive things".

      After some experimentation, I determined that its not the shell running .xinitrc (ie PS1 is NOT set in .xinitrc).  But it appears another shell is being started by XDarwin that has PS1 set.  Note: I did rule out my .xserverrc since it does not try to establish my "login env" the way my .xinitrc/.xsession (same file for me) does.  

      Any clues where this extra shell gets kicked?

      A related question.  Is it possible to boot OS-X into a non-graphical login, "login normallly", and then kick off aqua/quartz? 

    • Patrik Montgomery

      When starting XDarwin from the Finder, xinitrc is run from an interactive (login) shell, which is nonstandard and the reason for the behaviour you're seeing. The reason for doing it this way is to make sure xinitrc has the environment set up (notably $PATH). If not doing it this way, an xinitrc command not in the default PATH will fail because it is not found. Since the standard way of adding something to the PATH is adding it to .login, the decision was made to do it this way to make sure .login was read and PATH correctly set up before running xinitrc.

    • Nobody/Anonymous

      That's a reasonable design decision that covers most people's environment.  It would be nice to an environment variable to test against.  Of course my stuff is different and doesn't fit well in the model but the following works (and may be of use to others):

      in my .profile:

      case "${0}:${PS1}" in
          # a weird case, maybe just a SunOS 4.x problem, in which
          # $HOME/.profile is being executed/sourced, $0 starts with a
          # '-' (indicating that this is a login shell), but PS1 (the
          # prompt) is not set.  So, just set PS1 to the default.
              PS1='$ '
          # starting XDarwin under MacOS-X's aqua/quartz (by design)               
          # causes an interactive login shell to be started to insure that one's
          # environment is properly setup (most notably $PATH) when xinitrc
          # is executed.  So if file descriptor zero is not associated with a terminal
          # when both the "login" and "interactive" (presence of PS1) indications
          # are present, unset PS1 since this is really not an interactive shell.
              if [ ! -t 0 ]
                  unset PS1


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks