[frgeek-michiana] Color of ls command in xterm

  • From: "Tom Brown" <tbrown@xxxxxxxxxxxxxxxxx>
  • To: <frgeek-michiana@xxxxxxxxxxxxx>
  • Date: Mon, 17 May 2010 18:10:44 -0400

I set up an OpenVZ box using CentOS 5.4 then configured several containers
(VPEs, virtual machines, etc.). The containers use CentOS 4.x because it was
easier to find and install CentOS 4.x templates. However, the color of
directory names output by the "ls" command in the containers is too dark for
my eyes. I have to move my face closer to the display and sort of squint to
see the directory names. 

 

The fix -

 

1.      Su to root.
2.      Issue "infocmp" command to discover what terminal type your system
uses. The CentOS 4.x template uses xterm.
3.      Open /etc/DIR_COLORS.xterm
4.      Change the line which says "DIR 00;34" to "DIR 01;34". The first
setting turns the bold attribute off. The second setting turns bold on. The
default attribute apparently is off in the CentOS 4.x template from Open VZ.
5.      Save the file. Logout and log back in to reload the xterm settings. 

 

There is probably a more clever way to reload the color settings, but I
didn't take the time to find it.

Tom Brown
System/Network Administrator
River Bend Hose Specialty, Inc.
office: 574-233-1133 x228
mobile: 574-298-2706

 

Other related posts: