Re: Re: [custom] Some issues for custom debian distributions ["Nikita V. Youshchenko" <[EMAIL PROTECTED]>, Sun, Jul 27, 2003 at 08:30:33AM +0400, <[EMAIL PROTECTED]>] > > if [ -r $HOME/.profile ] ; then > > . $HOME/.profile > > fi > > Sterictly saying, this is broken. > /etc/profile, ~/.profile and other login shell rc files should be read by > logic shells only, so if a user types "startx" on the console, they should > not be read.
I've got stuff in my .bash_profile that I really only want on login (finger, mailq on the mailserver etc.), and in fact I would be very surprised if it were executed (in that case I could as well make a link .xsession -> .bash_profile :-P). My .bashrc is much more suitable to be included in .xsession, and in fact I do that. The problem that one doesn't want things like .bash_completion read there is easily solved by # check whether we run interactively [ "$PS1" ] || return (Something like that exists in Debian's /etc/skel/.bash_profile.) So test for reading ~/.bashrc should be done first in X startup files, only reading ~/{.bash_,}profile if the former doesn't exist. Christoph -- Christoph Berg <[EMAIL PROTECTED]>, http://www.df7cb.de Wohnheim D, 2405, Universität des Saarlandes, 0681/9657944
pgpwKZ4eT5Gsu.pgp
Description: PGP signature