Re: Re: [custom] Some issues for custom debian distributions [Bob Proulx <bob@proulx.com>, Sun, Jul 27, 2003 at 11:10:40PM -0600, <[🔎] 20030728051040.GD30421@misery.proulx.com>] > > # check whether we run interactively > > [ "$PS1" ] || return > > > > (Something like that exists in Debian's /etc/skel/.bash_profile.) > > Uh, no. You are thinking of /etc/skel/.bashrc which does that. The > profile sources the bashrc unconditionally. Sorry - I screwed up the file names. FYI, the "source" is commented out in /etc/skel/.bash_profile: #if [ -f ~/.bashrc ]; then # source ~/.bashrc #fi (Maybe that should be changed - it would be a resonable default for users that don't want to edit/don't know how to edit .bash_profile.) > Bash already automatically loads up the bashrc file if it is not a > login shell. Loading bashrc is not the problem. It is loading up > functionality which traditionally exists in the profile which is the > problem. Only for interactive shells, quoting bash(1): When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc. Nevertheless, the above test for $PS1 is still useful if you source .bashrc in .xsession etc where you want variables, but no completion etc. Christoph -- Christoph Berg <cb@df7cb.de>, http://www.df7cb.de Wohnheim D, 2405, Universität des Saarlandes, 0681/9657944
Attachment:
pgp9zcTSP8j9L.pgp
Description: PGP signature