What is the login sequence and dotfile sequence on Debathena machines?
The Athena login sequence is documented in the Dotfiles on Athena document. This article covers the the login before the Athena dotfiles are sourced. It also describes the login sequence for local accounts (for example, all debathena-standard users).
Although this document refers to "Ubuntu", the login sequence will be the same for other Debian-based distributions.
A star () denotes items that apply to login shells only.
tcsh users
- /etc/csh.cshrc - This file has been diverted to /etc/csh.cshrc.debathena. It sources the default Ubuntu csh.cshrc file (which is now found at /etc/csh.cshrc.debathena-orig). Then it sources /usr/share/debathena-tcsh-config/cshrc.debathena, if the file exists.
- /usr/share/debathena-tcsh-config/cshrc.debathena - This file sets a number of Athena-specific shell variables, such as $HOSTTYPE, $ATHENA_SYS, and $ATHENA_SYS_COMPAT. It also creates the shell aliases renew and add.
- /etc/csh.login - This file has not been changed from the default Ubuntu version. It will source all files located in the directory /etc/csh/login.d/. Most filenames in that directory begin with a number, indicating the order in which they're sourced. Many packages (including some Debathena ones) add files to that directory.
- ~/.cshrc - This file will sourced. If you are logging in using your AFS home directory, the Athena login sequence will begin at this time. Refer to the Dotfiles document mentioned above for details on the Athena login sequence.
- ~/.tcshrc - If this file exists, it will be used instead of ~/.cshrc. You should NOT create this file in your AFS home directory, since the default Athena dotfiles will not run.
- ~/.login - This file will sourced. If you are logging in using your AFS home directory, this file will contain Athena-specific customizations and should not be changed.
bash users
Bash shells use completely different set of configuration files depending on whether or not the shell is a login shell or not.
Bash login shells
- /etc/profile - This file has been diverted to /etc/profile.debathena. It sources the default Ubuntu profile file (which is now found at /etc/profile.debathena-orig), which in turn sources all files in /etc/profile.d whose names end with .sh. If /etc/bash.bashrc has not been run at this time **, it then sources all scripts in /usr/share/debathena-bash-config/bashrc.d. Finally, it sources all scripts in /usr/share/debathena-bash-config/profile.d.
- ~/.bash_profile - If this file exists and is readable, it will be sourced and the two following files will not be sourced. For this reason, you should not create this file in your AFS home directory.
- ~/.bash_login - If this file exists AND the shell did not source ~/.bash_profile, it will be sourced. If you are logging in using your AFS home directory, this file will contain Athena-specific customizations.
- ~/.profile - If this file exists AND neither of the two previous files existed, it will be sourced.
** Ubuntu's default profile differs from other operating systems, in that the default profile also sources /etc/bash.bashrc. Normally, /etc/bash.bashrc is only sourced for non-login shells.
Bash shells (interactive, non-login)
- /etc/bash.bashrc - This file has been diverted to /etc/bash.bashrc.debathena. It sources the default Ubuntu bashrc file (which is now found at /etc/bash.bashrc.debathena-orig), Finally, it sources all scripts in /usr/share/debathena-bash-config/bashrc.d.
- ~/.bashrc - This file will be sourced. If you are logging in using your AFS home directory, this file will contain Athena-specific customizations.