Gentoo Archives: gentoo-user

From: Pandu Poluan <pandu@××××××.info>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Where does sudo get the PATH ?
Date: Thu, 11 Oct 2012 16:26:04
Message-Id: CAA2qdGUUTh8P0o9ydzbLBh_b+UVRwUVKnECqSKzRmMDfjAotLQ@mail.gmail.com
In Reply to: [gentoo-user] Re: Where does sudo get the PATH ? by Nicolas Richard
1 On Oct 11, 2012 9:29 PM, "Nicolas Richard" <theonewiththeevillook@×××××.fr>
2 wrote:
3 >
4 > Joost Roeleveld <joost@××××××××.org> writes:
5 > > On Wednesday, October 10, 2012 04:57:50 PM Nicolas Richard wrote:
6 > >> In my homedir:
7 > >> .bash_profile loads .bashrc
8 > >> .bashrc says export PATH="~/bin/overrideglobal:${PATH}:~/bin" (and
9 > >> defines some aliases)
10 > >
11 > > Does it load any global default?
12 >
13 > No. Here are the full files, omitting comments and empty lines :
14 >
15 > youngfrog@geodiff-mac3 ~ $ grep -vH '^#\|^$' .bashrc .bash_profile
16 > .bashrc:export PATH="~/bin/overrideglobal:${PATH}:~/bin"
17 > .bashrc:if [[ $- != *i* ]] ; then
18 > .bashrc: # Shell is non-interactive. Be done now!
19 > .bashrc: return
20 > .bashrc:fi
21 > .bashrc:UPDATEGITREPO="~/TeX/ ~/BSSM/2011/notes-de-conf/ ~/org/
22 ~/BSSM/2012"
23 > .bashrc:export UPDATEGITREPO
24 > .bashrc:alias ll="ls -lA"
25 > .bashrc:alias l="ls -CF"
26 > .bashrc:alias cp="cp -i"
27 > .bashrc:alias rm="rm -i"
28 > .bashrc:alias mv="mv -i"
29 > .bash_profile:[[ -f ~/.bashrc ]] && . ~/.bashrc
30 >
31 > > In other words, what is in the environment when you are normally
32 > > logged in?
33 >
34 > Ok, I thought my original post contained it. In fact that was part of my
35 > original post :
36 >
37 > youngfrog@geodiff-mac3 ~ $ bash -c 'echo $PATH'
38 >
39 ~/bin/overrideglobal:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.4:/usr/games/bin:/usr/local/texlive/2012/bin/i386-linux:~/bin
40 >
41 > and I forgot to mention that it was the same as :
42 > youngfrog@geodiff-mac3 ~ $ env | grep ^PATH
43 >
44 PATH=~/bin/overrideglobal:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.4:/usr/games/bin:/usr/local/texlive/2012/bin/i386-linux:~/bin
45 >
46 > and yet the same as :
47 > youngfrog@geodiff-mac3 ~ $ echo $PATH
48 >
49 ~/bin/overrideglobal:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.4:/usr/games/bin:/usr/local/texlive/2012/bin/i386-linux:~/bin
50 >
51 > Thanks for trying btw. I certainly did something really stupid to set
52 > the path the first time, but can't see where.
53 >
54
55 A bit desperate, but try :
56
57 grep -R "texlive/2011" /etc/*
58
59 Rgds,

Replies

Subject Author
[gentoo-user] Re: Where does sudo get the PATH ? Nicolas Richard <theonewiththeevillook@×××××.fr>