[Top][All Lists]

[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: David Abrahams
Subject: Re: tramp (2.1.12); Expects remote shell to be in same place?
Date: Thu, 20 Mar 2008 11:25:45 -0400
User-agent: Thunderbird (X11/20080227)

Michael Albinus wrote:
> 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.


Thanks for getting back to me!  That almost works.  My shell prompt on
the remote server, which is supposed to be:

  address@hidden ~]$

comes out looking like this:


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

reply via email to

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