On Sat, Apr 11, 2015 at 10:24:47AM +0200, Eckehard Berns wrote:
> 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.

So it is working now. I don't know what was the problem.
It started to work today when I turned on my computer, this is strange.
I thought that only pressing Control-D until I logout and then login
again would apply and load new settings.

Now it is working and I have a normal setup:

$ cat .kshrc
alias ls='ls -p'
alias clr=clear
alias p='ps -l'
alias df='df -h'

$ cat .profile
export ENV=$HOME/.kshrc
export LC_CTYPE="en_US.UTF-8"
export GOPATH=$HOME/go
PATH=$PATH:$HOME/Scripts

And looks like there is no need to 'XTerm*loginShell: true' on
.Xdefaults.

I hope it will stay working.
-- 
Regards

Henrique Lengler 

Reply via email to