tramp-devel
[Top][All Lists]
Advanced

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

Re: default remote shell in tramp


From: Michael Albinus
Subject: Re: default remote shell in tramp
Date: Tue, 13 Jul 2010 21:21:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Vinh Nguyen <address@hidden> writes:

> Welcome back Michael.  Status is the same as before you left -- been
> waiting on you =].  Let me know what I should do next to assist the
> process.

OK, let's continue. IIRC, ~/bashrc is read only when the shell is
interactive. Tramp calls "/bin/bash -c ...", which doesn't make it
interactive. So we shall force it via "-i":

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp/lisp/tramp.el.~2.800~       2010-07-13 
17:46:11.099953267 +0200
--- /home/albinus/src/tramp/lisp/tramp.el       2010-07-13 17:43:56.000000000 
+0200
***************
*** 4683,4689 ****
    (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
         ;; We cannot use `shell-file-name' and `shell-command-switch',
         ;; they are variables of the local host.
!        (args (list "/bin/sh" "-c" (substring command 0 asynchronous)))
         current-buffer-p
         (output-buffer
          (cond
--- 4683,4694 ----
    (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
         ;; We cannot use `shell-file-name' and `shell-command-switch',
         ;; they are variables of the local host.
!        (args (list
!               (tramp-get-method-parameter
!                (tramp-file-name-method
!                 (tramp-dissect-file-name default-directory))
!                'tramp-remote-sh)
!               "-i" "-c" (substring command 0 asynchronous)))
         current-buffer-p
         (output-buffer
          (cond
--8<---------------cut here---------------end--------------->8---

Furthermore, you must still add the change in your .emacs which I have
posted already:

(setcdr (assoc 'tramp-remote-sh (assoc "ssh" tramp-methods)) '("/bin/bash"))

> Vinh

Best regards, Michael.



reply via email to

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