Michael Albinus wrote: > David Abrahams <[EMAIL PROTECTED]> 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.
Michael, Thanks for getting back to me! That almost works. My shell prompt on the remote server, which is supposed to be: [EMAIL PROTECTED] ~]$ comes out looking like this: ///f8e83e40392c00bfe1ec5080435518e0 clearly something is getting scrambled. Really it should be possible to set this up on a per-server basis, though, n'est-ce pas? -- Dave Abrahams Boost Consulting http://boost-consulting.com _______________________________________________ Tramp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/tramp-devel
