-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/21/10 10:41 AM, [email protected] wrote:
> Hi,
> 
> A few weeks ago I already submitted a post about difficulties with
> my $PATH variable. It wasn't solved at that time but then I got
> overloaded with work and couldn't spend more efforts on it.
> 
> But the problem is still there and now I want to solve it once and
> for all. This is what happens:
> 
> - when "test -r /sw/bin/init.sh && . /sw/bin/init.sh" is left out
>    from my .bash_profile:
>       - (1) when xterm is invoked without -ls, .bash_profile is not
>         executed and $PATH does not contain the fink paths
>       - (2) when invoked with -ls, .bash_profile is executed
>         but $PATH does not contain the fink paths
>    This is all logical
> 
> - with "test -r /sw/bin/init.sh && . /sw/bin/init.sh" in
>    .bash_profile:
>       - (3) invoking xterm without -ls: the path is correct
>         (/sw/bin:/sw/sbin in front). This means that somehow
>         .bash_profile is executed in the course of the events, even
>         if it shouldn't since I explicitly don't want a login shell.
>         How can that happen? But although the path is correct, other
>         commands such as defining aliases in .bash_profile are not
>         executed or they are executed in some context where they loose
>         their effect. When I manually enter . .bash_profile at the
>         command prompt in this setup, the path remains correct and
>         all other stuff in .bash_profile does what it needs to do.
>       - (4) invoking xterm with -ls: now my aliases are set correctly
>         but the path is messed up: /usr/bin:/bin:/usr/sbin:/sbin:
>         /usr/local/bin: /usr/texbin:/usr/X11/bin:/sw/bin:/sw/sbin:
>         /usr/X11R6/bin
>         This is not how it should be since /sw/bin:/sw/sbin needs to
>         be in front.
> 
> I need (4) to work correctly. I also did some tests with rxvt and it 
> shows the same behaviour as xterm. Currently I use (3) and I manually 
> enter . .bash_profile every time (or I get it from the shell history, 
> saving some typing). But this is a pain. In Terminal everything is
> correct.
> 
> Any ideas?
> 
> On a side note: what's the use of fink's own xinitrc? There are no 
> details in the package or on fink's website. Apparently it got 
> installed on my system through some dependencies because I never 
> explicitly installed it. Could it be causing the problems that I see?
> 
> Thanks in advance
> 
> Patrick
> 

I believe Fink's xinitrc gets used to set font paths and the like.  I
don't think it has anything to do with what you're seeing.

I _do_ see the behavior that only the paths get set but not aliases when
using "xterm" rather than "xterm -ls", but a different behavior when
using a regular xterm as opposed to "xterm -ls"


xterm
bash-3.2$ printenv PATH
/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin:/Users/hansen/bin:/Users/hansen/bin/maintainertools:/opt/local/xfc-42p1:/opt/local/bin:/WVU/HELIX/AWave/pulsed/analysis_tools/shell:/WVU/HELIX/AWave/pulsed/analysis_tools/perl:/WVU/HELIX/AWave/pulsed/analysis_tools/octave:/Users/hansen/Documents/WVU/DoLa/analysis_tools/shell:/Users/hansen/Documents/WVU/codes/dola/helpers/perl:/Users/hansen/Documents/WVU/codes/dola/helpers/octave:/Users/hansen/Documents/WVU/codes/dola/helpers/shell:/usr/X11/bin
bash-3.2$ alias

xterm -ls
$ printenv PATH
/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin:/Users/hansen/bin:/Users/hansen/bin/maintainertools:/opt/local/xfc-42p1:/opt/local/bin:/WVU/HELIX/AWave/pulsed/analysis_tools/shell:/WVU/HELIX/AWave/pulsed/analysis_tools/perl:/WVU/HELIX/AWave/pulsed/analysis_tools/octave:/Users/hansen/Documents/WVU/DoLa/analysis_tools/shell:/Users/hansen/Documents/WVU/codes/dola/helpers/perl:/Users/hansen/Documents/WVU/codes/dola/helpers/octave:/Users/hansen/Documents/WVU/codes/dola/helpers/shell:/usr/X11/bin:/Users/hansen/bin:/Users/hansen/bin/maintainertools:/opt/local/xfc-42p1:/opt/local/bin:/WVU/HELIX/AWave/pulsed/analysis_tools/shell:/WVU/HELIX/AWave/pulsed/analysis_tools/perl:/WVU/HELIX/AWave/pulsed/analysis_tools/octave:/Users/hansen/Documents/WVU/DoLa/analysis_tools/shell:/Users/hansen/Documents/WVU/codes/dola/helpers/perl:/Users/hansen/Documents/WVU/codes/dola/helpers/octave:/Users/hansen/Documents/WVU/codes/dola/helpers/shell
$ alias
alias foo='ls'

It appears to me to be tied to Apple's X11 implementation (I'm on 10.5.8
using Xquartz 2.4), and not to Fink as such.  What I'm seeing is
different than what you do, which could be due to a different X11 server.

It used to be the case that Apple's X11 didn't process the standard Unix
dot files other than .bashrc, and they may have changed that somewhat
(as well as appending /usr/X11/bin on the PATH in my case).

- -- 
Alexander Hansen
Fink User Liaison
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuBZqAACgkQB8UpO3rKjQ9IwQCeJF5Vhj0IuKGfqrM2XIsHyzIc
m7IAnjGqMfJHO/SoYVZ7OM1sQfvRRBov
=isep
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to