From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 19 14:46:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 062AE16A405 for ; Wed, 19 Apr 2006 14:46:14 +0000 (UTC) (envelope-from zombyfork@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D51743D46 for ; Wed, 19 Apr 2006 14:46:11 +0000 (GMT) (envelope-from zombyfork@gmail.com) Received: by nproxy.gmail.com with SMTP id m18so34045nfc for ; Wed, 19 Apr 2006 07:46:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Nisj4PrWcUlYTWLMV9gntAnoWTxeTDBPHqe4AW74jdxcc1asyV3hj2GS/3aJpwe4hX6FZhU+VtcXls/hge9JBnXoUVZ25hSV3jotU/UF0TUsV+httpqsCPjnZADqilrU1yW87OSWAn5X3fMUBvI8K0w++tynmLT+qNHksOGa0EE= Received: by 10.48.162.20 with SMTP id k20mr277647nfe; Wed, 19 Apr 2006 07:46:10 -0700 (PDT) Received: by 10.48.217.6 with HTTP; Wed, 19 Apr 2006 07:46:09 -0700 (PDT) Message-ID: <346a80220604190746n69a74a67te58599f743312cab@mail.gmail.com> Date: Wed, 19 Apr 2006 10:46:09 -0400 From: "Coleman Kane" To: "Eric Anderson" In-Reply-To: <444634C1.9080206@centtech.com> MIME-Version: 1.0 References: <20060419040716.4F26116A45F@hub.freebsd.org> <20060419095207.GC19339@wjv.com> <44462C07.4030903@centtech.com> <444634C1.9080206@centtech.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] Fancy rc startup style RFC X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cokane@cokane.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 14:46:14 -0000 On 4/19/06, Eric Anderson wrote: > > Eric Anderson wrote: > > Bill Vermillion wrote: > >> Somewhere around Wed, Apr 19, 2006 at 04:07 , the world stopped > >> and listened as freebsd-hackers-request@freebsd.org graced us with > >> this profound tidbit of wisdom that would fulfill the enjoyment of > >> future generations: > >> > >>> Message: 20 > >>> Date: Tue, 18 Apr 2006 15:07:31 -0700 > >>> From: Darren Pilgrim > >> > >>> Eric Anderson wrote: > >> > >>> > If I could figure out how to make sh do colors, I'd do it. :) > >> > >>> Please do not use colors in rc. Escape-sequenced colors make > >>> unacceptable assumptions about the user and syslogd strips > >>> escape sequences anyway, so it would be of no use to logged > >>> consoles. Serial consoles introduce other problems with buggy > >>> escape handling in third-party terminal programs. A good text > >>> layout and descriptive status messages do far more for clarity > >>> and readability than any use of color ever can. This point can be debated... read some literature from Edward Tufte... colors are a good way to cram more "information" into a space without actually compromising the capacity of that space. >> > >> Let me add to that. About 10% of the male population has some > >> color vision problem. Mine is a bit more than others. Everytime > >> I get called to work on a Linux system, I have to go in and disable > >> the colors as the reds and other colors become very hard to see > >> against a dark background. The problem is the luminance value of > >> colors such a red is quite low compared to others. That's one of > >> the reasons why fire-trucks in this area are lime-green, as red > >> trucks disappear into the blackness at night. > >> > >> If you add color make sure it is a user selectable option > >> and not turned on by default. IMO everything you need to admin a > >> system needs to be able to run on something as lowly as a pure > >> serial terminal as the above poster notes. > > > > > > Ok. So I've received mass amounts of mail regarding this, and most of i= t > > has been positively in favor of having the option to enable the > > rc_fancy, and then an additional option to turn on coloring, with the > > default to be non-colored but still rc_fancy=3D"YES" which should work = ok > > on serial and other terminals (it did for me). > > > > > > I completely agree about all the coloring comments, and terminal issues= . > > I personally think it should be an available option, easily enabled or > > disabled at will. > > > > I've put up an updated version, with many changes. This version > > includes optional coloring (with rc_fancy_color=3D"YES" in rc.conf), > > better checking, cleaner coding, and no loops. This version is *much* > > more refined than the others - thanks for all the hints everyone! > > > > > > http://www.googlebit.com/freebsd/patches/rc_fancy.patch-5 > > Looks like this version does something strange - from an xterm, the > spacing is correct, but from console, it doesn't do anything with the > \033[71G in the echo. I've played with term types, but can't seem to > make it act the same under console as it does in an xterm. > > Anyone know the issue? > > > Eric Try: \033[71C Hmm... I see 71 spaces.... how about we just stick to the padding... I woul= d like to not go overboard by using a lot of other escape sequences that have less experience out in the wild (and thus, less testing and are more likely to fail). Colors and attributes seem to be the overwhelming majority of reasons using the escape codes. Cursor control and other macros are probabl= y less common. You can change the \033 ---> \e if you like, or leave it. We should settle ourselves on a standard for this however... maybe make a /etc/rc.fancy that has macros for all of this stuff. Also, I second the comment regarding making this tunable. Of course the console will default to 7-bit ASCII text, printable characters only (or whatever charset you have chosen). One of the big reasons for Linux's "prettification" of its console, and support for fb console, is that there are a good number of Linux installations out there where the primary application is desktop and workstation. As for me, I primarily run FreeBSD as a desktop/workstation and therefore enjoy the opportunity to make the console more "readable". We discuss the "bare necessities for servers" and "what's necessary for administering a server", I think that my (and others') workstation needs and desires are important to the development of FreeBSD too. We should be embracing the adoption of the platform for workstation and desktop use as well, and actually take the advice of those users to heart. I would hope that if this featureset can get into the base system, then tunables get into the Console section of sysinstall (allowing this to be turned on at install time) and that the screenshots generated from that entice people who like things like "colorful error messages" to gain more interest in the platform (and yes, "FreeBSD is ugly" is a common crtique I have heard). Maybe that will finall= y push some others to get FB console working (KGI?)... My point is that we should let our purist values get in the way of others' enhanced experience using the system. -- coleman