When is .PROFILE and .KSHRC called - Aix

This is a discussion on When is .PROFILE and .KSHRC called - Aix ; I am confused as to when .profile & .kshrc are called. My understanding is the .profile is called for a login shell but what makes a shell instance a login shell. Is the following correct connection via ssh (or telnet) ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: When is .PROFILE and .KSHRC called

  1. When is .PROFILE and .KSHRC called

    I am confused as to when .profile & .kshrc are called.
    My understanding is the .profile is called for a login shell but what
    makes a shell instance a login shell.

    Is the following correct
    connection via ssh (or telnet) .profile & .kshrc
    tty .profile & .kshrc
    su - .profile & .kshrc
    Xterm only .kshrc
    creating a shell for other reasons only .kshrc
    Are there any other cases in which .profile is called.

    Andrew


  2. Re: When is .PROFILE and .KSHRC called

    you can put "set -x" into .profile and .kshrc and try all different
    connection.

    ps:xterm will only .dtprofile.

    Frank
    Andrew Black (delete obvious bit) wrote:
    > I am confused as to when .profile & .kshrc are called.
    > My understanding is the .profile is called for a login shell but what
    > makes a shell instance a login shell.
    >
    > Is the following correct
    > connection via ssh (or telnet) .profile & .kshrc
    > tty .profile & .kshrc
    > su - .profile & .kshrc
    > Xterm only .kshrc
    > creating a shell for other reasons only .kshrc
    > Are there any other cases in which .profile is called.
    >
    > Andrew



  3. Re: When is .PROFILE and .KSHRC called

    Andrew Black (delete obvious bit) wrote:
    > I am confused as to when .profile & .kshrc are called.
    > My understanding is the .profile is called for a login shell but what
    > makes a shell instance a login shell.


    When it's told to be one, I think.

    > Is the following correct
    > connection via ssh (or telnet) .profile & .kshrc
    > tty .profile & .kshrc


    All due to connections from outside the box: therefore, these
    are "logging in".

    > su - .profile & .kshrc


    The - option indicates that it should look like you're logging in.

    > Xterm only .kshrc


    If started on the remote host and displaying on the piece of
    glass in front of you, then you're not logging in, you're just
    starting a shell on the remote machine.

    > creating a shell for other reasons only .kshrc


    Correct. Not logging in.

    > Are there any other cases in which .profile is called.


    Whenever a shell is started and told that it should behave
    as a login shell (as discussed in the Korn shell chapter in
    the System User's Guide.

+ Reply to Thread