tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.1.12); Expects remote shell to be in same place?


From: Michael Albinus
Subject: Re: tramp (2.1.12); Expects remote shell to be in same place?
Date: Mon, 10 Mar 2008 17:09:44 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

David Abrahams <address@hidden> writes:

> I am using a Linux client machine and accessing a file on a FreeBSD
> host.  If I do `M-x shell' while the current buffer is the remote file,
> tramp tries to start a remote shell.  Cool!  However, my local shell is
> /bin/bash and on FreeBSD, bash is in /usr/local/bin/bash, so the command
> fails.

See "C-h f shell RET":

| shell is an interactive compiled Lisp function in
| `/usr/local/src/emacs/lisp/shell.elc'.
| 
| (shell &optional buffer)
| 
| Run an inferior shell, with I/O through buffer (which defaults to `*shell*').
| Interactively, a prefix arg means to prompt for buffer.
| If `default-directory' is a remote file name, it is also prompted
| to change if called with a prefix arg.
| 
| If buffer exists but shell process is not running, make new shell.
| If buffer exists and shell process is running, just switch to buffer.
| Program used comes from variable `explicit-shell-file-name',
|  or (if that is nil) from the ESHELL environment variable,
|  or (if that is nil) from `shell-file-name'.

So your best choice might be to set `explicit-shell-file-name'.
Something like this (untested):

(defadvice shell
  (around my-advice-shell activate)
  "Set shell program name for remote execution."
  (let ((explicit-shell-file-name "bash"))
    ad-do-it))

This shall work when /bin (on your local host) and /usr/local/bin (on
the remote host) are in $PATH. You could do something more
sophisticated, including absolute paths, of course.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]