No argument of any sort was made in #8, specious or otherwise; only an
observation.

"And placing "profiley" stuff into bashrc slows down the shell (as if
it's not slow enough already!)"

Adding things to PATH that you want access to in all your interactive
shells, belongs in the file sourced by interactive shells, not merely
login ones. There's nothing "profiley" about that. And it would be
entirely inappropriate for GDM or ~/.xsession or the like to source a
bash-specific profile script file (as ~/.bash_profile surely is) without
the user configuring it to do so, most particularly when bash isn't the
usual system shell under which those things would be running (and it's
certainly not interactive).

Interactive shell stuff goes in the ~/.foorc (~/.bashrc, ~/.kshrc, what
have you); MOTD  and other "once-only", truly profilish-type setup stuff
goes in the profile source files, and none of those should be sourced by
non-interactive X shell scripts (such as ~/.Xsession) running under
/bin/sh (= dash). There's a reason why the default ~/.profile sources
~/.bashrc, and does nothing else by default (though, if it's going to
source ~/.bashrc, it ought to have been a ~/.bash_profile, and not
~/.profile, but that's an entirely separate issue).

It has been the case for _decades_ that terminal emulators by default
spawn interactive, non-login shells. Changing this to satisfy a few
people who failed to configure their interactive shells correctly, would
surely cause more harm to those who expect things to work the way they
always have, than benefit to those who are confused about how to
properly set up their source files.

Bottom line, you want your profile sourced, configure your emulator to
spawn login shells. Not hard: "/bin/bash -l" versus "/bin/bash". And if
you want certain items to be in your PATH across all interactive shells,
put it in the correct file.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/17962

Title:
  newly opened gnome-terminal windows don't have .bash_profile sourced

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/17962/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to