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

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Sun, 24 May 2020 05:35:01 UTC

Severity: normal

Tags: notabug

Found in version 28.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41496 in the body.
You can then email your comments to 41496 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41496; Package emacs. (Sun, 24 May 2020 05:35:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean Louis <bugs <at> gnu.support>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 24 May 2020 05:35:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; When accessing sshd via Tramp via Termux on Android: File
 error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 08:33:58 +0300
I am trying to use Tramp to access Termux on Android/Replicant, by using
this command:

/ssh:192.168.43.1#8022:/storage/emulated/0/

Yet I get faced with the error:

File error: Couldn't find a proper `ls' command

I have installed there "ls" command from coreutils, and I tried these
checks:

ls -lnd /
drwxr-xr-x 20 0 0 0 Feb  6  1970 /

ls --color=never -al /dev/null
crw-rw-rw- 1 root root 1, 3 Feb  6  1970 /dev/null

$ which ls
/data/data/com.termux/files/usr/bin/ls

Thus ls is there and is working so far, it is from coreutils, not from
busybox. The busybox version did not work.

The ssh connection from terminal works just fine, including the sftp
connection. 

It would be nice to be able to access Android/Replicant devices over
sshd by using Tramp.


In GNU Emacs 28.0.50 (build 9, x86_64-pc-linux-gnu, X toolkit, cairo version 1.14.8, Xaw3d scroll bars)
 of 2020-05-07 built on protected.rcdrun.com
Repository revision: b2581eea1be1468a15927be00ba2f3f399af33a1
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11907000
System Description: Hyperbola GNU/Linux-libre

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --prefix=/package/text/emacs-2020-05-07 --with-modules
 --without-gpm --with-x-toolkit=lucid
 PKG_CONFIG_PATH=/home/data1/protected/GNUstep/Library/Libraries/pkgconfig:/usr/lib/pkgconfig'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_ALL: de_DE.UTF-8
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort hashcash mail-extr emacsbug message rmc puny dired
dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache
epa derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date subr-x seq byte-opt gv bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 46634 10093)
 (symbols 48 6086 1)
 (strings 32 16423 1836)
 (string-bytes 1 526914)
 (vectors 16 10157)
 (vector-slots 8 133373 10264)
 (floats 8 24 36)
 (intervals 56 246 0)
 (buffers 992 11))

-- 
Thanks,
Jean Louis




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41496; Package emacs. (Sun, 24 May 2020 08:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 41496 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jean Louis <bugs <at> gnu.support>
Cc: 41496 <at> debbugs.gnu.org
Subject: Re: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on
 Android: File error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 10:48:53 +0200
Jean Louis <bugs <at> gnu.support> writes:

Hi,

> $ which ls
> /data/data/com.termux/files/usr/bin/ls
>
> Thus ls is there and is working so far, it is from coreutils, not from
> busybox. The busybox version did not work.

I guess you need to add that directory to your remote PATH. See variable
`tramp-remote-path'.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41496; Package emacs. (Sun, 24 May 2020 14:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 41496 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 41496 <at> debbugs.gnu.org
Subject: Re: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on
 Android: File error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 17:46:15 +0300
* Michael Albinus <michael.albinus <at> gmx.de> [2020-05-24 11:49]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> Hi,
> 
> > $ which ls
> > /data/data/com.termux/files/usr/bin/ls
> >
> > Thus ls is there and is working so far, it is from coreutils, not from
> > busybox. The busybox version did not work.
> 
> 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.

I have no other options set for tramp, and still same error.

Jean

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")
Original value was 
(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")





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41496; Package emacs. (Sun, 24 May 2020 15:00:02 GMT) Full text and rfc822 format available.

Message #14 received at 41496 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jean Louis <bugs <at> gnu.support>
Cc: 41496 <at> debbugs.gnu.org
Subject: Re: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on
 Android: File error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 16:58:41 +0200
Jean Louis <bugs <at> gnu.support> 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?

> Jean

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41496; Package emacs. (Sun, 24 May 2020 16:29:02 GMT) Full text and rfc822 format available.

Message #17 received at 41496 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 41496 <at> debbugs.gnu.org
Subject: Re: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on
 Android: File error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 19:27:53 +0300
Hello Michael,

Thanks for helping.

* Michael Albinus <michael.albinus <at> gmx.de> [2020-05-24 17:59]:
> Jean Louis <bugs <at> gnu.support> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41496; Package emacs. (Sun, 24 May 2020 17:16:01 GMT) Full text and rfc822 format available.

Message #20 received at 41496 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jean Louis <bugs <at> gnu.support>
Cc: 41496 <at> debbugs.gnu.org
Subject: Re: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on
 Android: File error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 19:14:41 +0200
Jean Louis <bugs <at> gnu.support> writes:

> Hello Michael,

Hi Jean,

> 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.

Maybe the Tramp cache is in the way. Try "M-x tramp-cleanup-all-connections".

> Jean

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41496; Package emacs. (Sun, 24 May 2020 17:23:02 GMT) Full text and rfc822 format available.

Message #23 received at 41496 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 41496 <at> debbugs.gnu.org
Subject: Re: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on
 Android: File error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 20:21:59 +0300
* Michael Albinus <michael.albinus <at> gmx.de> [2020-05-24 20:15]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > Hello Michael,
> 
> Hi Jean,
> 
> > 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.
> 
> Maybe the Tramp cache is in the way. Try "M-x tramp-cleanup-all-connections".

Thank you, that made it working.

But I do wonder, because I have restarted Emacs, and killed sshd
connections in background.

At least now I got it working with my full setup.

Thanks.

Jean




Added tag(s) notabug. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Sun, 24 May 2020 17:42:02 GMT) Full text and rfc822 format available.

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Sun, 24 May 2020 17:42:02 GMT) Full text and rfc822 format available.

Notification sent to Jean Louis <bugs <at> gnu.support>:
bug acknowledged by developer. (Sun, 24 May 2020 17:42:02 GMT) Full text and rfc822 format available.

Message #30 received at 41496-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jean Louis <bugs <at> gnu.support>
Cc: 41496-done <at> debbugs.gnu.org
Subject: Re: bug#41496: 28.0.50; When accessing sshd via Tramp via Termux on
 Android: File error: Couldn't find a proper `ls' command
Date: Sun, 24 May 2020 19:41:03 +0200
Jean Louis <bugs <at> gnu.support> writes:

Hi Jean,

>> Maybe the Tramp cache is in the way. Try "M-x tramp-cleanup-all-connections".
>
> Thank you, that made it working.

Good, so I'm closing the bug.

> But I do wonder, because I have restarted Emacs, and killed sshd
> connections in background.

The Tramp cache is kept persistently in a file. Only "emacs -Q" doesn't
load it.

> At least now I got it working with my full setup.
>
> Thanks.
>
> Jean

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 22 Jun 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.