From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ethan Brown Newsgroups: gmane.emacs.help Subject: Re: Tramp: how to set path to remote shell? Date: Sun, 13 Mar 2011 13:29:17 -0700 Message-ID: References: <8315aace-c2c4-4efb-9d3a-a916b13071f2@d26g2000prn.googlegroups.com> <87aagz1jxs.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1300066933 2808 80.91.229.12 (14 Mar 2011 01:42:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2011 01:42:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 14 02:42:09 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PywnP-0007iS-Oe for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2011 02:42:07 +0100 Original-Received: from localhost ([127.0.0.1]:42516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PywnP-0006DH-3A for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Mar 2011 21:42:07 -0400 Original-Received: from [140.186.70.92] (port=45239 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pyrui-0007Du-RU for help-gnu-emacs@gnu.org; Sun, 13 Mar 2011 16:29:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pyruh-0007c8-BT for help-gnu-emacs@gnu.org; Sun, 13 Mar 2011 16:29:20 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:39576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pyruh-0007bY-7C for help-gnu-emacs@gnu.org; Sun, 13 Mar 2011 16:29:19 -0400 Original-Received: by yxt33 with SMTP id 33so2392904yxt.0 for ; Sun, 13 Mar 2011 13:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZvM3pQZIh0ymM5qvQjxznhMvGYVCX4vGYP5JGLpDxjA=; b=kskKfWk07KqnjN2QMPeg9k8IOtf5T7bX84QEdWxCvJowII4VzutYnPgwdftRBC0Yy8 3y7gPcxXomJboGZjtjC72imCbMxJCkRaxaL8tCvkqZHpH7tDQuyNQcw9CF3t9yM2a0aZ oDcze+NSi1nGjd0NXQrkz+O59fB+uQJVPVZoo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qFMPV5g6ppZ90744OwqSuAFREwREpPbXdCvYZG9ffQNOaUSNCqR0sKaf9iCn4s8T0o Rmd0axNoBzVk8CqbEW9BqQLWTE9FAr/Gp7ka1PtvJfSfGpW/2uOTloDFmQWOOS7HADJT JQMBM1b55+IiJrY+LCh/cq7bHbxxywVx/65pw= Original-Received: by 10.236.136.101 with SMTP id v65mr5545195yhi.378.1300048157951; Sun, 13 Mar 2011 13:29:17 -0700 (PDT) Original-Received: by 10.236.105.228 with HTTP; Sun, 13 Mar 2011 13:29:17 -0700 (PDT) In-Reply-To: <87aagz1jxs.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.169 X-Mailman-Approved-At: Sun, 13 Mar 2011 21:37:18 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80072 Archived-At: On Sun, Mar 13, 2011 at 12:52 AM, Michael Albinus wrote: > Ethan writes: > > Hi, > >> The path to my shell on my local machine is /bin/bash. =A0When >> 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. =A0The actual remote machine path for bash >> is /usr/local/bin/bash. =A0Does anyone know which variable to set so >> that tramp uses the correct path to bash on the remote machine? =A0 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