🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.linux
Article #54660

Re: startup files

#54660
From: Peter B. West
Date: Tue, 07 Oct 1997 00:00
66 lines
2848 bytes
George Dau wrote:
> 
> Wayne Best <wmbest@cygnus.uwa.edu.au> wrote:
> 
...
> ]2. What files could be responsible for changing my PATH?
> 
> Several, since both root and you local user are affected, I'd check /etc/profile

Note that /etc/profile may be looking for *.sh files in directory
/etc/profile.d and sourcing anything it finds there.  Are you talking
about an 'ordinary' login, or an xterm under X?  That will make a big
difference.
> 
> ]3. What files could be responsible for the difference in colour
> ]listings?
> 
> Check out the end of the man page for ls, under "Display Colorization"

I didn't find this info very helpful when I was trying to set colors
up.  The trick is two-fold, at least under the RedHat setup.  First, you
must get the env var LS_COLORS set up properly.  This is done in your
.profile (there it is again) by 
eval `dircolors -b colorsfile`
in my case, because I am using a Bourne-compatible shell.  If you are
using csh, the arg becomes `-c'.  The colorsfile is a file describing
the association of colors with file types.  You can get one by
dircolors -p >colorsfile

Make any changes you require to the file, then put the
eval `dircolors ...`
in your .profile.  The next step is to alias `ls' to `ls=/bin/ls
--color=auto'.   The only way I can find to get ls to do colors is to
tell it to with the --color option.  There are some alternatives to
`auto', but I can't find them just now.

There is a problem when you are using xterm and the VTs.  Against the
normal black screen, the default colors are OK, but on an xterm against
a light background, the bright colors tend to get lost.  I have two
files, .dir_colors and .dir_colors_x.  Deciding between them was a bit
tricky, because at the time my .profile is run for X (in my .xsession
file), the terminal type has not been set to `xterm', so I do this:

DIRCOLOURS=""
DCTERM=$TERM
[ -f $HOME/.dir_colors ] && DIRCOLOURS="$HOME/.dir_colors"
if [ -n "$DISPLAY" -o "$TERM" = xterm ]; then
    [ -f $HOME/.dir_colors_x ] && DIRCOLOURS="$HOME/.dir_colors_x"
    DCTERM=xterm
fi
eval `TERM=$DCTERM dircolors -b $DIRCOLOURS`

Note that this is all Bourne shell.

> ]
> ]Any help would be greatly appreciated, it's driving me nuts!!
> ]
> ]Wayne
> 

Yours faithfully,
-- 
 __ /__   Peter B. West
   /     p.west@mailbox.uq.edu.au
  /    "Master, to whom shall we go?"
Technical Details
Message-ID: <3439DEB9.75F44264@mailbox.uq.edu.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34361D4B.7FA2@cygnus.uwa.edu.au> <34389560.898841@news.bne.aone.net.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102983,76746e8f5c291d87
X-Google-Attributes: gid102983,public
From: "Peter B. West" <p.west@mailbox.uq.edu.au>
Subject: Re: startup files
Date: 1997/10/07
Message-ID: <3439DEB9.75F44264@mailbox.uq.edu.au>
X-Deja-AN: 279095332
References: <34361D4B.7FA2@cygnus.uwa.edu.au> <34389560.898841@news.bne.aone.net.au>
Organization: Dis
Newsgroups: aus.computers.linux