Subject: Re: terminals under X 4.2.0 - problems with variables and setup
To: NetBSD User's Discussion List <netbsd-users@netbsd.org>
From: Lubos Vrbka <shnek@chemi.muni.cz>
List: netbsd-users
Date: 12/06/2002 08:29:04
> I don't know about separate Xfree86 distributions for NetBSD, nor even
> for certain about the xterm in xsrc/xfree, but I do know that what's
> been in /usr/xsrc has _always_ required '-ls' to make the shell started
> by an xterm into a login shell.
this could mean, that in the past versions, even the non-login shell
xterm was
either
1) reading the .profile - that's not very probable
or
2) getting the settings somehow from the environment - this seems more
probable to me
because as i mentioned before, i didn't have to execute xterm with -ls
to have for example "set -o vi" in it. the 2) functionality might be
somehow removed, changed or disabled in the new version of X and
therefore it stopped working...
>>hope that the wrong information in the man (-e switch is incompatible
>>with -ls; xterm -ls -e ssh name works fine) will be removed...
>
>
> Why would you expect '-ls' and '-e' to be compatible? They really are not.
>
> '-ls' causes, among other things IIRC, a '-' character to be prepended
> to the argv[0] value of the shell process. This is how the shell
> figures out that it's supposed to be a login shell. See sh(1):
>
> When first starting, the
> shell inspects argument 0, and if it begins with a dash `-', the shell is
> also considered a login shell. This is normally done automatically by
> the system when the user first logs in. A login shell first reads com-
> mands from the files /etc/profile and .profile if they exist.
>
> '-e' on the other hand runs something other than a shell so whatever you
> specify to run has to tell the ultimate shell to be a login shell.
well, because it works! when i try for example xterm -ls -e mc, it
executes midnightcommander without any problems or error messages -
according to the man, it should have some problems, shouldn't it? (btw,
what dpes IIRC stand for? :o))
> I'm beginning to notice that you mentions '-e ssh' on occasion. That's
> probably your problem: SSH Not xterm.
>
> Run an xterm like 'xterm -ls &' and then from that terminal's prompt try
> running your ssh command and see what happens.
>
> I start my slogin xterm windows much like this (from ctwm):
>
> xterm -cn -rw -sb -si -sk -sl 2048 -ziconbeep 1 -e slogin -C proven.weird.com &
>
> but I use SSH-3.2, not OpenSSH.
i probably know what you mean - if i used xterm -ls -e ssh name it could
cause problems because of simultaneous use of -ls and -e... i mentioned
-e ssh several times, because that's the case that i use and where -ls
and -e WORK together, too...
_@_:
--
#################################################
Lubos Vrbka
National Centre for Biomolecular Research
Masaryk university, Brno, Czech Republic
shnek@chemi.muni.cz
http://www.chemi.muni.cz/~shnek
tel. +420 5 4112 9508
#################################################