.bash profile

From DSL Wiki

   This page in other languages: Deutsch, Español, Русский

/home/dsl/.bash_profile

As with .xinitrc and bootlocal.sh, .bash_profile is a startup script which generally runs once. This particular file is used for commands which run when the normal user logs in (not as root) and which do not require a graphical environment.

Common uses for .bash_profile are to set environment variables such as PATH, to create aliases for shell commands, and to set the default permissions for newly created files. The file .bashrc is similar, with the exception that .bash_profile runs only for Bash login shells and .bashrc runs for every new Bash shell. If you have commands in .bashrc that you also want to run when you login, you can add the command source $HOME/.bashrc to .bash_profile.

The initial contents are (DSL 3.0):

       #!/bin/bash
       export IRCNICK=DSL
       SSH=`env | grep SSH_CONNECTION`
       RUNLEVEL=`runlevel|cut -f2 -d' '`
       if [ -z "$SSH" ]; then
          if [ $RUNLEVEL -eq 5 ]; then
              startx
          fi
       fi

These commands basically check to see if you are logged in through SSH and what the current runlevel is. If you are not in SSH and you are in runlevel 5, then X is started automatically.

If you desire to add commands to this script, while keeping the current commands intact, you should add them above the 'if' statement so they will be run before you are sent into X.