From owner-freebsd-questions Fri Nov 9 8: 3:52 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 0D04A37B417 for ; Fri, 9 Nov 2001 08:03:48 -0800 (PST) Received: from hades.hell.gr (patr530-b154.otenet.gr [212.205.244.162]) by mailsrv.otenet.gr (8.11.5/8.11.5) with ESMTP id fA9G3hB13093; Fri, 9 Nov 2001 18:03:43 +0200 (EET) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id fA9FMtY45184; Fri, 9 Nov 2001 17:22:55 +0200 (EET) (envelope-from charon@labs.gr) Date: Fri, 9 Nov 2001 17:22:55 +0200 From: Giorgos Keramidas To: Brian Sobolak Cc: questions@freebsd.org Subject: Re: Color help;) Message-ID: <20011109172254.J39562@hades.hell.gr> References: <00a801c163d2$60ce0140$a50410ac@olmct.net> <20011102205328.E6967@raggedclown.net> <00f501c163d9$150cad90$a50410ac@olmct.net> <20011102211414.B7554@raggedclown.net> <012e01c163de$a056fef0$a50410ac@olmct.net> <20011108195302.A775@hades.hell.gr> <4915825075.20011109021044@mindspring.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <4915825075.20011109021044@mindspring.com> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable From: Brian Sobolak Subject: Re[2]: Color help;) Date: Fri, Nov 09, 2001 at 02:10:44AM -0800 > Hello Giorgos, > > Thursday, November 08, 2001, 9:53:02 AM, you wrote: > > GK> Colorization is silently disabled if the output isn't > GK> directed to a terminal unless the CLICOLOR_FORCE > GK> variable is defined. > > GK> Pay attention to those last three lines. Then read the description of > GK> the -C option of FreeBSD's ls(1) command. > > Sorry, I have RTFM and am perhaps a bit thick. (Actually, don't > comment on that one :^) No comment :P > 1) What is CLICOLOR_FORCE supposed to be defined as? Is setting it > to something like "1" valid? Uhm, the way I read it, it just has to exist in your environment. But let me check [runs to peek at the source code]. % cd /usr/src/bin/ls $ grep -n CLICOLOR *.c ls.c:205: setenv("CLICOLOR", "", 1); ls.c:281: if (getenv("CLICOLOR") && ls.c:282: (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))) Yes, apparently just setting it in the environment will make line 282 that calls getenv() succeed, and ls will use color. Ah, great. I love having the source to refer to :))) > 2) I don't understand what multi-colum output (-C) has to do with > color. :^( Err, I should have been more verbose. I meant that -C is also an option whose behavior changes the default behavior of ls(1); and that default behavior depends on whether the output goes to a terminal, or down a pipe to more(1)... etc. > I generally use SecureCRT to ssh into my FreeBSD box on my LAN; since > SecureCRT can't send a termtype of xterm or xterm-color, I've tried > putty as well. Neither have worked. > > Could you offer a little bit more help? I've used SecureCRT and CRT at times (mostly when I'm at some Net-Cafe and I want to use SSH and/or Telnet). They do support color, IIRC. The exact option I fail to recall, but they do support ANSI color. Using CRT or SecureCRT with color should be as simple as: 1) connect to the remote system 2) enable ANSI color emulation in CRT/SecureCRT. 3) run to the shell of the remote system: csh> set term =3D ansi or, if you're using a Bourne-like shell $ export TERM=3Dansi --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) iD8DBQE76/TO1g+UGjGGA7YRAiGXAKCOPjPIa4Jqv2TnX2AJDuKYvktaDQCfbT3s 98IAicxDanpnYuAhNAfHrF0= =xcK4 -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message