all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tramp: how to set path to remote shell?
@ 2011-03-12 20:37 Ethan
  2011-03-13  8:52 ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Ethan @ 2011-03-12 20:37 UTC (permalink / raw
  To: help-gnu-emacs

The path to my shell on my local machine is /bin/bash.  When
attempting to bring up a shell on the remote machine I get the error:

exec: /bin/bash: not found

Process shell<2> exited abnormally with code 127


It seems that tramp is using the path from my local machine as the
path on the remote machine.  The actual remote machine path for bash
is /usr/local/bin/bash.  Does anyone know which variable to set so
that tramp uses the correct path to bash on the remote machine?   I
did RTFM, but didn't find it.

Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp: how to set path to remote shell?
  2011-03-12 20:37 Tramp: how to set path to remote shell? Ethan
@ 2011-03-13  8:52 ` Michael Albinus
  2011-03-13 20:29   ` Ethan Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2011-03-13  8:52 UTC (permalink / raw
  To: Ethan; +Cc: help-gnu-emacs

Ethan <ethandbrown@gmail.com> writes:

Hi,

> The path to my shell on my local machine is /bin/bash.  When
> attempting to bring up a shell on the remote machine I get the error:
>
> exec: /bin/bash: not found
>
> Process shell<2> exited abnormally with code 127
>
> It seems that tramp is using the path from my local machine as the
> path on the remote machine.  The actual remote machine path for bash
> is /usr/local/bin/bash.  Does anyone know which variable to set so
> that tramp uses the correct path to bash on the remote machine?   I
> did RTFM, but didn't find it.

I suspect you have applied "M-x shell", haven't you? In this case,
`shell-file-name' (your local login shell) is used for opening the
shell. You can overwrite this by either setting environment variable
$ESHELL, or by setting `explicit-shell-file-name'.

> Thanks.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp: how to set path to remote shell?
  2011-03-13  8:52 ` Michael Albinus
@ 2011-03-13 20:29   ` Ethan Brown
  2011-03-14  9:59     ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Ethan Brown @ 2011-03-13 20:29 UTC (permalink / raw
  To: Michael Albinus; +Cc: help-gnu-emacs

On Sun, Mar 13, 2011 at 12:52 AM, Michael Albinus
<michael.albinus@gmx.de> wrote:
> Ethan <ethandbrown@gmail.com> writes:
>
> Hi,
>
>> The path to my shell on my local machine is /bin/bash.  When
>> attempting to bring up a shell on the remote machine I get the error:
>>
>> exec: /bin/bash: not found
>>
>> Process shell<2> exited abnormally with code 127
>>
>> It seems that tramp is using the path from my local machine as the
>> path on the remote machine.  The actual remote machine path for bash
>> is /usr/local/bin/bash.  Does anyone know which variable to set so
>> that tramp uses the correct path to bash on the remote machine?   I
>> did RTFM, but didn't find it.
>
> I suspect you have applied "M-x shell", haven't you? In this case,
> `shell-file-name' (your local login shell) is used for opening the
> shell. You can overwrite this by either setting environment variable
> $ESHELL, or by setting `explicit-shell-file-name'.
>
>> Thanks.
>
> Best regards, Michael.
>

Hi Michael--

Thanks so much for your quick response.  You are correct that I'm
running "M-x shell".  I suppose I'll need to write a bit of code to
toggle the shell path so I can reset it to the local path when I'm
running "M-x shell" locally instead of remotely.  Too bad there isn't
something to set that works only in the tramp context.

--Ethan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp: how to set path to remote shell?
  2011-03-13 20:29   ` Ethan Brown
@ 2011-03-14  9:59     ` Michael Albinus
  2011-03-14 14:24       ` Ethan Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2011-03-14  9:59 UTC (permalink / raw
  To: Ethan Brown; +Cc: help-gnu-emacs

Ethan Brown <ethandbrown@gmail.com> writes:

> Hi Michael

Hi Ethan,

> Thanks so much for your quick response.  You are correct that I'm
> running "M-x shell".  I suppose I'll need to write a bit of code to
> toggle the shell path so I can reset it to the local path when I'm
> running "M-x shell" locally instead of remotely.  Too bad there isn't
> something to set that works only in the tramp context.

Tramp cannot do anything in this context; it is just a set of basic
functions which are called when you're on a remote host. It does not
know the context.

I have applied a patch to Emacs' trunk (aka Emacs 24). When "M-x shell"
is called interactively, and you're on a remote host, you will be asked
for the shell path to be used.

> --Ethan

Best regards, Michael.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp: how to set path to remote shell?
  2011-03-14  9:59     ` Michael Albinus
@ 2011-03-14 14:24       ` Ethan Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Ethan Brown @ 2011-03-14 14:24 UTC (permalink / raw
  To: Michael Albinus; +Cc: help-gnu-emacs

On Mon, Mar 14, 2011 at 2:59 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
> Ethan Brown <ethandbrown@gmail.com> writes:
>
>> Hi Michael
>
> Hi Ethan,
>
>> Thanks so much for your quick response.  You are correct that I'm
>> running "M-x shell".  I suppose I'll need to write a bit of code to
>> toggle the shell path so I can reset it to the local path when I'm
>> running "M-x shell" locally instead of remotely.  Too bad there isn't
>> something to set that works only in the tramp context.
>
> Tramp cannot do anything in this context; it is just a set of basic
> functions which are called when you're on a remote host. It does not
> know the context.
>
> I have applied a patch to Emacs' trunk (aka Emacs 24). When "M-x shell"
> is called interactively, and you're on a remote host, you will be asked
> for the shell path to be used.
>
>> --Ethan
>
> Best regards, Michael.
>

Thanks Michael.  I should also mention to you how much I appreciate
having the tramp functionality.  Just one more feature that makes
Emacs  a joy to use.

All my best,

--Ethan



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-14 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-12 20:37 Tramp: how to set path to remote shell? Ethan
2011-03-13  8:52 ` Michael Albinus
2011-03-13 20:29   ` Ethan Brown
2011-03-14  9:59     ` Michael Albinus
2011-03-14 14:24       ` Ethan Brown

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.