sorry to Henrique for the duplicate. On Fri, 10 Apr 2015 21:03:26 -0300 Henrique Lengler <[email protected]> wrote: > On Fri, Apr 10, 2015 at 07:51:01PM -0400, dan mclaughlin wrote: > > On Fri, 10 Apr 2015 18:49:02 -0300 Henrique Lengler > > <[email protected]> wrote: > > > On Fri, Apr 10, 2015 at 12:22:45AM -0400, dan mclaughlin wrote: > > > > On Thu, 9 Apr 2015 16:58:29 -0300 Henrique Lengler > > > > <[email protected]> wrote: > > > > > On Sun, Apr 05, 2015 at 09:22:03PM -0700, Philip Guenther wrote: > > > > > > On Sun, Apr 5, 2015 at 9:12 PM, Andrew Fresh <[email protected]> > > > > > > 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)) > > > > > ... > > it really sounds like xterm is not starting a login shell. what is the > > output > > of: > > > > $ ps | grep xterm > > 27150 p6 I 0:00.01 /bin/sh -c xterm -fg white -bg black -ls > > 13224 p6 I 0:05.29 xterm > > 6542 p6 I 0:01.18 xterm > > 29777 p6 I 0:00.00 /bin/sh -c xterm -fg white -bg black -ls > > > > you should see an '-ls' option at the end as above. if not, that is your > > problem (it's not invoking a login shell), and this should work: > > 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.
X has worked that way as long as i can remember. B2 below should work for other terminals as well, since the terminal should read in those values from xrdb (eg *loginShell). they are kind of like environment variables, and you can generally set them in ~/.Xresources or ~/.Xdefaults. on my system: $ cat ~/.Xdefaults ! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $ XTerm*loginShell:true so quite normal, really, but i don't know why it's not the default for you (since it seems to be for me). you probably want something like the above, without the 'XTerm' part, as Mr. Guenther mentioned, so other terminals match too. but only way to know if another terminal works is to try! > > > On Sun, Apr 05, 2015 at 09:22:03PM -0700, Philip Guenther wrote: > > > 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)) > > > > also, xterm may be invoked elsewhere like in your ~/.xinitrc, so you would > > need to fix it there, but the xrdb option should take care of that. > > -- > Regards > > Henrique Lengler

