LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   starting bash as a login shell every time (https://www.linuxquestions.org/questions/slackware-14/starting-bash-as-a-login-shell-every-time-176028/)

slackwarefan 04-29-2004 02:40 PM

starting bash as a login shell every time
 
I upgraded slack to current and found that now when I start an X based terminal it loads bash as a non-login interactive shell. This means that bash does not load /etc/profile or ~.bash_profile, only .bashrc. How can I make bash start as a login shell everytime it is executed, or everytime it is executed by an X based terminal?

-Thanks in advance.:D

meldar 04-29-2004 03:38 PM

Use a command-arg like:
konsole --ls
xterm -ls

It does not allways work however, for example when using an integrated terminal. Personally I modified my modified my .bashrc-script and added an "export PS1".

Shade 04-29-2004 04:44 PM

I simply added:

Code:

source /etc/profile
source ~/.bash_profile

to .bashrc to achieve the same effect more easily than changing every shortcut in every wm for a terminal to a login shell.

This way, you can just leave .bashrc with those two commands, and add all your aliases, functions and whatnot to .bash_profile and have them load for login shells and subshells.

--Shade

slackwarefan 04-30-2004 02:55 PM

Thanks. You're awsome man.

-Thanks again.:D


All times are GMT -5. The time now is 04:19 AM.