From owner-freebsd-hackers Fri Oct 18 06:37:04 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA22272 for hackers-outgoing; Fri, 18 Oct 1996 06:37:04 -0700 (PDT) Received: from brasil.moneng.mei.com (brasil.moneng.mei.com [151.186.109.160]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA22266 for ; Fri, 18 Oct 1996 06:37:02 -0700 (PDT) Received: (from jgreco@localhost) by brasil.moneng.mei.com (8.7.Beta.1/8.7.Beta.1) id IAA02730; Fri, 18 Oct 1996 08:36:30 -0500 From: Joe Greco Message-Id: <199610181336.IAA02730@brasil.moneng.mei.com> Subject: Re: TERM=cons25 in roots' .profile?!? To: branson@widomaker.com (Branson Matheson) Date: Fri, 18 Oct 1996 08:36:29 -0500 (CDT) Cc: freebsd-hackers@freebsd.org In-Reply-To: from "Branson Matheson" at Oct 18, 96 08:55:07 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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