Re: Colors of text in terminal.
From: Larry Lindstrom (larryl_at_aracnet.com)
Date: Mon, 28 Jul 2003 10:45:55 -0700
Dave Uhring wrote:
> On Sun, 27 Jul 2003 20:04:20 -0700, Larry Lindstrom wrote:
> > Can I have an ssh session with my text displayed in colors that
> > are readable?
> It is the ~/.shellrc or ~/.profile on your remote machine which
> determines that.
> [opt]$ echo $TERM
> [opt]$ ssh 192.168.0.3
> Last login: Sun Jul 27 10:41:16 2003 from tarfu.localdomain
> Linux 2.4.21-xfs.
Ok, I didn't have TERM defined or referenced in .profile. $TERM was
undefined. When I export TERM, without defining it in profile, $TERM
is "dtterm". If I define TERM=dtterm and export, of course, $TERM is
> Lockwood's Long Shot:
> The chances of getting eaten up by a lion on Main Street aren't
> one in a million, but once would be enough.
> [root]# ls /
> a bin boot buffer cdrom dev dos etc floppy foo home info
> lib mike mnt mnt1 opt proc root sbin tmp usr var
> All of those directory names are colored blue, exactly in accordance with
> Can you do what you ask when logged into the Linux machine - at the
> console of that machine? Your use of dtterm is irrelevant here since it
> is a full color terminal.
Logging into linux-1's console shows $TERM to be "linux". The color
ls and vi sessions are still enabled. Hmm, I have stty erase ^H in my
.profile, but I can't backspace on the console.
Ok, I've set "COLOR none" in /etc/DIR_COLORS and now "ln" displays
in the monochrome colors I selected for the dtterm session. Isn't there
something I could do to have monochrome "ls" in my account, and not
I've looked through the vim man page for the world "color", nothing.
I looked for "lang", and found this:
Syntax files for various languages.
But /usr/share/vim/vim61/syntax/cpp.vim doesn't seem to refer to colors.
Do you like these colors? When looking at C++ code, can you read the
yellow keywords like "while" printed on a white background? If I use
white foreground, black background the yellow keywords stand out fine
against the black, but the dark blue comments are hard to read. And the
search highlights matching characters by printing them in white on a yellow
background. Again, unreadable by me.
Maybe I just haven't found the foreground and background colors that
make all these other colors readable.
Dave, I appreciate your advice and my frustration is not directed at
you. But is there anybody here who, when reading a technical manual,
like an O'Reilly's technical work, or one of W. Richard Stevens (rip)
works, wishes the publisher would print the verbs in pail yellow, instead
of the boring black ink on white paper like the rest of the text? Why
does anybody choose to look at a program where some of the text is
printed in a color that is close to the background?
Color might be OK. Where can I tell view which color I want?
Having text displayed in the foreground/background colors I choose
for a dtterm session would also be cool. How do I do that?
Again, I'd prefer solutions that apply to my account, but for now
global solutions are also OK.
Please, I need to cut some code. How do people use vim to help with
I don't want to hate Linux, but it's such a battle to get anything
done in this environment.