Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 1996 08:36:29 -0500 (CDT)
From:      Joe Greco <jgreco@brasil.moneng.mei.com>
To:        branson@widomaker.com (Branson Matheson)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: TERM=cons25 in roots' .profile?!?
Message-ID:  <199610181336.IAA02730@brasil.moneng.mei.com>
In-Reply-To: <Pine.BSF.3.91.961018085239.464C-100000@toth.hq.ferg.com> from "Branson Matheson" at Oct 18, 96 08:55:07 am

next in thread | previous in thread | raw e-mail | index | archive | help
>  Just had this brought up to me... why oh why are we setting a TERM
>  entry in .profile for root?! login does this for us and .login sets
>  TERMCAP based on the one reported to the shell by login or asked at
>  login time? 
> 
>   -branson
> 
> #	$Id: dot.profile,v 1.8 1994/10/27 05:27:00 phk Exp $
> #
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
> echo 'erase ^H, kill ^U, intr ^C'
> stty crt erase ^H kill ^U intr ^C
> export PATH
> HOME=/root
> export HOME
> TERM=cons25			<<<< This is bad. 
> export TERM

I may be wrong, but I believe that this was done so that single user
mode would be more livable.

This is clearly wrong in the case where TERM has been set up by
getty/login from the data in /etc/ttys.

It is not so clearly wrong in the case where you are in single user
mode, but it is still wrong:  if you have a serial console and a vt100,
"cons25" does not work well.  However, it is less clear what the 
correct solution is, in this case.

Personally, this does not bother me too much, since I am used to fixing
broken environments to be able to work, but this might be rather
frustrating to someone a little newer to UNIX.

Anyone have ideas about a more general fix than throwing an explicit
TERM=xxxx in .profile?

... JG



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610181336.IAA02730>