LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Virgilio, Vincent (Vincent.Virgilio_at_[hidden])
Date: 2003-05-05 10:13:50


Yet another way to pull in .bash_login with ssh is:

        ssh [-f] <host> bash -ic <command>

where 'i' = interactive, 'c' = command. '-f' puts ssh into the background,
for commands like xterm.

Vince Virgilio

> -----Original Message-----
> From: André Kempe [mailto:andre_at_[hidden]]
> Sent: Saturday, May 03, 2003 10:24 AM
> To: jgmbenoit_at_[hidden]; General LAM/MPI mailing list
> Subject: Re: LAM: LAM and bash
>
>
> I think the fact that ~/.bash_profile is not executed is due to the
> fact that bash distinguishes between interactive-shell,where
> you have a
> command-prompt, and non-interactive-shell,
> which regards only a subset of your dot-files.
>
> When you call 'ssh remote-host command', the non-interactice-shell is
> used, and your ./bash_profile is skipped. One way to get it
> working is
> to add your PATH to your ./bashrc, the other is to add the
> PATH-variable
> to ~/.ssh/environment( see man ssh)
>
> good luck
>
> Andre
>
>
> Jerome BENOIT wrote:
>
> > Hello LAM,
> >
> > I am working on a small network with `bash' as shell and
> `ssh' as rsh:
> > I wonder why `lamboot' does not source the ~/.bash_profile'
> (in order
> > to have a correct PATH before to look for `lamd') as `ssh'
> does set a
> > default PATH then: whereas once ssh connected to XX `printenv PATH'
> > gives the PATH as set up in `~/.bash_profile',
> > ssh XX "printenv PATH" gives the default PATH
> > (in other words, the `~/.bash_profile' was not sourced).
> >
> > I do not know who misbehaves.
> >
> > Anyhow,
> > can we ask to `lamboot' source `~/.bash_profile' before to look for
> > `lamd' ?
>
>
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

************************************
If this email is not intended for you, or you are not responsible for the
delivery of this message to the addressee, please note that this message may
contain ITT Privileged/Proprietary Information. In such a case, you may not
copy or deliver this message to anyone. You should destroy this message and
kindly notify the sender by reply email. Information contained in this
message that does not relate to the business of ITT is neither endorsed by
nor attributable to ITT.
************************************