On Fri, 10 Apr 2015 20:48:39 -0400 John Merriam <j...@johnmerriam.net> wrote:
> On 4/10/2015 8:03 PM, Henrique Lengler wrote:
> > On Fri, Apr 10, 2015 at 07:51:01PM -0400, dan mclaughlin wrote:
> >> 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.
> >
> >> 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.
> 
> See the -l option of ksh.  Also search for the word login in the ksh man 
> page.  ksh (and most if not all other shells I believe) behave 
> differently if they think they are a login shell.  xterm does not not 
> automatically tell the shell that is invoked when it starts that the 
> shell should be a login shell.  That is why the -ls xterm option exists.
> 
> It can be useful not to tell the shell invoked by xterm that it is a 
> login shell when you are running something in xterm besides an 
> interactive command prompt session.  See the xterm man page.  You can 
> run things in an xterm besides just a command prompt shell (shell 
> scripts, other text programs, etc.) in which case you wouldn't want 
> login shell type things being set up.
> 
> -- 
> 
> John Merriam
> 

as far as i can tell this is the openbsd default to do a login shell, and
it makes sense. for those other functions, which are for a more expert set
anyway, they probably can figure it out ('xterm -e').

Reply via email to