[Top][All Lists]

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

Re: Tramp and sudo

From: Björn Lindström
Subject: Re: Tramp and sudo
Date: Wed, 13 Aug 2003 23:32:27 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

address@hidden (Kai Großjohann) writes:

> It seems that after Tramp typed
>     exec env 'ENV=' 'PS1=$ ' /bin/sh
> at the remote shell, the remote shell just echoed the input, like so:
>     exec env 'ENV=' 'PS1=$ ' /bin/sh\n
> Note the trailing \n.
> Can you reproduce this behavior by logging in manually from outside
> of Emacs?  From inside of Emacs but outside of Tramp?

I tried evaluating

(make-term "foo" "/usr/bin/sudo" nil "/bin/sh"),

then typing

exec env 'ENV=' 'PS1=$ ' /bin/sh

in the resulting *foo* buffer. The result is a working shell but PS1 is
set to '# '. ENV is empty, but that was the case in the executing
environment, too.

I have also been testing Tramp on a NetBSD server where I have an
account, getting the same error. After evaluating

(add-to-list 'tramp-default-method-alist '("" "" "ssh"))
(make-term "foo" "/usr/bin/sudo" nil "" "/bin/sh")

I get a working but non-interactive shell, without a prompt. That is
still the case after typing

exec env 'ENV=' 'PS1=$ ' /bin/sh

It might be worth telling that /bin/sh on my machine is pdksh, compiled
for Bourne Shell compliancy, while /bin/sh on is
NetBSD's Bourne Shell implementation, sometimes known as ash.

I also think that it might be worth pointing out a problem with
shell-mode I have been having with shell-mode. It is behaving the same
way as you believe Tramp is, echoing my input followed by `\n' instead
of feeding it to the shell. (I have reported this on,
but received no answers). Here is some example running zsh, but it acts
the same way with any shell I have tested.

address@hidden ~]% ls

reply via email to

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