[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2003-02-12 / tramp-remote-path vs. LD_LIBRARY_PATH
From: |
Kai Großjohann |
Subject: |
Re: 2003-02-12 / tramp-remote-path vs. LD_LIBRARY_PATH |
Date: |
Sun, 16 Feb 2003 14:07:30 +0100 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 |
address@hidden writes:
>>>>>> "KG" == Kai Großjohann <address@hidden> writes:
>
> KG> But the question is, is it also a problem in practice?
> KG> Are there programs that people wish to use with Tramp
> KG> that depend on that part of the environment?
>
> If "GNU ls" depends on a glibc,
> that can only be found through LD_LIBRARY_PATH,
> then we're already there, right?!
That's right.
> KG> Now coming to think of it, I think it's not really a problem:
> KG> people's shell init files
> KG> will set up $LD_LIBRARY_PATH appropriately,
> KG> and Tramp will just inherit that setting.
>
> Well I saw this in the debug buffers
> (actually in the context of tilde expansion):
>
> bash -norc -noprofile
>
> But I have no clue, whether tramp calls the resp. and actual shell
> (for executing the "post-startup commands")
> with similar command line options.
> Because then shell init files would not be executed anyway.
>
> So I can't really confirm that your assumptions holds.
First, Tramp logs in to the remote host using
ssh address@hidden
This will give you an interactive shell, which loads its init files.
But this shell could be a Bourne-ish shell or a csh or tcsh, or even
rc. Tramp needs a Bourne-ish shell. So it looks around for a
Bourne-ish shell and runs that: "exec /bin/sh". The new Bourne-ish
shell will inherit the environment from the parent shell. (Let's
hope it won't mung its environment from its init files.) Now Tramp
would like to have tilde expansion, so it looks whether this shell
groks tilde expansion. If it does, fine. If not, it looks around
some more for a shell with tilde expansion, for example a ksh or a
bash. (The shell with tilde expansion obviously also needs to be a
Bourne-ish shell.)
So by the time Tramp gets to the spot that you have observed, the
environment should already have been set appropriately and the newly
executed bash should just inherit it.
But I haven't tested it...
--
A turnip curses Elvis