tramp-devel
[Top][All Lists]
Advanced

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

Re: Happy with remote-shell $0, and its PATH


From: Michael Albinus
Subject: Re: Happy with remote-shell $0, and its PATH
Date: Mon, 04 Nov 2019 09:17:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

積丹尼 Dan Jacobson <address@hidden> writes:

Hi Dan,

> (info "(tramp) Android shell setup") says
>
>    • ‘sh’ must be specified for remote shell since Android devices do
>      not provide ‘/bin/sh’.  ‘sh’ will then invoke whatever shell is
>      installed on the device with this setting:
>
>           (add-to-list 'tramp-connection-properties
>                    (list (regexp-quote "192.168.0.26") "remote-shell" "sh"))
>
> I have an idea,
> because we are already talking to the shell,
> can't we just tell it somehow to use "$0"?!

We must ensure a bourne-ish shell is called. $0 can be anything, we have
no control over this. That's why we don't recommend to use it, anywhere.

> Furthermore, at
>
>    • TRAMP requires preserving ‘PATH’ environment variable from user
>      settings.  Android devices prefer ‘/system/xbin’ path over
>      ‘/system/bin’.  Both of these are set as follows:
>
>           (add-to-list 'tramp-remote-path 'tramp-own-remote-path)
>           (add-to-list 'tramp-remote-path "/system/xbin")
>
> what if we are happy with the path the remote ssh provides us,
> and don't want to change it? I.e., tramp should just use the ls, cp, rm,
> etc. that it finds on the path already in the ssh shell... so do mention
> how to enforce that.

If you are happy with the path on Android, you don't need to change it
as recommended. I have just documented what it takes for me to setup
an Android environment. Granted, I'm not an expert in this.

But I don't like to expect too much being set implicitly. That changes
often, from Android release to Android release, my experience says.

Best regards, Michael.



reply via email to

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