bash PATH weirdness

bash PATH weirdness

Post by Bill Simpso » Tue, 24 Feb 1998 04:00:00



I find that if I login at the opening prompt (not in xterm) as root or
wsimpson, my PATH is as expected.  HOWEVER I normally login as wsimpson
and if I need to install software (say) I do: su.  Well I ran into some
problems and I see it is due to the PATH being different when I su from
wsimpson than if I login as root.

How to fix so PATH is always the same?  (Or at least I need teTeX in
the PATH) Thanks very much for any help.
I am using Slackware 3.4.0

Bill Simpson

sh137:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11/bin:/usr/
andrew/bin:/usr/openwin/bin:/usr/games:.:/usr/lib/teTeX/bin
sh137:~# logout

sh137 login: wsimpson
Password:
Linux 2.0.30.

sh137:~$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11/bin:/usr/andrew/bin:/usr/openwin/bin:/usr
/games:.:/usr/lib/teTeX/bin

sh137:~$ su
Password:
sh137:/home/wsimpson# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

 
 
 

bash PATH weirdness

Post by Florian Kuehne » Tue, 24 Feb 1998 04:00:00


Bill Simpson schrieb/wrote/crivait:

Quote:>How to fix so PATH is always the same?  (Or at least I need teTeX in
>the PATH)

You want to put the full path into ~/.bashrc or another startup script
which is performed when a certain shell is started. man bash (chapter
"invocation").

  Florian

 
 
 

bash PATH weirdness

Post by Bill Simpso » Wed, 25 Feb 1998 04:00:00


Quote:> Bill Simpson schrieb/wrote/crivait:
> >How to fix so PATH is always the same?  (Or at least I need teTeX in
> >the PATH)

> You want to put the full path into ~/.bashrc or another startup script
> which is performed when a certain shell is started. man bash (chapter
> "invocation").

>   Florian

So far as I know, this won't work.
One solution that does work is to invoke su as
su -
Then it uses the right path.

Bill Simpson

 
 
 

1. bash PATH weirdness!

Just noticed that bash IS finding executables in my working
directory....and it shouldn't.

I have checked my $PATH and '.' is NOT in it.

This behaviour only happens under X (I've tried with a few different
window managers and terminals, but seems to make no difference)

It doesn't happen when logged in as root.

It doesn't happen when logged in to a VT.

This is with mandrake 8.0 and bash version 2.04.18(1)-release
(i586-mandrake-linux-gnu).

Sure hope someone can tell me what's going on.

--
Bob van der Poel ** Wynndel, British Columbia, CANADA **

WWW:   http://users.uniserve.com/~bvdpoel

2. nomal lock and spinlock in mutex?

3. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

4. network not reacheable

5. csh/bash : path/PATH

6. Shell Script Using Async Communications

7. bash : PATH and path

8. Problems with sndconfig and AWE64 on Redhat 5.1

9. cygwin-bash and path: How to switch to current path?

10. Stupid BASH BASH EXPORT PS1 and path to X Question

11. Path Weirdness

12. path weirdness

13. minicom weirdness (on the path to ppp, like everyone?)