Subject: Re: Weird bash .profile and picky Xorg MANPATH
To: Kosta Kilim <kopno@sdf.lonestar.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 05/11/2005 14:50:12
In message <20050511181928.GA16617@SDF.LONESTAR.ORG>, Kosta Kilim writes:
>Hello !
>
>I've installed NetBSD recently and to getting familiar with it. So far
>I'm getting this "clean" feeling and I'm loving it.
>
>But I have some simple questions that I couldn't find the answers to
>on my own. They are relatively trivial yet a bit annoying.
>
>I've set up .profile to my liking and everything works fine while I'm
>at the console, but once I startx into Xorg, every instance of the
>login shell in a xterm that I bring up doesn't read it. Or to clarify,
>it reads my PS1 setting just fine, but not my alias settings, some of
>which are:
>
>alias m='less'
>alias e='emacs'
>
>The shell in question is bash and I've chsh-ed it after installing it
>via pkgsrc. I don't have .bash_profile in my $HOME.
>
>Once I run ". .profile" it reverts back to normal behavior. But only
>for the particular invocation of xterm + bash. I have to do this in
>every other xterm for it to take effect. Not halal.
>
In general, xterms should not read .profile files; they're not login
shells. Set up your environment variables in your .profile read at
login time, and put anything else in the per-shell file -- I use
(pd)ksh rather than bash, so I don't know what it would be for you; for
me, I set ENV to point to $HOME/.env and put my aliases in that file.
--Prof. Steven M. Bellovin, http://www.cs.columbia.edu/~smb