Re: Re: Conflicting TERM env var with SetEnv feature.

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On 11/23/2018 08:15 AM, Gert Doering wrote:
> Stuff like TERM=screen can be substituted reasonably well with TERM=xterm,
> for example.  (I regularily run into this when ssh'ing to AIX boxes, which
> do not know about "screen" - and since these are not mine, fixing all their
> termcap/terminfo DBs is not trivially done).

If the problem is *that* systematic, wouldn't it be a better approach to
distribute something along the lines of



# Belt&suspenders in case we get executed from a *non*-interactive shell
if [ "$TERM" != "" -a "$TERM" != "dumb" ]; then
	# Doublecheck that the termcap *still* hasn't been updated
	tput init >/dev/null 2>&1
	EXIT=$?
	if [ $EXIT -ne 0 ]; then
		# Non-understood $TERM. Try to switch to a working one.
		# (*This* machine's "working ones" are hardcoded here!)
		case $TERM in
			screen)	export TERM="xterm" ;;
			# ... more ...
			*)	export TERM="dumb" ;;
		esac
	fi
fi



into the target accounts'/machines' ~/.bash_profile's, /etc/profile's,
/etc/profile.d/TERMfix.sh's, or what-have-you's?

Regards,
-- 
Jochen Bern
Systemingenieur

www.binect.de
www.facebook.de/binect

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux