Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Nov 2001 17:22:55 +0200
From:      Giorgos Keramidas <charon@labs.gr>
To:        Brian Sobolak <sobolak@mindspring.com>
Cc:        questions@freebsd.org
Subject:   Re: Color help;)
Message-ID:  <20011109172254.J39562@hades.hell.gr>
In-Reply-To: <4915825075.20011109021044@mindspring.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

From: Brian Sobolak <sobolak@mindspring.com>
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




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