[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: profile and /usr/local/bin in PATH



On Tue, Nov 27, 2001 at 05:06:48PM -0500, Dale Scheetz wrote:
> On Tue, 27 Nov 2001, Jules Bean wrote:
> > On Tue, Nov 27, 2001 at 01:48:14PM -0500, Dale Scheetz wrote:
> > > The default profile on a Debian system puts '/usr/local/bin' as
> > > the first element in the PATH list. This causes several things to
> > > not work as desired.
> >
> > And there are good reasons why that makes sense.  The typical
> > situation is that some binary in the distribution doesn't behave in
> > exactly the way the syasadmin wants, so the sysadmin can override it
> > with a local binary (or script) in /us/rlocal.

as others have pointed out, it's a good default. if you, as local system
admin, prefer otherwise then you can change your /etc/profile. easy.

i have done that on every one of the hundreds of debian systems i have
built, because i happen to like the sbin directories to be in the PATH.
10 seconds work with vi is a lot less hassle than another round of the
recurring "debian's defaults suck because they aren't my preferred
settings" flamewar.

in fact, i cut and paste about 20 lines into /etc/profile on every
system, and copy my .bash-aliases file to them. it's my job to customise
my systems, not debian's.

e.g.

# add sbin directories to the path
PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH"

# set up proxy env vars
proxy="proxy.example.com"
proxyport="3128"
export http_proxy=http://$proxy:$proxyport/
export https_proxy=http://$proxy:$proxyport/
export ftp_proxy=http://$proxy:$proxyport/
export gopher_proxy=http://$proxy:$proxyport/

# aaarrgghh! 'ae' must die!!!!
export EDITOR=/usr/bin/vi

# set up less the way i like it
export LESS="-MMqx4i"
export LESSBINFMT="*u."
eval $(lesspipe)

# colourise ls
export LS_OPTIONS='--color=auto'
eval $(dircolors)
alias ls='ls -F $LS_OPTIONS'

# load user's aliases
[ -e ~/.bash-aliases ] && . ~/.bash-aliases



> Or: dpkg --purge <package> so that the /usr/local version will work ;-)

in some cases, this is appropriate.  in others, it may break
dependancies and force another (desired) package to be uninstalled.

the ultimate "correct" answer to that is, of course, "build your own
package from debianised sources". the trouble is that not everyone wants
to or is capable of doing that.


craig

-- 
craig sanders <cas@taz.net.au>

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch



Reply to: