On Fri, Apr 10, 2015 at 09:03:26PM -0300, Henrique Lengler wrote:
> > > > > On Sun, Apr 05, 2015 at 09:22:03PM -0700, Philip Guenther wrote:
> > > > > > If you start X with xdm, then you need to either
> > > > > > A) manually set ENV (or source your entire .profile) from your
> > > > > > .xsession that xdm invokes, OR
> > > > > > B) tell xterm to start the shell inside it as a login shell, so that
> > > > > > *that* will read your .profile.  This can be done by either:
> > > > > >    B1) start xterm with the -ls option, or
> > > > > >    B2) set "*loginShell: true" in your X resource database (c.f. 
> > > > > > xrdb(1))
> > [...]
> 
> I know that xterm isn't being started with -ls option and it solve thw
> problem.
> 
> But this couldn't be normal, is it? Because my intention is not to use
> only xterm but also others term. emulators like st, and I would like to have
> they working as it does in any other system.
> If this is normal, will I need to configure and make sure that every
> term. emulator I'm using is loading .profile.

ksh is a bit special in the part that it won't read any startup
file unless it is started as a login shell or it sees the ENV
environment variable. (ksh has its reasons for this behavior.)

What I'm doing is a variant of option A above. I use .xinitrc as
my main startup file for X. Since xdm starts .xsession instead I
simply have the line

exec /bin/ksh -l ~/.xinitrc

in it. That telles ksh to run .xinitrc as a login shell and thus
sources .profile first. That way ENV is set properly and every
terminal should work as expected. Starting X with startx also is
working properly since it inherits the ENV variable from my console
login.

-- 
Eckehard Berns

Reply via email to