On Sun, Apr 05, 2015 at 09:22:03PM -0700, Philip Guenther wrote:
> On Sun, Apr 5, 2015 at 9:12 PM, Andrew Fresh <and...@afresh1.com> wrote:
> > On Sun, Apr 05, 2015 at 10:50:47PM -0300, Henrique Lengler wrote:
> >> And it is called in ~.profile with this:
> >> . /home/henri/.kshrc
> >>
> >> The problem is that these definitions work out of X, in the console,
> >> logged as the same user (henri) but don't work under X.
> >> I open a xterm window and and type clr, I receive:
> >> /bin/ksh: clr: not found
> >> But out of X it works, can someone help me to make this thing work
> >> normally?
> >
> >
> > What I have done is set "ENV=$HOME/.kshrc" in .profile, then whenever you
> > open a new shell, it will use that file as a shell startup file.
> 
> That's step one, but whether it's enough depends on how you start X.
> 
> If you start X from the command line with 'startx' then yes, using
> export ENV=$HOME/.kshrc in your .profile should be enough, because
> your X clients will inherit that in the environment from startx.
> 
> 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))

Still not able to do this. My /home/henri/.profile have this:
------------------------------------------------------------
export ENV="$HOME/.kshrc"
export LC_CTYPE="en_US.UTF-8"
export GOPATH=$HOME/go
PATH=$PATH:$HOME/Scripts

My .kshrc
---------
export PS1='$PWD $ '
alias quit=exit
alias clr=clear
alias logout=exit
alias bye=exit
alias j=jobs


BUT printenv says:
------------------
/home/henri $ printenv
_=/usr/bin/printenv
XAUTHORITY=/home/henri/.Xauthority
LOGNAME=henri
WINDOWPATH=5
WINDOWID=6291457
HOME=/home/henri
LC_CTYPE=en_US.UTF-8
DISPLAY=:0
GOPATH=/home/henri/go
MAIL=/var/mail/henri
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/home/henri/Scripts
SHELL=/bin/ksh
PS1=$PWD $
TERM=st-256color
USER=henri

Looks like it reads the PS1 env but not the rest, or they don't work.
Also I don't intend to use only xterm, but others term. emulators.
-- 
Regards

Henrique Lengler 

Reply via email to