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: Vinh Nguyen
Subject: Re: default remote shell in tramp
Date: Thu, 22 Jul 2010 09:29:31 -0700

On Wed, Jul 21, 2010 at 8:11 AM, Michael Albinus <address@hidden> wrote:
> Vinh Nguyen <address@hidden> writes:
>
>> here is what i have in .emacs after applying the patch:
>> (add-to-list 'load-path "~/Downloads/tramp/lisp")
>> (require 'tramp)
>> (setq tramp-default-method "ssh")
>> (setcdr (assoc 'tramp-remote-sh (assoc "ssh" tramp-methods))
>> '("/bin/bash"))
>> (setq tramp-verbose 10)
>
> [...]
>
>> 15:54:24.187016 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' 
>> PS1=\#\$\  PS2='' PS3='' /bin/bash
>
> [...]
>
>> 15:54:24.805981 tramp-accept-process-output (10) #
>> address@hidden:~$
>
> Tramp has started /bin/bash, and it has set the prompt to "#$ ". The
> bash has loaded ~/.bashrc, where the prompt has been overwritten.
>
> Tramp expects the set prompt. So it waits forever. A solution could be
> to suppress prompt setting in ~/.bashrc, maybe depending on $TERM.
>

On one server, I commented out all PS related stuff and it works.  On
another server, I did the same (even removed everything from
~/.bashrc), but it doesn't work.  After some debugging, I looked in
/etc/profile and I see PS is set in there.

I don't think this solution is feasible in that the user would have to
edit .bashrc file for EVERY server they use.  Even so, if PS is set
system-wide (as was one of my case), then the user may not have the
permission to edit that.

I tried looking up whether there is a way to set PATH globally for all
shells as my original intent was to access commands that in the PATH
defined in ~/.bashrc.  However, this would require edits config files
for each shell in each system, so this approach is also probably not
feasible.

What are your thoughts?

Vinh
> Best regards, Michael.



reply via email to

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