Subject: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on Android: File error: Couldn't find a proper `ls' command

From: Jean Louis <[email-masked]>
Date: Sun, 24 May 2020 19:27:53 +0300

Hello Michael,

Thanks for helping.

* Michael Albinus <[email-masked]> [2020-05-24 17:59]:
> Jean Louis <[email-masked]> writes:
> 
> Hi Jean,
>  
> >> I guess you need to add that directory to your remote PATH. See variable
> >> `tramp-remote-path'.
> >
> > Thank you, I did change that, and I still get the same error.
> >
> > If I start emacs -Q, then I can login, it works well, provided I have
> > changed that path.
> >
> > Do you know maybe how can I debug that? I need my Emacs settings and
> > with it, I get this same error.
> 
> Usually, you should bisect your ~/.emacs. That is, comment half of the
> settings, and check whether it works.
> 
> If it works, you know the problem is in the commented part, which you
> can bisect, again.
> 
> If it doesn't work, comment the other part of your ~/.emacs, and check
> again. And so on, until you know the problematic setting in your ~/.emacs.
> 
> > tramp-remote-path is a variable defined in ‘tramp-sh.el’.
> > Its value is
> > (tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
> > "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"
> > "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
> > "/opt/bin" "/opt/sbin" "/opt/local/bin"
> > "/data/data/com.termux/files/usr/bin")
> 
> Maybe it is better to move "/data/data/com.termux/files/usr/bin to the
> begin of that list?

That did not work.

Now I found that I cannot login when `emacs -q' and I can only login
without problems when I am using `emacs -Q'

I have then removed the non existent site-start.el it was dangling
symbolic link, and then it started working with `emacs -q'

I will try bisecting, but I am not sure. Each time I need to kill the
ssh tramp process in background as well to debug what is wrong.

Jean